修改广播逻辑
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user