diff options
author | Neo2003 <none@none> | 2008-10-06 04:48:59 -0500 |
---|---|---|
committer | Neo2003 <none@none> | 2008-10-06 04:48:59 -0500 |
commit | 1fc5c0d6d7200048009f99c2cb4d3fd12858ed2f (patch) | |
tree | 58895d02973f2387143bc3d1c1e5ecf8a28984fc /src/game/Spell.cpp | |
parent | 010ed993e1a00246dd15df97a3ba6893410d2d3f (diff) |
[svn] * Little fix in RandomMovementGenerator
* Updated to 6731 and 680
--HG--
branch : trunk
rename : 6721-676 => 6731-680
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 7cefcc1de8f..3be0b6989b2 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3681,6 +3681,11 @@ uint8 Spell::CanCast(bool strict) (!m_targets.getItemTarget() || !m_targets.getItemTarget()->GetProto()->LockID || m_targets.getItemTarget()->GetOwner() != m_caster ) )
return SPELL_FAILED_BAD_TARGETS;
+ // In BattleGround players can use only flags and banners
+ if( ((Player*)m_caster)->InBattleGround() &&
+ !((Player*)m_caster)->isAllowUseBattleGroundObject() )
+ return SPELL_FAILED_TRY_AGAIN;
+
// get the lock entry
LockEntry const *lockInfo = NULL;
if (GameObject* go=m_targets.getGOTarget())
|