fix(fight): 修复空变更提交问题

This commit is contained in:
1
2025-11-09 03:06:18 +00:00
parent f3c5a5106c
commit d304955ffa
3 changed files with 38 additions and 2 deletions

View File

@@ -85,7 +85,7 @@ func (c *Input) GetEffect(etype EnumEffectType, id int) Effect {
}
func (c *Input) StatEffect_Exist(id int) bool {
for _, v := range c.Effects {
if v.ID() == id && v.Alive() {
if v.ID()+int(EffectType.Status) == id && v.Alive() {
return true
}
@@ -93,7 +93,16 @@ func (c *Input) StatEffect_Exist(id int) bool {
return false
}
func (c *Input) StatEffect_Exist_all() bool {
for _, v := range c.Effects {
if v.ID() >= int(EffectType.Status) && v.ID() < int(EffectType.Sub) && v.Alive() {
return true
}
}
return false
}
func (c *Input) GetCurrAttr(id int) *model.PetInfo {
//todo 获取前GetEffect