aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Player/Player.cpp7
-rw-r--r--src/server/game/Entities/Player/Player.h2
-rw-r--r--src/server/game/Spells/SpellInfo.cpp13
3 files changed, 5 insertions, 17 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 84497c7c3a8..6915b68061b 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -25665,13 +25665,6 @@ void Player::StoreLootItem(uint8 lootSlot, Loot* loot, AELootResult* aeResult/*
SendEquipError(msg, nullptr, nullptr, item->itemid);
}
-bool Player::CanFlyInZone(uint32 mapid, uint32 zone) const
-{
- // continent checked in SpellInfo::CheckLocation at cast and area update
- uint32 v_map = sDB2Manager.GetVirtualMapForMapAndZone(mapid, zone);
- return v_map != 571 || HasSpell(54197); // 54197 = Cold Weather Flying
-}
-
void Player::LearnSpellHighestRank(uint32 spellid)
{
LearnSpell(spellid, false);
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index f392ba70e10..20261797581 100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -2120,8 +2120,6 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
void SetFallInformation(uint32 time, float z);
void HandleFall(MovementInfo const& movementInfo);
- bool CanFlyInZone(uint32 mapid, uint32 zone) const;
-
void SetClientControl(Unit* target, bool allowMove);
void SetMover(Unit* target);
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 4dde72f3778..1de54909348 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1835,15 +1835,12 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a
switch (effect->ApplyAuraName)
{
- case SPELL_AURA_FLY:
+ case SPELL_AURA_MOD_SHAPESHIFT:
{
- SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id);
- for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter)
- {
- if (skillIter->second->SkillLine == SKILL_MOUNTS)
- if (!player->CanFlyInZone(map_id, zone_id))
- return SPELL_FAILED_INCORRECT_AREA;
- }
+ if (SpellShapeshiftFormEntry const* spellShapeshiftForm = sSpellShapeshiftFormStore.LookupEntry(effect->MiscValue))
+ if (uint32 mountType = spellShapeshiftForm->MountTypeID)
+ if (!player->GetMountCapability(mountType))
+ return SPELL_FAILED_NOT_HERE;
break;
}
case SPELL_AURA_MOUNTED: