From fe30fc8bf2066bf3635d35d4ec5a9164e89711c2 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Sun, 21 Mar 2010 18:17:20 +0100 Subject: Securer check for instance template for previous commit --HG-- branch : trunk --- src/game/Spell.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3