[12153] Remove unneeded InBattleGround() as it is already checked by GetBattleGround()

Also call OutdoorPvP handlers before instance script ones
This commit is contained in:
stfx 2012-08-29 01:10:19 +02:00 committed by Antz
parent a53ac2aca7
commit c8814791e1
5 changed files with 15 additions and 19 deletions

View file

@ -735,14 +735,12 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data)
return;
}
if (pl->InBattleGround())
if (BattleGround* bg = pl->GetBattleGround())
{
if (BattleGround* bg = pl->GetBattleGround())
bg->HandleAreaTrigger(pl, Trigger_ID);
bg->HandleAreaTrigger(pl, Trigger_ID);
return;
}
if (OutdoorPvP* outdoorPvP = sOutdoorPvPMgr.GetScript(pl->GetCachedZoneId()))
else if (OutdoorPvP* outdoorPvP = sOutdoorPvPMgr.GetScript(pl->GetCachedZoneId()))
{
if (outdoorPvP->HandleAreaTrigger(pl, Trigger_ID))
return;