summaryrefslogtreecommitdiff
path: root/src/scripts/Spells/spell_generic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts/Spells/spell_generic.cpp')
-rw-r--r--src/scripts/Spells/spell_generic.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/scripts/Spells/spell_generic.cpp b/src/scripts/Spells/spell_generic.cpp
index 4821e57555..f0ac73e39c 100644
--- a/src/scripts/Spells/spell_generic.cpp
+++ b/src/scripts/Spells/spell_generic.cpp
@@ -4431,10 +4431,7 @@ class spell_gen_mount : public SpellScriptLoader
if (map == 530 || (map == 571 && target->HasSpell(SPELL_COLD_WEATHER_FLYING)))
canFly = true;
- float x, y, z;
- target->GetPosition(x, y, z);
- uint32 areaFlag = target->GetBaseMap()->GetAreaFlag(x, y, z);
- AreaTableEntry const* area = sAreaStore.LookupEntry(areaFlag);
+ AreaTableEntry const* area = sAreaTableStore.LookupEntry(target->GetAreaId());
// Xinef: add battlefield check
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldToZoneId(target->GetZoneId());
if (!area || (canFly && ((area->flags & AREA_FLAG_NO_FLY_ZONE) || (Bf && !Bf->CanFlyIn()))))