`` refactor(fight): 重构战斗初始化逻辑,移除MAXPET字段并优化宠物列表处理方式``

This commit is contained in:
1
2025-10-31 02:24:49 +00:00
parent 4ae06f5695
commit 7bc7776074
3 changed files with 25 additions and 31 deletions

View File

@@ -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) {