diff --git a/server/matchserver/global/global.go b/server/matchserver/global/global.go index cf54b503..0332a753 100644 --- a/server/matchserver/global/global.go +++ b/server/matchserver/global/global.go @@ -32,6 +32,10 @@ func GetTeamMgr() common.TeamMgr { return teamMgr } +func GetHistoryMgr() common.HistoryMgr { + return historyMgr +} + func GetWspListener() common.WspListener { return wspListener } diff --git a/server/matchserver/team/team.go b/server/matchserver/team/team.go index f5775a09..78371510 100644 --- a/server/matchserver/team/team.go +++ b/server/matchserver/team/team.go @@ -7,6 +7,7 @@ import ( "main/mt" "main/common" "main/constant" + . "main/global" "fmt" "sort" @@ -427,6 +428,9 @@ func (this *team) genStartGameInfo() { ele2.AccountId = m.GetAccountId() ele2.SpecSkill = m.GetSpecSkill() ele2.HeroUniId = m.GetHeroUniid() + GetHistoryMgr().AddBattle(m.GetAccountId(), + this.mapInfo.MapId, + q5.SafeToInt32(this.mapInfo.ModeId)) } if this.IsMobaMode() { robotIdx := 0