diff options
author | megamage <none@none> | 2009-02-10 01:00:22 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-10 01:00:22 -0600 |
commit | ba7a8cc836d614f98f5284205c6504aba4a16067 (patch) | |
tree | aa4e92e31572baf8e8041e2b7d079cbad2e59b39 /src/game/Spell.cpp | |
parent | fe85f521424656dedfb2fa189987be7ccb304ee7 (diff) |
[7253] Check battleground status in GetSpellAllowedInLocationError for some spells for aura remove and spell casting cases. Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index c4ed955e450..1f829f763f6 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3774,7 +3774,8 @@ uint8 Spell::CanCast(bool strict) return SPELL_FAILED_NOT_IN_ARENA; // zone check - if(uint8 res= GetSpellAllowedInLocationError(m_spellInfo,m_caster->GetMapId(),m_caster->GetZoneId(),m_caster->GetAreaId())) + if (uint8 res= GetSpellAllowedInLocationError(m_spellInfo,m_caster->GetMapId(),m_caster->GetZoneId(),m_caster->GetAreaId(), + m_caster->GetTypeId()==TYPEID_PLAYER ? ((Player*)m_caster)->GetBattleGroundId() : 0)) return res; // not let players cast spells at mount (and let do it to creatures) |