Core: Random cleanup + compile fix

This commit is contained in:
Shauren
2012-02-23 13:01:16 +01:00
parent dbd8cbcfc4
commit dc28b92415
20 changed files with 114 additions and 113 deletions
+3 -1
View File
@@ -295,8 +295,10 @@ void ArenaTeam::SetCaptain(uint64 guid)
if (newCaptain)
{
newCaptain->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 0);
char const* oldCaptainName = oldCaptain ? oldCaptain->GetName() : "";
uint32 oldCaptainLowGuid = oldCaptain ? oldCaptain->GetGUIDLow() : 0;
sLog->outArena("Player: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team [Id: %u] [Type: %u].",
oldCaptain->GetName(), oldCaptain->GetGUIDLow(), newCaptain->GetName(), newCaptain->GetGUIDLow(), GetId(), GetType());
oldCaptainName, oldCaptainLowGuid, newCaptain->GetName(), newCaptain->GetGUIDLow(), GetId(), GetType());
}
}
@@ -1032,17 +1032,18 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
std::vector<uint64> ghost_list = m_ReviveQueue[BgCreatures[node]];
if (!ghost_list.empty())
{
Player* player;
WorldSafeLocsEntry const* ClosestGrave = NULL;
Player* waitingPlayer; // player waiting at graveyard for resurrection
WorldSafeLocsEntry const* closestGrave = NULL;
for (std::vector<uint64>::iterator itr = ghost_list.begin(); itr != ghost_list.end(); ++itr)
{
player = ObjectAccessor::FindPlayer(*ghost_list.begin());
if (!player)
waitingPlayer = ObjectAccessor::FindPlayer(*ghost_list.begin());
if (!waitingPlayer)
continue;
if (!ClosestGrave)
ClosestGrave = GetClosestGraveYard(player);
if (!closestGrave)
closestGrave = GetClosestGraveYard(waitingPlayer);
else
player->TeleportTo(GetMapId(), ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, player->GetOrientation());
waitingPlayer->TeleportTo(GetMapId(), closestGrave->x, closestGrave->y, closestGrave->z, player->GetOrientation());
}
m_ReviveQueue[BgCreatures[node]].clear();
}