diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 6c534b8f1e5..83b23b7d523 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1944,14 +1944,10 @@ class spell_gen_mount : public SpellScriptLoader target->RemoveAurasByType(SPELL_AURA_MOUNTED, ObjectGuid::Empty, GetHitAura()); // Triggered spell id dependent on riding skill and zone - bool canFly = false; - uint32 map = GetVirtualMapForMapAndZone(target->GetMapId(), target->GetZoneId()); - if (map == 530 || (map == 571 && target->HasSpell(SPELL_COLD_WEATHER_FLYING))) - canFly = true; - - AreaTableEntry const* area = sAreaTableStore.LookupEntry(target->GetAreaId()); - if (!area || (canFly && (area->flags & AREA_FLAG_NO_FLY_ZONE))) - canFly = false; + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(_mount150); + uint32 zoneid, areaid; + target->GetZoneAndAreaId(zoneid, areaid); + bool const canFly = spellInfo && (spellInfo->CheckLocation(target->GetMapId(), zoneid, areaid, target) == SPELL_CAST_OK); uint32 mount = 0; switch (target->GetBaseSkillValue(SKILL_RIDING)) |