From 9b6be90b2bb6bc209820611e84fd5ccfb5f29c5e Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 11 Dec 2017 20:40:32 +0100 Subject: Core/Spells: Fixed shapeshift location check --- src/server/game/Spells/SpellInfo.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/server/game/Spells/SpellInfo.cpp') diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 4dde72f3778..1de54909348 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1835,15 +1835,12 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a switch (effect->ApplyAuraName) { - case SPELL_AURA_FLY: + case SPELL_AURA_MOD_SHAPESHIFT: { - SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id); - for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter) - { - if (skillIter->second->SkillLine == SKILL_MOUNTS) - if (!player->CanFlyInZone(map_id, zone_id)) - return SPELL_FAILED_INCORRECT_AREA; - } + if (SpellShapeshiftFormEntry const* spellShapeshiftForm = sSpellShapeshiftFormStore.LookupEntry(effect->MiscValue)) + if (uint32 mountType = spellShapeshiftForm->MountTypeID) + if (!player->GetMountCapability(mountType)) + return SPELL_FAILED_NOT_HERE; break; } case SPELL_AURA_MOUNTED: -- cgit v1.2.3