[7253] Check battleground status in GetSpellAllowedInLocationError for some spells for aura remove and spell casting cases.

This commit is contained in:
VladimirMangos 2009-02-09 15:36:54 +03:00
parent 100429f29c
commit e97c7ad9c5
6 changed files with 41 additions and 12 deletions

View file

@ -18935,7 +18935,7 @@ void Player::UpdateAreaDependentAuras( uint32 newArea )
for(AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
{
// use m_zoneUpdateId for speed: UpdateArea called from UpdateZone or instead UpdateZone in both cases m_zoneUpdateId up-to-date
if(GetSpellAllowedInLocationError(iter->second->GetSpellProto(),GetMapId(),m_zoneUpdateId,newArea)!=0)
if(GetSpellAllowedInLocationError(iter->second->GetSpellProto(),GetMapId(),m_zoneUpdateId,newArea,GetBattleGroundId())!=0)
RemoveAura(iter);
else
++iter;