fix(Core/Graveyard): prevent non-death knights from getting ported to… (#8206)

This commit is contained in:
Skjalf
2021-10-07 08:07:23 -03:00
committed by GitHub
parent c358bd5f79
commit 29c94e5455
7 changed files with 41 additions and 19 deletions

View File

@@ -4782,7 +4782,7 @@ void Player::RepopAtGraveyard()
if (sBattlefieldMgr->GetBattlefieldToZoneId(GetZoneId()))
ClosestGrave = sBattlefieldMgr->GetBattlefieldToZoneId(GetZoneId())->GetClosestGraveyard(this);
else
ClosestGrave = sGraveyard->GetClosestGraveyard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeamId());
ClosestGrave = sGraveyard->GetClosestGraveyard(this, GetTeamId());
}
// stop countdown until repop
@@ -10502,7 +10502,7 @@ void Player::SetEntryPoint()
if (GetMap()->IsDungeon())
{
if (const GraveyardStruct* entry = sGraveyard->GetClosestGraveyard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeamId()))
if (const GraveyardStruct* entry = sGraveyard->GetClosestGraveyard(this, GetTeamId()))
m_entryPointData.joinPos = WorldLocation(entry->Map, entry->x, entry->y, entry->z, 0.0f);
}
else if (!GetMap()->IsBattlegroundOrArena())