feat(Core/Misc): implement ObjectGuid class (port from TC) (#4885)

This commit is contained in:
UltraNix
2021-04-25 22:18:03 +02:00
committed by GitHub
parent 91081f4ad8
commit f4c226423d
568 changed files with 10655 additions and 11019 deletions

View File

@@ -886,13 +886,13 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
GraveyardStatus[i] = Source->GetTeamId();
// Those who are waiting to resurrect at this node are taken to the closest own node's graveyard
std::vector<uint64> ghost_list = m_ReviveQueue[BgCreatures[BG_SA_MAXNPC + i]];
GuidVector& ghost_list = m_ReviveQueue[BgCreatures[BG_SA_MAXNPC + i]];
if (!ghost_list.empty())
{
GraveyardStruct const* ClosestGrave = nullptr;
for (std::vector<uint64>::const_iterator itr = ghost_list.begin(); itr != ghost_list.end(); ++itr)
for (ObjectGuid const guid : ghost_list)
{
Player* player = ObjectAccessor::FindPlayer(*itr);
Player* player = ObjectAccessor::FindPlayer(guid);
if (!player)
continue;
@@ -902,8 +902,9 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
if (ClosestGrave)
player->TeleportTo(GetMapId(), ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, player->GetOrientation());
}
// xinef: clear resurrect queue for this creature
m_ReviveQueue[BgCreatures[BG_SA_MAXNPC + i]].clear();
ghost_list.clear();
}
DelCreature(BG_SA_MAXNPC + i);