Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 (*UserCache) IsUserReady ¶
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 UserLoadout ¶
Click to show internal directories.
Click to hide internal directories.