diff options
author | ariel- <ariel-@users.noreply.github.com> | 2016-12-29 02:43:02 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2016-12-29 02:43:02 -0300 |
commit | 0bb1c03fbf3d2253d18873600cfb10d2f54825c6 (patch) | |
tree | bad81ba063e2dad75c48d16e0e05fc571f149943 /src | |
parent | 29827855d06bb41dd2109fc36935fc84925eb094 (diff) |
Core/Scripts: fixed ground/fly mounts on non-flyable zones of Outland map
Closes #18627
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)) |