refactor(fight/item/ai): 重构结构体初始化方式,移除冗余End方法并清理AI_player战斗结束逻辑

This commit is contained in:
1
2025-09-23 16:48:40 +00:00
parent 47fd6da6b2
commit 53d4fafe73
3 changed files with 3 additions and 8 deletions

View File

@@ -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
}

View File

@@ -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
}