mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7253] Check battleground status in GetSpellAllowedInLocationError for some spells for aura remove and spell casting cases.
This commit is contained in:
parent
100429f29c
commit
e97c7ad9c5
6 changed files with 41 additions and 12 deletions
|
|
@ -3825,7 +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()))
|
||||
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))
|
||||
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