mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 23:26:23 +00:00
feat(Core/Misc): implement ObjectGuid class (port from TC) (#4885)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user