aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-10 01:00:22 -0600
committermegamage <none@none>2009-02-10 01:00:22 -0600
commitba7a8cc836d614f98f5284205c6504aba4a16067 (patch)
treeaa4e92e31572baf8e8041e2b7d079cbad2e59b39 /src/game/Spell.cpp
parentfe85f521424656dedfb2fa189987be7ccb304ee7 (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.cpp3
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)