`` refactor(fight): 重构战斗初始化逻辑,移除MAXPET字段并优化宠物列表处理方式``
This commit is contained in:
@@ -54,21 +54,15 @@ func (i *Input) GetPetInfo() *info.BattlePetEntity {
|
||||
|
||||
return i.CurrentPet
|
||||
|
||||
}
|
||||
func (i *Input) ResetAttackValue() {
|
||||
i.AttackValue.SkillID = 0
|
||||
|
||||
}
|
||||
|
||||
// 这个每回合都会调用
|
||||
func (i *Input) InitAttackValue() {
|
||||
var old *info.AttackValue
|
||||
if i.AttackValue != nil {
|
||||
old = i.AttackValue
|
||||
|
||||
}
|
||||
i.AttackValue = info.NewAttackValue(i.Player.GetInfo().UserID)
|
||||
if old != nil {
|
||||
i.AttackValue.Prop = old.Prop
|
||||
i.AttackValue.Status = old.Status
|
||||
i.AttackValue.SkillList = old.SkillList
|
||||
}
|
||||
|
||||
}
|
||||
func (i *Input) GetPet(id uint32) (ii *info.BattlePetEntity, Reason info.ChangePetInfo) {
|
||||
|
||||
Reference in New Issue
Block a user