void BattleGroundWS::RemovePlayer(Player *plr, uint64 guid) { // sometimes flag aura not removed :( if (IsAllianceFlagPickedup() && m_FlagKeepers[BG_TEAM_ALLIANCE] == guid) { if (!plr) { sLog.outError("BattleGroundWS: Removing offline player who has the FLAG!!"); SetAllianceFlagPicker(0); RespawnFlag(ALLIANCE, false); } else EventPlayerDroppedFlag(plr); } if (IsHordeFlagPickedup() && m_FlagKeepers[BG_TEAM_HORDE] == guid) { if (!plr) { sLog.outError("BattleGroundWS: Removing offline player who has the FLAG!!"); SetHordeFlagPicker(0); RespawnFlag(HORDE, false); } else EventPlayerDroppedFlag(plr); } }
void BattlegroundWS::RemovePlayer(Player* player, uint64 guid, uint32 /*team*/) { // sometimes flag aura not removed :( if (IsAllianceFlagPickedup() && m_FlagKeepers[TEAM_ALLIANCE] == guid) { if (!player) { TC_LOG_ERROR("bg.battleground", "BattlegroundWS: Removing offline player who has the FLAG!!"); SetAllianceFlagPicker(0); RespawnFlag(ALLIANCE, false); } else EventPlayerDroppedFlag(player); } if (IsHordeFlagPickedup() && m_FlagKeepers[TEAM_HORDE] == guid) { if (!player) { TC_LOG_ERROR("bg.battleground", "BattlegroundWS: Removing offline player who has the FLAG!!"); SetHordeFlagPicker(0); RespawnFlag(HORDE, false); } else EventPlayerDroppedFlag(player); } }
void BattleGroundWS::RemovePlayer(Player* plr, ObjectGuid guid) { // sometimes flag aura not removed :( if (IsAllianceFlagPickedUp() && m_flagCarrierAlliance == guid) { if (!plr) { sLog.outError("BattleGroundWS: Removing offline player who has the FLAG!!"); ClearAllianceFlagCarrier(); RespawnFlag(ALLIANCE, false); } else EventPlayerDroppedFlag(plr); } if (IsHordeFlagPickedUp() && m_flagCarrierHorde == guid) { if (!plr) { sLog.outError("BattleGroundWS: Removing offline player who has the FLAG!!"); ClearHordeFlagCarrier(); RespawnFlag(HORDE, false); } else EventPlayerDroppedFlag(plr); } }
void BattlegroundEY::RemovePlayer(Player* plr, uint64 guid, uint32 /*team*/) { // sometimes flag aura not removed :( for(int j = EY_POINTS_MAX; j >= 0; --j) { for(size_t i = 0; i < m_PlayersNearPoint[j].size(); ++i) if(m_PlayersNearPoint[j][i] == guid) { m_PlayersNearPoint[j].erase(m_PlayersNearPoint[j].begin() + i); break; } } if(IsFlagPickedup()) { if(m_FlagKeeper == guid) { if(plr) EventPlayerDroppedFlag(plr); else { SetFlagPicker(0); RespawnFlag(true); } } } }
void BattleGroundBG::HandleKillPlayer(Player* player, Player* killer) { if (GetStatus() != STATUS_IN_PROGRESS) return; BattleGround::HandleKillPlayer(player, killer); EventPlayerDroppedFlag(player); }
void BattlegroundEY::HandleKillPlayer(Player* pPlayer, Player* pKiller) { if(GetStatus() != STATUS_IN_PROGRESS) return; Battleground::HandleKillPlayer(pPlayer, pKiller); EventPlayerDroppedFlag(pPlayer); }
void BattleGroundEY::RemovePlayer(Player* plr, ObjectGuid guid) { // sometimes flag aura not removed :( if (IsFlagPickedUp()) { if (m_flagCarrier == guid) { if (plr) EventPlayerDroppedFlag(plr); else { ClearFlagCarrier(); RespawnFlag(); } } } }
void BattlegroundEY::RemovePlayer(Player* player, uint64 guid, uint32 /*team*/) { if (!player) return; for (uint8 i = 0; i < EY_POINTS_MAX; ++i) { if (!m_PlayersNearPoint[i].empty()) { uint8 j = 0; while (j < m_PlayersNearPoint[i].size()) { Player* player = ObjectAccessor::FindPlayer(m_PlayersNearPoint[i][j]); if (!player) { ++j; continue; } if (player->GetGUID() == guid) { m_PlayersNearPoint[i].erase(m_PlayersNearPoint[i].begin() + j); break; } else ++j; } } } if (IsFlagPickedup()) { if (m_FlagKeeper == guid) { if (player) EventPlayerDroppedFlag(player); else { SetFlagPicker(0); RespawnFlag(true); } } } }
void BattleGroundAC::RemovePlayer(Player *plr, ObjectGuid guid) { // sometimes flag aura not removed :( for (int j = BG_AC_NODES_MAX; j >= 0; --j) { for(size_t i = 0; i < m_PlayersNearPoint[j].size(); ++i) if (m_PlayersNearPoint[j][i] == guid) m_PlayersNearPoint[j].erase(m_PlayersNearPoint[j].begin() + i); } if (IsFlagPickedup()) { if (m_FlagKeeper == guid) { if (plr) EventPlayerDroppedFlag(plr); else { ClearFlagPicker(); RespawnFlag(true); } } } }