fix(map): 修复玩家离开地图时 Canmon 状态重置问题

修复了在玩家调用 MapList 接口时错误地将 Canmon 设置为 0 的逻辑
问题导致玩家状态异常,现已修正为正确的行为

---

fix(fight): 修复战斗中宠物死亡判断逻辑

在 NewSeIdx_9 战斗脚本中增加对当前宠物血量是否为 0 的检查
避免在宠物已死亡的情况下继续执行后续战斗逻辑,防止异常行为

---

refactor(pet): 优化宠物技能效果添加逻辑

移除冗余的 Effect 查找过程,简化为通过 HaveAN 判断是否存在技能
This commit is contained in:
2025-12-09 18:49:36 +08:00
parent 904da1bede
commit a000d78625
3 changed files with 11 additions and 7 deletions

View File

@@ -51,7 +51,7 @@ func (h *Controller) MapLeave(data *maps.LeaveMapInboundInfo, c *player.Player)
}
func (h *Controller) MapList(data *maps.ListMapPlayerInboundInfo, c *player.Player) (result *info.ListMapPlayerOutboundInfo, err errorcode.ErrorCode) { //这个时候player应该是空的
atomic.StoreUint32(&c.Canmon, 2)
atomic.StoreUint32(&c.Canmon, 0)
if atomic.LoadUint32(&c.GetSpace().TimeBoss.Flag) == 1 {
defer c.SendPackCmd(2022, &c.GetSpace().TimeBoss)
}