mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
fix(Core/Spells): Dismount from flying mount if teleported to Nothrend without Cold Weather Flying spell. (#8524)
Fixes #5660
This commit is contained in:
@@ -1498,27 +1498,15 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a
|
||||
// continent limitation (virtual continent)
|
||||
if (HasAttribute(SPELL_ATTR4_ONLY_FLYING_AREAS))
|
||||
{
|
||||
if (strict)
|
||||
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(area_id);
|
||||
if (!areaEntry)
|
||||
{
|
||||
AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(area_id);
|
||||
if (!areaEntry)
|
||||
{
|
||||
areaEntry = sAreaTableStore.LookupEntry(zone_id);
|
||||
}
|
||||
|
||||
if (!areaEntry || !areaEntry->IsFlyable() || !player->canFlyInZone(map_id, zone_id, this))
|
||||
{
|
||||
return SPELL_FAILED_INCORRECT_AREA;
|
||||
}
|
||||
areaEntry = sAreaTableStore.LookupEntry(zone_id);
|
||||
}
|
||||
else
|
||||
|
||||
if (!areaEntry || !areaEntry->IsFlyable() || (strict && (areaEntry->flags & AREA_FLAG_NO_FLY_ZONE) != 0) || !player->canFlyInZone(map_id, zone_id, this))
|
||||
{
|
||||
uint32 const v_map = GetVirtualMapForMapAndZone(map_id, zone_id);
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(v_map);
|
||||
if (!mapEntry || mapEntry->Expansion() < 1 || !mapEntry->IsContinent())
|
||||
{
|
||||
return SPELL_FAILED_INCORRECT_AREA;
|
||||
}
|
||||
return SPELL_FAILED_INCORRECT_AREA;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user