diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 5dffaf428d..62b935b598 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -24630,11 +24630,11 @@ void Player::StoreLootItem(uint8 lootSlot, Loot* loot) SendEquipError(msg, NULL, NULL, item->itemid); } -bool Player::IsKnowHowFlyIn(uint32 mapid, uint32 zone) const +bool Player::canFlyInZone(uint32 mapid, uint32 zone) const { // continent checked in SpellInfo::CheckLocation at cast and area update uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone); - return v_map != 571 || HasSpell(54197); // Cold Weather Flying + return v_map != 571 || HasSpell(54197); // 54197 = Cold Weather Flying } void Player::LearnSpellHighestRank(uint32 spellid) diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 9ddcf6ed92..07669bab02 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2396,7 +2396,7 @@ class Player : public Unit, public GridObject void SetFallInformation(uint32 time, float z); void HandleFall(MovementInfo const& movementInfo); - bool IsKnowHowFlyIn(uint32 mapid, uint32 zone) const; + bool canFlyInZone(uint32 mapid, uint32 zone) const; void SetClientControl(Unit* target, bool allowMove); diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index eb09cc60a1..77fbd9a833 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1815,9 +1815,13 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a { case SPELL_AURA_FLY: { - if (!player->IsKnowHowFlyIn(map_id, zone_id)) - return SPELL_FAILED_INCORRECT_AREA; - break; + SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id); + for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter) + { + if (skillIter->second->skillId == SKILL_MOUNTS) + if (!player->canFlyInZone(map_id, zone_id)) + return SPELL_FAILED_INCORRECT_AREA; + } } case SPELL_AURA_MOUNTED: {