refactor: 重构战斗接口以分离控制器和绑定逻辑
This commit is contained in:
@@ -85,7 +85,7 @@ func (h Controller) GroupEscape(data *GroupEscapeInboundInfo, c *player.Player)
|
||||
if h.relayRemoteFightCommand(c, data.Head.CMD, data) {
|
||||
return nil, -1
|
||||
}
|
||||
if fightC, ok := c.FightC.(*fight.FightC); ok && fightC != nil && fightC.LegacyGroupProtocol {
|
||||
if fightC, ok := c.GetFightController().(*fight.FightC); ok && fightC != nil && fightC.LegacyGroupProtocol {
|
||||
fightC.SendLegacyEscapeSuccess(c, int(data.ActorIndex))
|
||||
}
|
||||
h.dispatchFightActionEnvelope(c, fight.NewEscapeActionEnvelope())
|
||||
|
||||
@@ -12,7 +12,7 @@ func (h Controller) relayRemoteFightCommand(c *player.Player, cmd uint32, data a
|
||||
if c == nil || c.FightC == nil || cmd == 0 {
|
||||
return false
|
||||
}
|
||||
remote, ok := c.FightC.(*pvp.RemoteFightProxy)
|
||||
remote, ok := c.GetFightController().(*pvp.RemoteFightProxy)
|
||||
if !ok || remote == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user