diff --git a/logic/controller/fight.go b/logic/controller/fight.go index d28870528..c721a3e72 100644 --- a/logic/controller/fight.go +++ b/logic/controller/fight.go @@ -92,7 +92,7 @@ func (h Controller) OnPlayerHandleFightInvite(data *fight.HandleFightInviteInbou // 邀请其他人进行战斗 func (h Controller) OnPlayerInviteOtherFight(data *fight.InviteToFightInboundInfo, c *player.Player) (result *fight.NullOutboundInfo, err errorcode.ErrorCode) { - c.InvitePlayerToBattle(&info.PVPinfo{data.UserID, data.Mode}) + c.InvitePlayerToBattle(&info.PVPinfo{PlayerID: data.UserID, Mode: data.Mode}) return nil, 0 } diff --git a/logic/controller/item.go b/logic/controller/item.go index d08e2461d..143122684 100644 --- a/logic/controller/item.go +++ b/logic/controller/item.go @@ -28,6 +28,6 @@ func (h Controller) PlayerGoldCount(data *item.GoldOnlineRemainInboundInfo, c *p return &item.GoldOnlineRemainOutboundInfo{ - uint32(c.Info.GoldBean) * 100, + GoldNumber: uint32(c.Info.GoldBean) * 100, }, 0 } diff --git a/logic/service/player/ai.go b/logic/service/player/ai.go index 14b24eb5a..5f8086cc2 100644 --- a/logic/service/player/ai.go +++ b/logic/service/player/ai.go @@ -13,7 +13,6 @@ type AI_player struct { CanCapture bool } - func (f *AI_player) SendPack(b []byte) error { return nil @@ -31,6 +30,7 @@ func (f *AI_player) SendNoteReadyToFightInfo(fs info.NoteReadyToFightInfo) { } func (f *AI_player) SendFightEndInfo(_ info.FightOverInfo) { + f.FightC = nil //fmt.Println("战斗结束") } @@ -38,11 +38,6 @@ func (f *AI_player) GetAction() { //使用1#技能,实际上要按照四个技能权重去使用 f.FightC.UseSkill(f, int32(f.FightC.GetCurrPET(f).Skills[0].ID)) } -func (p *AI_player) End() { - p.FightC = nil - - return -} func (p *AI_player) GetPetInfo() []model.PetInfo {