feat(fight): 优化精灵切换广播逻辑并清理切换队列
This commit is contained in:
@@ -562,14 +562,13 @@ func (f *FightC) enterturn(fattack, sattack BattleActionI) {
|
||||
|
||||
f.Broadcast(func(ff *input.Input) {
|
||||
for _, v := range f.Switch {
|
||||
if ff.Player.ID() != v.PlayerID{
|
||||
if ff.Player.ID() != v.PlayerID {
|
||||
ff.Player.SendChangePet(v.Reason)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
f.Switch = []*ActiveSwitchAction{}
|
||||
ff.Player.SendAttackValue(ret)
|
||||
})
|
||||
f.Switch = []*ActiveSwitchAction{}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user