Scripts/Spells: Reverted part of 9d19be2ee5, fixes scaling mounts

Closes #6815.
This commit is contained in:
Shauren
2012-06-18 13:27:10 +02:00
parent 2cafa85daa
commit bd7299ac35
+5 -2
View File
@@ -2996,11 +2996,14 @@ class spell_gen_mount : public SpellScriptLoader
// Triggered spell id dependent on riding skill and zone // Triggered spell id dependent on riding skill and zone
bool canFly = false; bool canFly = false;
uint32 map = target->GetMapId(); uint32 map = GetVirtualMapForMapAndZone(target->GetMapId(), target->GetZoneId());
if (map == 530 || (map == 571 && target->HasSpell(SPELL_COLD_WEATHER_FLYING))) if (map == 530 || (map == 571 && target->HasSpell(SPELL_COLD_WEATHER_FLYING)))
canFly = true; canFly = true;
AreaTableEntry const* area = sAreaStore.LookupEntry(target->GetAreaId()); float x, y, z;
target->GetPosition(x, y, z);
uint32 areaFlag = target->GetBaseMap()->GetAreaFlag(x, y, z);
AreaTableEntry const* area = sAreaStore.LookupEntry(areaFlag);
if (!area || (canFly && (area->flags & AREA_FLAG_NO_FLY_ZONE))) if (!area || (canFly && (area->flags & AREA_FLAG_NO_FLY_ZONE)))
canFly = false; canFly = false;