1
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-02-07 04:10:01 +08:00
parent 6316b393af
commit d312dfc791
4 changed files with 7 additions and 7 deletions

View File

@@ -5,7 +5,6 @@ import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/player"
"github.com/jinzhu/copier"
)
@@ -169,9 +168,7 @@ func (f *FightC) startBattle(startInfo info.FightStartOutboundInfo) {
// 通知双方玩家准备完成,即将开始战斗
ff.Player.SendPackCmd(2504, &startInfo)
if _, ok := ff.Player.(*player.AI_player); ok {
ff.GetAction()
}
})
})

View File

@@ -378,7 +378,7 @@ func (f *FightC) enterturn(firstAttack, secondAttack *action.SelectSkillAction)
if f.Info.Status == info.BattleMode.FIGHT_WITH_NPC {
// println("AI出手")
f.Opp.GetAction()
go f.Opp.GetAction()
}

View File

@@ -44,7 +44,10 @@ func (f *FightC) battleLoop() {
ourID := f.Our.Player.GetInfo().UserID
oppID := f.Opp.Player.GetInfo().UserID
//fmt.Println("开始收集玩家动作", waitr)
if f.Info.Status == info.BattleMode.FIGHT_WITH_NPC {
go f.Opp.GetAction()
}
for !f.closefight {
f.Round++
@@ -211,7 +214,7 @@ func (f *FightC) collectPlayerActions(ourID, oppID uint32) map[uint32]action.Bat
f.Switch = make(map[uint32]*action.ActiveSwitchAction)
f.Our.Player.SendPackCmd(2407, &ret.Reason)
//println("AI出手死切")
f.Opp.GetAction() //boss出手后获取出招
go f.Opp.GetAction() //boss出手后获取出招
}
continue

View File

@@ -244,7 +244,7 @@ func (p *ClientData) SendPack(b []byte) error {
}
} else {
_, err := p.Conn.Write(b)
err := p.Conn.AsyncWrite(b, nil)
if err != nil {
glog.Debug(context.Background(), err)