[9888] Party restore IsKnowHowFlyIn and add area arg

This commit is contained in:
Laise 2010-05-13 15:14:58 +03:00
parent a002f22916
commit 0344a8e838
4 changed files with 5 additions and 8 deletions

View file

@ -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)
{