Core/Scripts: fixed ground/fly mounts on non-flyable zones of Outland map

Closes #18627
This commit is contained in:
ariel-
2016-12-29 02:43:02 -03:00
parent 29827855d0
commit 0bb1c03fbf

View File

@@ -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))