void BattleGround::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPacket)
{
// Remove from lists/maps
....
Player *plr = objmgr.GetPlayer(guid);
if(plr && !plr->isAlive()) // resurrect on exit
{
plr->ResurrectPlayer(1.0f);
plr->SpawnCorpseBones();
}
RemovePlayer(plr, guid); // BG subclass specific code
^^^^^^^^^^^^^^^^^
....
void BattleGroundEY::RemovePlayer(Player *plr, uint64 guid)
{
// sometimes flag aura not removed
for (int j = EY_POINTS_MAX; j >= 0; --j)
{
for(int 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)
this->EventPlayerDroppedFlag(plr);
^^^^^^^^^^^^^^^^^^^^^^
else
{
SetFlagPicker(0);
RespawnFlag(true);
}
}
}
}