Documentation ¶
Index ¶
- Constants
- Variables
- type AttEntry
- type BaseNetMsg
- type BladeEntry
- type CostLootEntry
- type CostLootObj
- type EquipEnchantEntry
- type HeroEntry
- type ItemEntry
- type PlayerLevelupEntry
- type PluginObj
- type RuneEntry
- type RuneSuitEntry
- type TableGate
- type TableGlobal
- type TalentEntry
- type TokenEntry
- type TransferNetMsg
Constants ¶
View Source
const ( Account_MemExpire = 2 * time.Hour // memory expire time Account_OnlineTimeout = 20 * time.Second )
View Source
const ( Att_Begin = iota Att_FirstBegin = iota - 1 // 一级属性开始 Att_Str = iota - 2 // 力量 Att_Agl // 敏捷 Att_Con // 耐力 Att_Int // 智力 Att_AtkSpeed // 攻击速度 Att_FirstEnd // 一级属性结束 Att_SecondBegin = iota - 3 // 二级属性开始 Att_MaxHP = iota - 4 // 血量 Att_MaxMP // 蓝量 Att_Atk // 攻击力 Att_Def // 防御力 Att_CriProb // 暴击率 Att_CriDmg // 暴击伤害 Att_EffectHit // 效果命中 Att_EffectResist // 效果抵抗 Att_ConPercent // 体力加层 Att_AtkPercent // 攻击力加层 Att_DefPercent // 防御力加层 Att_SecondEnd // 二级属性结束 Att_CurHP = iota - 5 // 当前血量 Att_CurMP // 当前蓝量 Att_End )
一级属性
View Source
const ( CostLoot_Item = iota CostLoot_Token CostLoot_Hero CostLoot_Player CostLoot_Blade CostLoot_Rune CostLoot_End )
View Source
const ( Item_TypeItem = iota // 普通物品 Item_TypeEquip // 装备 Item_TypePresent // 礼包 Item_TypeRune // 御魂(未鉴定) )
View Source
const ( Item_Effect_Null = -1 // 无效果 Item_Effect_Loot = 0 // 掉落 Item_Effect_RuneDefine = 1 // 鉴定御魂 Item_Effect_End = 2 )
View Source
const ( Player_MaxPlayer = 10 // how many players can be created per client Player_MaxLevel = 60 Player_MemExpire = 2 * time.Hour // memory expire time )
View Source
const ( Plugin_Player = iota Plugin_Hero Plugin_Item Plugin_Blade Plugin_End )
View Source
const ( Rune_TypeBegin = iota // 魂石类型 Rune_TypeA = iota - 1 Rune_TypeB Rune_TypeC Rune_TypeEnd )
View Source
const ( Rune_PositionBegin = iota // 魂石位置 Rune_Position1 = iota - 1 // 1号位 Rune_Position2 // 2号位 Rune_Position3 // 3号位 Rune_Position4 // 4号位 Rune_Position5 // 5号位 Rune_Position6 // 6号位 Rune_PositionEnd )
View Source
const ( Rune_MaxStar = 6 // 魂石最高星级 Rune_MainAtt = 1 // 魂石主属性一条 Rune_ViceAtt = 5 // 魂石副属性五条 Rune_AttNum = Rune_MainAtt + Rune_ViceAtt )
View Source
const ( SnowFlake_Account = iota SnowFlake_Player SnowFlake_Hero SnowFlake_Item SnowFlake_Blade SnowFlake_Rune SnowFlake_Chat SnowFlake_End )
View Source
const ( Token_Gold = iota Token_Diamond Token_Honour Token_End )
View Source
const (
Blade_MaxBlade = 4
)
View Source
const (
Hero_MaxEquip = 4 // how many equips can put on per hero
)
Variables ¶
View Source
var DatastoreTimeout time.Duration = time.Second * 10
datastore timeout
View Source
var TCPReadBufMax = 1024 * 1024 * 2
tcp read max buff size
Functions ¶
This section is empty.
Types ¶
type AttEntry ¶
type AttEntry struct { ID int32 `json:"_id"` Desc string `json:"Desc"` // 一级属性 Str int64 `json:"Str"` Agl int64 `json:"Agl"` Con int64 `json:"Con"` Int int64 `json:"Int"` AtkSpeed int64 `json:"AtkSpeed"` // 二级属性 MaxHP int64 `json:"MaxHP"` MaxMP int64 `json:"MaxMP"` Atk int64 `json:"Atk"` Def int64 `json:"Def"` CriProb int64 `json:"CriProb"` CriDmg int64 `json:"CriDmg"` EffectHit int64 `json:"EffectHit"` EffectResist int64 `json:"EffectResist"` ConPercent int64 `json:"ConPercent"` AtkPercent int64 `json:"AtkPercent"` DefPercent int64 `json:"DefPercent"` }
att entry
type BaseNetMsg ¶
base net message type define
type BladeEntry ¶
type BladeEntry struct { ID int32 `json:"_id"` AttID int32 `json:"att_id"` Quality int32 `json:"quality"` SpellList []int32 `json:"spell_list"` }
blade entry
type CostLootEntry ¶
type CostLootEntry struct { ID int32 `json:"_id"` Type int32 `json:"type"` Misc int32 `json:"misc"` Num int32 `json:"num"` }
cost_loot entry
type CostLootObj ¶
type EquipEnchantEntry ¶
type EquipEnchantEntry struct { ID int32 `json:"_id"` EquipPos int32 `json:"EquipPos"` AttID int32 `json:"AttID"` }
equip entry
type HeroEntry ¶
type HeroEntry struct { ID int32 `json:"_id"` Name string `json:"name"` AttID int32 `json:"att_id"` Quality int32 `json:"quality"` }
hero entry
type ItemEntry ¶
type ItemEntry struct { ID int32 `json:"_id"` Name string `json:"Name"` Desc string `json:"Desc"` Type int32 `json:"Type"` SubType int32 `json:"SubType"` Quality int32 `json:"Quality"` MaxStack int32 `json:"MaxStack"` EffectType int32 `json:"EffectType"` EffectValue []int32 `json:"EffectValue"` EquipEnchantID int32 `json:"EquipEnchantID"` }
item entry
type PlayerLevelupEntry ¶
player level up entry
type RuneEntry ¶
type RuneEntry struct { ID int32 `json:"_id"` Name string `json:"Name"` Type int32 `json:"Type"` Pos int32 `json:"Pos"` Quality int32 `json:"Quality"` SuitID int32 `json:"SuitID"` }
魂石属性表
type RuneSuitEntry ¶
type RuneSuitEntry struct { ID int32 `json:"_id"` Suit2_AttID int32 `json:"Suit2_AttID"` Suit3_AttID int32 `json:"Suit3_AttID"` Suit4_AttID int32 `json:"Suit4_AttID"` Suit5_AttID int32 `json:"Suit5_AttID"` Suit6_AttID int32 `json:"Suit6_AttID"` }
魂石套装属性表
type TableGate ¶
type TableGate struct { ID int `gorm:"type:int(10);primary_key;column:id;default:0;not null;unsigned" bson:"_id"` TimeStamp int `gorm:"type:int(10);column:time_stamp;default:0;not null" bson:"timestamp"` }
gate mysql table
type TableGlobal ¶
type TableGlobal struct { ID int `gorm:"type:int(10);primary_key;column:id;default:0;not null;unsigned" bson:"_id"` TimeStamp int `gorm:"type:int(10);column:time_stamp;default:0;not null" bson:"timestamp"` }
Global mysql table global
func (TableGlobal) TableName ¶
func (TableGlobal) TableName() string
TableName set global table name to be `global`
type TalentEntry ¶
type TalentEntry struct { ID int32 `json:"_id"` Name string `json:"name"` Desc string `json:"desc"` LevelLimit int32 `json:"level_limit"` GroupID int32 `json:"group_id"` CostID int32 `json:"cost_id"` }
talent entry
type TokenEntry ¶
type TokenEntry struct { ID int32 `json:"_id"` Name string `json:"name"` MaxHold int64 `json:"max_hold"` }
token entry
type TransferNetMsg ¶
type TransferNetMsg struct { BaseNetMsg WorldID uint32 // world to recv message PlayerID int64 // player to recv message }
transfer message type
Source Files ¶
Click to show internal directories.
Click to hide internal directories.