This commit is contained in:
aozhiwei 2023-10-14 16:30:32 +08:00
parent 3f1338cc7f
commit 321765334f
2 changed files with 4 additions and 1 deletions

View File

@ -16,6 +16,7 @@
#include "human.h"
#include "btcoroutine.h"
#include "btcontext.h"
#include "team.h"
#include "mt/Hero.h"
#include "mt/Equip.h"
@ -46,8 +47,9 @@ void HeroAgent::Exec()
void HeroAgent::SetOwner(Creature* owner)
{
room_agent = owner->room->GetRoomAgent();
owner_ = owner;
room_agent = owner_->room->GetRoomAgent();
team_agent = owner_->GetTeam()->GetTeamAgent();
}
int HeroAgent::GetUniId()

View File

@ -60,6 +60,7 @@ class Team
void IncKillCount();
int GetKillCount();
long long GetLastKillFrameNo() { return last_kill_frameno_; }
TeamAgent* GetTeamAgent() { return team_agent_; }
private:
int team_id_ = 0;