diff options
author | megamage <none@none> | 2009-08-05 16:33:34 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-05 16:33:34 -0500 |
commit | 907342d5b0e7a68024fcc77ea125bc36ff3bacaa (patch) | |
tree | adda2d7082d8daf370daba56a16a4774b8c497f3 /src/game/Spell.cpp | |
parent | 31f989fab9cae85c35ef58857ca960581e6f0735 (diff) |
[8308] More generic code for new continent spell casting including fly form/mounts. Author: VladimirMangos
* 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`
--HG--
branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 6d635687013..81a30505cc4 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -5138,14 +5138,15 @@ SpellCastResult Spell::CheckCast(bool strict) break; } - case SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED: case SPELL_AURA_FLY: + case SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED: { - // not allow cast fly spells at old maps by players (all spells is self target) - if(m_originalCaster && m_originalCaster->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_originalCaster && m_originalCaster->GetTypeId() == TYPEID_PLAYER && m_originalCaster->isAlive()) { - if( !((Player*)m_originalCaster)->IsAllowUseFlyMountsHere() ) - return SPELL_FAILED_NOT_HERE; + if (!((Player*)m_originalCaster)->IsKnowHowFlyIn(m_originalCaster->GetMapId(),m_originalCaster->GetMapId())) + return m_IsTriggeredSpell ? SPELL_FAILED_DONT_REPORT : SPELL_FAILED_NOT_HERE; } break; } |