Documentation
Index ¶
- func Lottery(plr IPlayer, req *PB.C_PlayerLottery) *PB.GS_PlayerLottery_R
- func WishHero(plr IPlayer, req *PB.C_PlayerWishHero) int32
- type ArmSlot
- type Campsite
- type CampsiteSlot
- type Destiny
- type Fashion
- type FashionMap
- type GodWeapon
- type Hero
- func (self *Hero) AddAllProps() int32
- func (self *Hero) AddProps(Type, id int32, num float32)
- func (self *Hero) CalcProps(sendUpdate bool)
- func (self *Hero) CalcProps2(props *PB.ClassAttributeType)
- func (self *Hero) GetAtkPower() int32
- func (self *Hero) GetExpFromLevel(lv int32) (res int32)
- func (self *Hero) GetProps2other() *PB.ClassAttributeType
- func (self *Hero) LvUp(Lv int32) int32
- func (self *Hero) SendUpdateProps(updated shared.PropMap)
- func (self *Hero) SetAdvancedLv() int32
- func (self *Hero) SetHeroStepPassive(new []int32) int32
- func (self *Hero) ToMsg() *PB.GS_Hero
- func (self *Hero) ToMsg_BattleHero() *PB.BattleHero
- func (self *Hero) UpdateProps() (updated shared.PropMap)
- type Heroes
- func (self *Heroes) CalcTeamProps(sendUpdate bool, plr IPlayer)
- func (self *Heroes) CreateHero(id int32, plr IPlayer) *Hero
- func (self *Heroes) FindHero(id int32) *Hero
- func (self *Heroes) GetElemCount(elem int32, exclude int32, mustInTeam bool) int32
- func (self *Heroes) GetGenderCount(gender gconst.Gender, exclude int32, mustInTeam bool) int32
- func (self *Heroes) GetHeroCount(heroId int32, exclude int32, mustInTeam bool) int32
- func (self *Heroes) GetJobCount(job int32, exclude int32, mustInTeam bool) int32
- func (self *Heroes) Init(plr IPlayer)
- func (self Heroes) MarshalBSON() ([]byte, error)
- func (self *Heroes) NewHero(id int32, plr IPlayer) *Hero
- func (self *Heroes) Reset()
- func (self *Heroes) ToMsg() map[int32]*PB.GS_Hero
- func (self *Heroes) UnmarshalBSON(data []byte) error
- type IPlayer
- type MAP_I32_ArmSlot
- type MAP_I32_Campsite
- func (self *MAP_I32_Campsite) GetCampsiteSlotByHeroId(heroId int32) (*Campsite, *CampsiteSlot)
- func (self *MAP_I32_Campsite) Init(plr IPlayer)
- func (self MAP_I32_Campsite) MarshalBSON() ([]byte, error)
- func (self *MAP_I32_Campsite) SetSlotHero(plr IPlayer, id int32, slotId int32, heroId int32) *Campsite
- func (self *MAP_I32_Campsite) ToMsg() map[int32]*PB.Campsite
- func (self *MAP_I32_Campsite) UnmarshalBSON(data []byte) error
- type MAP_I32_Destiny
- type MAP_I32_GodWeapon
- type MAP_I32_Tactics
- type MainHero
- func (self *MainHero) AddAllProps()
- func (self *MainHero) AddProps(Type, id int32, num float32)
- func (self *MainHero) CalcProps(sendUpdate bool)
- func (self *MainHero) CalcProps2(props *PB.ClassAttributeType)
- func (self *MainHero) GetAtkPower() int32
- func (self *MainHero) GetProps2other() *PB.ClassAttributeType
- func (self *MainHero) Init(player IPlayer)
- func (self *MainHero) SetLevel(lv int32)
- func (self *MainHero) ToMsg() *PB.MainHero
- func (self *MainHero) ToMsg_BattleMainHero() *PB.BattleMainHero
- func (self *MainHero) ToMsg_BattleSKill() []*PB.BattleSkill
- type Tactics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Campsite ¶
type Campsite struct { Id int32 //ID CampsiteSlots []*CampsiteSlot // contains filtered or unexported fields }
func (*Campsite) GetCachePropMods ¶
func (self *Campsite) GetCachePropMods() (*PB.PropMods, *PB.PropMods)
type CampsiteSlot ¶
func (*CampsiteSlot) ToMsg ¶
func (self *CampsiteSlot) ToMsg() *PB.CampsiteSlot
type FashionMap ¶
func NewFashionMap ¶
func NewFashionMap() *FashionMap
func (*FashionMap) FindFashion ¶
func (self *FashionMap) FindFashion(id int32) *Fashion
func (FashionMap) MarshalBSON ¶
func (self FashionMap) MarshalBSON() ([]byte, error)
func (*FashionMap) ToMsg ¶
func (self *FashionMap) ToMsg() map[int32]*PB.Fashion
func (*FashionMap) UnmarshalBSON ¶
func (self *FashionMap) UnmarshalBSON(data []byte) error
func (*FashionMap) UpgradeFashionLevel ¶
func (self *FashionMap) UpgradeFashionLevel(fashion_id int32)
type GodWeapon ¶
type GodWeapon struct { Id int32 Star int32 //星级 Dan int32 //神段 DanExp core.Map_I32_I32 //每一个进度map<index,exp> }
func NewGodWeapon ¶
type Hero ¶
type Hero struct { PB.BaseHero TeamPos int32 `bson:"-"` //在队伍中的位置,0表示没有上阵 // contains filtered or unexported fields }
func (*Hero) AddAllProps ¶
func (*Hero) CalcProps2 ¶
func (self *Hero) CalcProps2(props *PB.ClassAttributeType)
func (*Hero) GetAtkPower ¶
func (*Hero) GetExpFromLevel ¶
func (*Hero) GetProps2other ¶
func (self *Hero) GetProps2other() *PB.ClassAttributeType
func (*Hero) SendUpdateProps ¶
func (*Hero) SetAdvancedLv ¶
func (*Hero) SetHeroStepPassive ¶
func (*Hero) ToMsg_BattleHero ¶
func (self *Hero) ToMsg_BattleHero() *PB.BattleHero
func (*Hero) UpdateProps ¶
type Heroes ¶
func (*Heroes) CalcTeamProps ¶
计算上阵属性变化
func (*Heroes) GetElemCount ¶
获取阵营,国家数量
func (*Heroes) GetGenderCount ¶
func (*Heroes) GetHeroCount ¶
统计英雄数量
func (*Heroes) GetJobCount ¶
统计职业数量
func (Heroes) MarshalBSON ¶
func (*Heroes) UnmarshalBSON ¶
type IPlayer ¶
type IPlayer interface { comp.IPlayer GetMainHero() *MainHero CreateMainHero(id int32) *MainHero GetHeroes() *Heroes GetTeam() core.Map_I32_I32 GetFashions() *FashionMap CalcProp(Calc bool) *PB.ClassAttributeType }
type MAP_I32_ArmSlot ¶
func (MAP_I32_ArmSlot) MarshalBSON ¶
func (self MAP_I32_ArmSlot) MarshalBSON() ([]byte, error)
func (*MAP_I32_ArmSlot) UnmarshalBSON ¶
func (self *MAP_I32_ArmSlot) UnmarshalBSON(data []byte) error
type MAP_I32_Campsite ¶
func (*MAP_I32_Campsite) GetCampsiteSlotByHeroId ¶
func (self *MAP_I32_Campsite) GetCampsiteSlotByHeroId(heroId int32) (*Campsite, *CampsiteSlot)
判断是否已经使用
func (*MAP_I32_Campsite) Init ¶
func (self *MAP_I32_Campsite) Init(plr IPlayer)
func (MAP_I32_Campsite) MarshalBSON ¶
func (self MAP_I32_Campsite) MarshalBSON() ([]byte, error)
func (*MAP_I32_Campsite) SetSlotHero ¶
func (self *MAP_I32_Campsite) SetSlotHero(plr IPlayer, id int32, slotId int32, heroId int32) *Campsite
设置营地位置,上阵哪个英雄,没有回创建营地和位置
func (*MAP_I32_Campsite) ToMsg ¶
func (self *MAP_I32_Campsite) ToMsg() map[int32]*PB.Campsite
func (*MAP_I32_Campsite) UnmarshalBSON ¶
func (self *MAP_I32_Campsite) UnmarshalBSON(data []byte) error
type MAP_I32_Destiny ¶
func (MAP_I32_Destiny) MarshalBSON ¶
func (self MAP_I32_Destiny) MarshalBSON() ([]byte, error)
func (*MAP_I32_Destiny) UnmarshalBSON ¶
func (self *MAP_I32_Destiny) UnmarshalBSON(data []byte) error
type MAP_I32_GodWeapon ¶
func (MAP_I32_GodWeapon) MarshalBSON ¶
func (self MAP_I32_GodWeapon) MarshalBSON() ([]byte, error)
func (*MAP_I32_GodWeapon) UnmarshalBSON ¶
func (self *MAP_I32_GodWeapon) UnmarshalBSON(data []byte) error
type MAP_I32_Tactics ¶
func (MAP_I32_Tactics) MarshalBSON ¶
func (self MAP_I32_Tactics) MarshalBSON() ([]byte, error)
func (*MAP_I32_Tactics) ToMsg ¶
func (self *MAP_I32_Tactics) ToMsg() map[int32]*PB.Tactics
func (*MAP_I32_Tactics) UnmarshalBSON ¶
func (self *MAP_I32_Tactics) UnmarshalBSON(data []byte) error
type MainHero ¶
type MainHero struct { Id int32 //表Id GodWeaponIds []int32 `bson:"god_weapon_ids"` GodWeaponMap MAP_I32_GodWeapon //已激活的神兵 GodWeaponGroup core.Map_I32_Bool //已激活神兵连携 TacticsMap MAP_I32_Tactics //已激活的战法 FClothes int32 // 时装衣服 DestinyLv int32 //天命等级 TitleLv int32 //头衔等级 CampsiteMap MAP_I32_Campsite //营地信息 // contains filtered or unexported fields }
func NewMainHero ¶
func (*MainHero) AddAllProps ¶
func (self *MainHero) AddAllProps()
func (*MainHero) CalcProps2 ¶
func (self *MainHero) CalcProps2(props *PB.ClassAttributeType)
func (*MainHero) GetAtkPower ¶
func (*MainHero) GetProps2other ¶
func (self *MainHero) GetProps2other() *PB.ClassAttributeType
func (*MainHero) ToMsg_BattleMainHero ¶
func (self *MainHero) ToMsg_BattleMainHero() *PB.BattleMainHero
func (*MainHero) ToMsg_BattleSKill ¶
func (self *MainHero) ToMsg_BattleSKill() []*PB.BattleSkill