[8308] More generic code for new continent spell casting including fly form/mounts.

* Check new continent requirement by SPELL_ATTR_EX4_CAST_ONLY_IN_OUTLAND in
  SpellMgr::GetSpellAllowedInLocationError.
* Also in this function let ignore any area requirement in GM-mode (except client side checks ofc if use spellbook/item)
* For fly form/mount auras check only speciaal reqirement like special fly skill and ignore it for dead state.
* Drop explicit fly auras drop at zone update, now this part GetSpellAllowedInLocationError functionality.
* Allow in `spell_area` have data deepndent from ghost auras

This all allow implement apply spells 55173/55164 to player ghost wiht DB support in `spell_area`
This commit is contained in:
VladimirMangos 2009-08-04 23:35:35 +04:00
parent 49b88a14a9
commit 3c47e6117a
5 changed files with 43 additions and 34 deletions

View file

@ -4555,16 +4555,16 @@ SpellCastResult Spell::CheckCast(bool strict)
break;
}
case SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED:
case SPELL_AURA_FLY:
case SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED:
{
// not allow cast fly spells at old maps by players (all spells is self target)
if(m_caster->GetTypeId() == TYPEID_PLAYER)
// not allow cast fly spells if not have req. skills (all spells is self target)
// allow always ghost flight spells
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->isAlive())
{
if( !((Player*)m_caster)->IsAllowUseFlyMountsHere() )
return SPELL_FAILED_NOT_HERE;
if (!((Player*)m_caster)->IsKnowHowFlyIn(m_caster->GetMapId(),zone))
return m_IsTriggeredSpell ? SPELL_FAILED_DONT_REPORT : SPELL_FAILED_NOT_HERE;
}
break;
}
case SPELL_AURA_PERIODIC_MANA_LEECH: