feat(fight): 调整技能效果命中逻辑与回合开始处理 - 修改了技能效果命中的判定顺序,确保暴击计算在效果添加之前执行 - 修复了回合开始时敌我双方状态结算的上下文错误 - 优化了效果缓存初始化逻辑,避免重复添加相同效果 - 增加了效果去重判断,防止完全相同的效果被重复添加 - 调整了战斗循环中结束逻辑的位置,确保广播和通道关闭正确执行 - 更新了部分日志提示信息,使其更符合实际业务含义 - 移除了部分无用代码和注释,提高
24 lines
1.3 KiB
Go
24 lines
1.3 KiB
Go
package pet
|
||
|
||
import "blazing/logic/service/player"
|
||
|
||
// PetBargeListInboundInfo 对应Java的PetBargeListInboundInfo,实现InboundMessage接口
|
||
type PetBargeListInboundInfo struct {
|
||
Head player.TomeeHeader `cmd:"2309" struc:"[0]pad"`
|
||
StartPetId uint32 `description:"开始精灵id" codec:"startPetId"` // @UInt long 对应Go的uint32(无符号64位)
|
||
EndPetId uint32 `description:"结束精灵id" codec:"endPetId"` // 字段标签模拟注解功能(描述、编解码标识)
|
||
}
|
||
|
||
// PetBargeListInfo 对应Java的PetBargeListInfo类
|
||
type PetBargeListInfo struct {
|
||
PetId uint32 `description:"精灵ID"` // @UInt long 对应Go的uint32(无符号64位整数)
|
||
EnCntCnt uint32 `description:"未知"` // public字段在Go中通过首字母大写导出
|
||
IsCatched uint32 `description:"捕获记录"` // 结构体标签模拟@FieldDescription注解
|
||
IsKilled uint32 `description:"击杀记录"` // 字段名采用帕斯卡命名法(首字母大写)以匹配Java的public访问权限
|
||
}
|
||
type PetBargeListOutboundInfo struct {
|
||
// 对应Java的List<PetBargeListInfo>,Go中用切片+指针实现动态列表
|
||
PetBargeListLen uint32 `struc:"sizeof=PetBargeList"`
|
||
PetBargeList []PetBargeListInfo `description:"返回的精灵信息" codec:"petBargeList"`
|
||
}
|