```
refactor(common): 统一使用 common.TomeeHeader 替代 player.TomeeHeader 将多处
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"blazing/logic/service/fight/action"
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/logic/service/fight/input"
|
||||
"blazing/logic/service/player"
|
||||
"context"
|
||||
"log"
|
||||
|
||||
@@ -87,7 +86,7 @@ func (f *FightC) ChangePet(c common.PlayerI, id uint32) {
|
||||
|
||||
f.Broadcast(func(ff *input.Input) { //先给自身广播
|
||||
if ff.Player.GetInfo().UserID == c.GetInfo().UserID {
|
||||
ff.Player.SendPackCmd(2407, ret.Reason)
|
||||
ff.Player.SendPackCmd(2407, &ret.Reason)
|
||||
}
|
||||
|
||||
})
|
||||
@@ -203,9 +202,8 @@ func (f *FightC) handleNPCFightSpecial(startInfo *info.FightStartOutboundInfo) {
|
||||
if catchRate > 0 {
|
||||
startInfo.Info2.Catchable = 1 // 标记为可捕捉
|
||||
// 标记AI对手允许被捕捉(类型断言确保安全)
|
||||
if oppAI, ok := f.Opp.Player.(*player.AI_player); ok {
|
||||
oppAI.CanCapture = true
|
||||
}
|
||||
f.Opp.CanCapture = true
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +218,7 @@ func (f *FightC) startBattle(startInfo info.FightStartOutboundInfo) {
|
||||
|
||||
// 通知双方玩家准备完成,即将开始战斗
|
||||
|
||||
ff.Player.SendPackCmd(2504, startInfo)
|
||||
ff.Player.SendPackCmd(2504, &startInfo)
|
||||
})
|
||||
|
||||
// 标记战斗已启动(原注释逻辑)
|
||||
|
||||
Reference in New Issue
Block a user