diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 434e93904..d4c8a5d3a 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -20906,11 +20906,8 @@ uint32 Player::CalculateTalentsPoints() const return uint32(talentPointsForLevel * sWorld.getConfig(CONFIG_FLOAT_RATE_TALENT)); } -bool Player::IsKnowHowFlyIn(uint32 mapid) const +bool Player::IsKnowHowFlyIn(uint32 mapid, uint32 zone, uint32 area) const { - uint32 zone; - uint32 area; - GetZoneAndAreaId(zone, area); // continent checked in SpellMgr::GetSpellAllowedInLocationError at cast and area update uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone); diff --git a/src/game/Player.h b/src/game/Player.h index 8ae6b0e22..be072628c 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -2150,7 +2150,7 @@ class MANGOS_DLL_SPEC Player : public Unit bool CanFly() const { return m_movementInfo.HasMovementFlag(MOVEFLAG_CAN_FLY); } bool IsFlying() const { return m_movementInfo.HasMovementFlag(MOVEFLAG_FLYING); } - bool IsKnowHowFlyIn(uint32 mapid) const; + bool IsKnowHowFlyIn(uint32 mapid, uint32 zone, uint32 area) const; void SetClientControl(Unit* target, uint8 allowMove); void SetMover(Unit* target) { m_mover = target ? target : this; } diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index af4446247..99056f42e 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -5113,7 +5113,7 @@ SpellCastResult Spell::CheckCast(bool strict) // allow always ghost flight spells if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->isAlive()) { - if (!((Player*)m_caster)->IsKnowHowFlyIn(m_caster->GetMapId())) + if (!((Player*)m_caster)->IsKnowHowFlyIn(m_caster->GetMapId(), zone, area)) return m_IsTriggeredSpell ? SPELL_FAILED_DONT_REPORT : SPELL_FAILED_NOT_HERE; } break; @@ -6548,7 +6548,7 @@ void Spell::SelectMountByAreaAndSkill(Unit* target, uint32 spellId75, uint32 spe target->GetZoneAndAreaId(zone, area); SpellCastResult locRes= sSpellMgr.GetSpellAllowedInLocationError(pSpell, target->GetMapId(), zone, area, target->GetCharmerOrOwnerPlayerOrPlayerItself()); - if (locRes != SPELL_CAST_OK || !((Player*)target)->IsKnowHowFlyIn(target->GetMapId())) + if (locRes != SPELL_CAST_OK || !((Player*)target)->IsKnowHowFlyIn(target->GetMapId(), zone, area)) target->CastSpell(target, spellId150, true); else if (spellIdSpecial > 0) { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 20efc88ea..9db420bb2 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9887" + #define REVISION_NR "9888" #endif // __REVISION_NR_H__