Version: v0.0.0-...-5387047 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2021 License: GPL-3.0 Imports: 3 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Inventory

type Inventory struct {
	Items     []UserInventoryItem `json:"items" bson:"items"`     //物品
	BuyMenu   UserBuyMenu         `json:"buymenu" bson:"buymenu"` //购买菜单
	Cosmetics [5]UserCosmetics    `json:"cosmetics" bson:"cosmetics"`
	Loadouts  [3]UserLoadout      `json:"loadouts" bson:"loadouts"`

type UserBuyMenu

type UserBuyMenu struct {
	PistolsTR     [9]uint16 `json:"pistolstr" bson:"pistolstr"`         // 0
	PistolsCT     [9]uint16 `json:"pistolsct" bson:"pistolsct"`         // 7
	ShotgunsTR    [9]uint16 `json:"shotgunstr" bson:"shotgunstr"`       // 1
	ShotgunsCT    [9]uint16 `json:"shotgunsct" bson:"shotgunsct"`       // 8
	SmgsTR        [9]uint16 `json:"smgstr" bson:"smgstr"`               // 2
	SmgsCT        [9]uint16 `json:"smgsct" bson:"smgsct"`               // 9
	RiflesTR      [9]uint16 `json:"riflestr" bson:"riflestr"`           // 3
	RiflesCT      [9]uint16 `json:"riflesct" bson:"riflesct"`           // 10
	MachinegunsTR [9]uint16 `json:"machinegunstr" bson:"machinegunstr"` // 4
	MachinegunsCT [9]uint16 `json:"machinegunsct" bson:"machinegunsct"` // 11
	MeleesTR      [9]uint16 `json:"meleestr" bson:"meleestr"`           // 14
	MeleesCT      [9]uint16 `json:"meleesct" bson:"meleesct"`           // 15
	EquipmentTR   [9]uint16 `json:"equipmenttr" bson:"equipmenttr"`     // 5
	EquipmentCT   [9]uint16 `json:"equipmentct" bson:"equipmentct"`     // 12
	ClassesTR     [9]uint16 `json:"classestr" bson:"classestr"`         // 6
	ClassesCT     [9]uint16 `json:"classesct" bson:"classesct"`         // 13

type UserCache

type UserCache struct {
	UserID   uint32
	UserName string
	NickName string

	UserInventory Inventory
	NetInfo       UserNetInfo
	CurrentConnection net.Conn
	CurrentSequence   *uint8
	CurrentServerIndex  uint8
	CurrentChannelIndex uint8
	CurrentRoomId       uint16
	CurrentTeam         uint8
	Currentstatus       uint8
	CurrentIsIngame     bool
	CurrentKillNum      uint16
	CurrentDeathNum     uint16
	CurrentAssistNum    uint16
	CurrentRoomData     []byte

	SequenceLocker sync.Mutex

func (*UserCache) GetNextSeq

func (u *UserCache) GetNextSeq() uint8

func (*UserCache) IsUserReady

func (u *UserCache) IsUserReady() bool

type UserCosmetics

type UserCosmetics struct {
	CosmeticsName  string `json:"cosmeticsname" bson:"cosmeticsname"`
	MainWeapon     uint16 `json:"mainweapon" bson:"mainweapon"`
	MainBullet     uint16 `json:"mainbullet" bson:"mainbullet"`
	SecondWeapon   uint16 `json:"secondweapon" bson:"secondweapon"`
	SecondBullet   uint16 `json:"secondBullet" bson:"secondBullet"`
	FlashbangNum   uint16 `json:"flashbangnum" bson:"flashbangnum"`
	GrenadeID      uint16 `json:"grenadeid" bson:"grenadeid"`
	SmokeNum       uint16 `json:"smokenum" bson:"smokenum"`
	DefuserNum     uint16 `json:"defusernum" bson:"defusernum"`
	TelescopeNum   uint16 `json:"telescopenum" bson:"telescopenum"`
	BulletproofNum uint16 `json:"Bulletproofnum" bson:"Bulletproofnum"`
	KnifeID        uint16 `json:"knifeid" bson:"knifeid"`

type UserInfo

type UserInfo struct {
	UserID        uint32 `json:"userid" bson:"-"`
	UserName      string `json:"username" bson:"username"`
	NickName      string `json:"nickname" bson:"nickname"`
	Password      string `json:"password" bson:"password"`
	Level         uint8  `json:"level" bson:"level"`
	CurExp        uint64 `json:"curexp" bson:"curexp"`
	MaxExp        uint64 `json:"maxexp" bson:"maxexp"`
	Points        uint64 `json:"points" bson:"points"`
	PlayedMatches uint32 `json:"playedmatches" bson:"playedmatches"`
	Wins          uint32 `json:"wins" bson:"wins"`
	Kills         uint32 `json:"kills" bson:"kills"`
	Deaths        uint32 `json:"deaths" bson:"deaths"`
	Campaign      uint8  `json:"campaign" bson:"campaign"`
	Rank          uint32 `json:"rank" bson:"rank"`
	ChatTimes     uint8  `json:"chatimes" bson:"chatimes"`
	Options       []byte `json:"options" bson:"options"`

	UserInventory Inventory   `json:"inventory" bson:"inventory"`
	NetInfo       UserNetInfo `json:"netinfo" bson:"-"`
	Friends       []string    `json:"friends" bson:"friends"`

type UserInventoryItem

type UserInventoryItem struct {
	Id      uint16 `json:"id" bson:"id"`       //物品id
	Count   uint16 `json:"count" bson:"count"` //数量
	Existed uint8  `json:"existed" bson:"existed"`
	Type    uint8  `json:"type" bson:"type"`
	Time    uint32 `json:"time" bson:"time"`

type UserLoadout

type UserLoadout struct {
	MainWeapon   uint16 `json:"mainweapon" bson:"mainweapon"`
	SecondWeapon uint16 `json:"secondweapon" bson:"secondweapon"`
	Knife        uint16 `json:"knife" bson:"knife"`
	Grenade      uint16 `json:"grenade" bson:"grenade"`

type UserNetInfo

type UserNetInfo struct {
	ExternalIpAddress  uint32
	ExternalClientPort uint16
	ExternalServerPort uint16

	LocalIpAddress  uint32
	LocalClientPort uint16
	LocalServerPort uint16

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL