修改广播逻辑

This commit is contained in:
1
2025-11-18 20:52:04 +00:00
parent 4ab6b726a7
commit 6c32a5d7ac
19 changed files with 100 additions and 218 deletions

View File

@@ -87,7 +87,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.SendChangePet(ret.Reason)
ff.Player.SendPackCmd(2407, ret.Reason)
}
})
@@ -216,9 +216,12 @@ func (f *FightC) startBattle(startInfo info.FightStartOutboundInfo) {
log.Panic(context.Background(), "战斗循环提交失败", "error", err)
}
// 通知双方玩家准备完成,即将开始战斗
f.Our.Player.SendReadyToFightInfo(startInfo)
f.Opp.Player.SendReadyToFightInfo(startInfo)
f.Broadcast(func(ff *input.Input) {
// 通知双方玩家准备完成,即将开始战斗
ff.Player.SendPackCmd(2504, startInfo)
})
// 标记战斗已启动(原注释逻辑)
// f.running = true