Core/Areas: Update AreaFlags

Port From (https://github.com/TrinityCore/TrinityCore/commit/f8f1c3b4f0ca631e76101f8492b9688c6d2dca01)
This commit is contained in:
hondacrx
2023-05-23 08:07:33 -04:00
parent 55148a9ca4
commit ef250e0400
13 changed files with 95 additions and 95 deletions
+3 -5
View File
@@ -5717,11 +5717,9 @@ namespace Game.Spells
// allow always ghost flight spells
if (m_originalCaster != null && m_originalCaster.IsTypeId(TypeId.Player) && m_originalCaster.IsAlive())
{
BattleField Bf = Global.BattleFieldMgr.GetBattlefieldToZoneId(m_originalCaster.GetMap(), m_originalCaster.GetZoneId());
var area = CliDB.AreaTableStorage.LookupByKey(m_originalCaster.GetAreaId());
if (area != null)
if (area.HasFlag(AreaFlags.NoFlyZone) || (Bf != null && !Bf.CanFlyIn()))
return SpellCastResult.NotHere;
BattleField battleField = Global.BattleFieldMgr.GetBattlefieldToZoneId(m_originalCaster.GetMap(), m_originalCaster.GetZoneId());
if (battleField != null && !battleField.CanFlyIn())
return SpellCastResult.NotHere;
}
break;
}