This commit is contained in:
@@ -158,6 +158,7 @@ func (f *FightC) collectPlayerActions(ourID, oppID uint32) map[uint32]action.Bat
|
||||
}
|
||||
|
||||
pid := paction.GetPlayerID()
|
||||
|
||||
if pid != ourID && pid != oppID {
|
||||
continue
|
||||
}
|
||||
@@ -167,6 +168,7 @@ func (f *FightC) collectPlayerActions(ourID, oppID uint32) map[uint32]action.Bat
|
||||
// }
|
||||
selfinput := f.GetInputByAction(paction, false)
|
||||
if ret, ok := paction.(*action.ActiveSwitchAction); ok {
|
||||
// println("玩家执行切换精灵动作:", pid, ret.Cid)
|
||||
//正常结束可以切换,以及死切后还能再切一次
|
||||
if selfinput.CanChange == 0 {
|
||||
if selfinput.CurrentPet.Info.Hp > 0 { //非死亡切换
|
||||
@@ -211,8 +213,8 @@ func (f *FightC) collectPlayerActions(ourID, oppID uint32) map[uint32]action.Bat
|
||||
if f.Info.Status == info.BattleMode.FIGHT_WITH_NPC && pid == 0 {
|
||||
f.Switch = make(map[uint32]*action.ActiveSwitchAction)
|
||||
f.Our.Player.SendPackCmd(2407, &ret.Reason)
|
||||
println("AI出手死切")
|
||||
go f.Our.GetAction() //boss出手后获取出招
|
||||
//println("AI出手死切")
|
||||
f.Opp.GetAction() //boss出手后获取出招
|
||||
|
||||
}
|
||||
continue
|
||||
@@ -222,9 +224,10 @@ func (f *FightC) collectPlayerActions(ourID, oppID uint32) map[uint32]action.Bat
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
println("玩家执行释放技能动作:", pid, paction.(*action.SelectSkillAction).Info.ID)
|
||||
if selfinput.CurrentPet.Info.Hp <= 0 { //0血执行非切换动作
|
||||
//todo 记录异常操作
|
||||
println("玩家执行了异常操作,当前精灵血量为0,不能执行非切换动作", pid)
|
||||
continue
|
||||
}
|
||||
if selfinput.CanChange == 1 { //非被动死亡情况下,不能执行额外动作,0允许切,2是死亡,可以额外动作
|
||||
|
||||
Reference in New Issue
Block a user