mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7349] Implement spell cast depenences from area/quest.aura state store in new table spell_area.
* 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.
This commit is contained in:
parent
9e7e374077
commit
1fca6de6f3
13 changed files with 458 additions and 122 deletions
|
|
@ -3825,8 +3825,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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue