diff options
author | megamage <none@none> | 2009-02-27 12:53:27 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-27 12:53:27 -0600 |
commit | adb19df4749ed0a9293a7c845c3883f02d093f17 (patch) | |
tree | c949ad91aaf14f293a1c66d3a524150f295870e7 /src/game/Spell.cpp | |
parent | 2dbe092d9f90721ddc3cbf30a4b755a5799ee9f8 (diff) |
[7349] Implement spell cast depenences from area/quest.aura state store in new table `spell_area`. Author: VladimirMangos
* It allow store requirenments: area, active or rewarded quest (until possible another quest not rewarded),
aura present at character, character race/gender.
* Listed spell can marked as auto-casted when fit requirents. In this case spell requirements checked at
zone/subzone update (and then resurraction also), quest start/reward, dummy aura apply.
* Old hardcoded lines for similar check removed from sources and required DB support for work now.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index be224438257..3269f91dee6 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3779,8 +3779,8 @@ uint8 Spell::CanCast(bool strict) return SPELL_FAILED_NOT_IN_ARENA; // zone check - if (uint8 res= GetSpellAllowedInLocationError(m_spellInfo,m_caster->GetMapId(),m_caster->GetZoneId(),m_caster->GetAreaId(), - m_caster->GetTypeId()==TYPEID_PLAYER ? ((Player*)m_caster)->GetBattleGroundId() : 0)) + if (uint8 res= spellmgr.GetSpellAllowedInLocationError(m_spellInfo,m_caster->GetMapId(),m_caster->GetZoneId(),m_caster->GetAreaId(), + m_caster->GetTypeId()==TYPEID_PLAYER ? ((Player*)m_caster) : NULL)) return res; // not let players cast spells at mount (and let do it to creatures) |