From 269f427e9a68a073252a7c02cefa283a118e4080 Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Sun, 25 Aug 2024 21:43:23 -0400 Subject: [PATCH] Core/Spells: Updated SPELL_ATTR4_ONLY_FLYING_AREAS implementation to account for latest flying requirements Port From (https://github.com/TrinityCore/TrinityCore/commit/019d28086f590199a0d397a9394d60d2c1698a2e) --- Source/Game/Spells/SpellInfo.cs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Source/Game/Spells/SpellInfo.cs b/Source/Game/Spells/SpellInfo.cs index 4bfdd479f..f98f14a9d 100644 --- a/Source/Game/Spells/SpellInfo.cs +++ b/Source/Game/Spells/SpellInfo.cs @@ -864,19 +864,8 @@ namespace Game.Spells if (!mountFlags.HasFlag(AreaMountFlags.AllowFlyingMounts)) return SpellCastResult.IncorrectArea; - if (player != null) - { - uint mapToCheck = map_id; - MapRecord mapEntry1 = CliDB.MapStorage.LookupByKey(map_id); - if (mapEntry1 != null) - mapToCheck = (uint)mapEntry1.CosmeticParentMapID; - if ((mapToCheck == 1116 || mapToCheck == 1464) && !player.HasSpell(191645)) // Draenor Pathfinder - return SpellCastResult.IncorrectArea; - else if (mapToCheck == 1220 && !player.HasSpell(233368)) // Broken Isles Pathfinder - return SpellCastResult.IncorrectArea; - else if ((mapToCheck == 1642 || mapToCheck == 1643) && !player.HasSpell(278833)) // Battle for Azeroth Pathfinder - return SpellCastResult.IncorrectArea; - } + if (player != null && !ConditionManager.IsPlayerMeetingCondition(player, 72968)) // Hardcoded PlayerCondition id for attribute check in client + return SpellCastResult.IncorrectArea; } var mapEntry = CliDB.MapStorage.LookupByKey(map_id);