diff options
author | Machiavelli <none@none> | 2010-03-21 18:17:20 +0100 |
---|---|---|
committer | Machiavelli <none@none> | 2010-03-21 18:17:20 +0100 |
commit | fe30fc8bf2066bf3635d35d4ec5a9164e89711c2 (patch) | |
tree | 601401f2016e1262ade6767b716aa0d7d32b14fd /src | |
parent | 48051d1cd6e026c3b397e6719a61e16d1f8fa581 (diff) |
Securer check for instance template for previous commit
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Spell.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 188864933d0..6a5b6b0ad10 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -5315,7 +5315,11 @@ SpellCastResult Spell::CheckCast(bool strict) return SPELL_FAILED_NO_MOUNTS_ALLOWED; // Ignore map check if spell have AreaId. AreaId already checked and this prevent special mount spells - if (m_caster->GetTypeId() == TYPEID_PLAYER && !objmgr.GetInstanceTemplate(m_caster->GetMapId())->allowMount && !m_IsTriggeredSpell && !m_spellInfo->AreaGroupId) + bool AllowMount = !m_caster->GetMap()->IsDungeon(); + InstanceTemplate const *it = objmgr.GetInstanceTemplate(m_caster->GetMapId()); + if (it) + AllowMount = it->allowMount; + if (m_caster->GetTypeId() == TYPEID_PLAYER && !AllowMount && !m_IsTriggeredSpell && !m_spellInfo->AreaGroupId) return SPELL_FAILED_NO_MOUNTS_ALLOWED; ShapeshiftForm form = m_caster->m_form; |