feat(fight): 调整战斗逻辑与精灵切换机制

- 优化精灵切换时的效果处理,增加切换事件支持
- 修复战斗中超时逻辑和技能CD计算问题
- 增强状态效果在精灵上下场时的清理机制
- 修改伤害计算逻辑以提高准确性
- 更新战斗池初始化参数提升并发性能

此外,同步更新了宠物放生字段命名及逻辑处理方式,并调整网络通信中的限流策略。
```
This commit is contained in:
2025-11-13 02:43:00 +08:00
parent 45911dd23d
commit f281b949ba
24 changed files with 201 additions and 105 deletions

View File

@@ -2,7 +2,6 @@ package socket
import (
"context"
"fmt"
"log"
"net"
"os"
@@ -58,7 +57,7 @@ func (s *Server) OnClose(c gnet.Conn, err error) (action gnet.Action) {
// 防护逻辑:临时封禁异常 IP可扩展为 IP 黑名单)
// go s.tempBlockIP(remoteIP, 5*time.Minute)
}
fmt.Println(err, c.RemoteAddr().String(), "断开连接")
//fmt.Println(err, c.RemoteAddr().String(), "断开连接")
atomic.AddInt64(&s.connected, -1)
//logging.Infof("conn[%v] disconnected", c.RemoteAddr().String())