Merge branch 'master' of https://github.com/azerothcore/azerothcore-wotlk into dir-restructure

This commit is contained in:
Yehonal
2017-12-21 11:26:43 +01:00
445 changed files with 49192 additions and 15431 deletions

View File

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