mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[9530] Fixed check for SPELL_AURA_ALLOW_ONLY_ABILITY
Also remove public access to SpellAura::m_spellmod for avoid another hacks with it use. Spellmods only for Player::ApplySpellMod use.
This commit is contained in:
parent
bbdb7bb09c
commit
3cf9e47110
4 changed files with 2 additions and 14 deletions
|
|
@ -5141,7 +5141,7 @@ SpellCastResult Spell::CheckCasterAuras() const
|
|||
Unit::AuraList const& casingLimit = m_caster->GetAurasByType(SPELL_AURA_ALLOW_ONLY_ABILITY);
|
||||
for(Unit::AuraList::const_iterator itr = casingLimit.begin(); itr != casingLimit.end(); ++itr)
|
||||
{
|
||||
if(!IsAffectedByAura(*itr))
|
||||
if(!(*itr)->isAffectedOnSpell(m_spellInfo))
|
||||
{
|
||||
prevented_reason = SPELL_FAILED_CASTER_AURASTATE;
|
||||
break;
|
||||
|
|
@ -5953,14 +5953,6 @@ void Spell::UpdatePointers()
|
|||
m_targets.Update(m_caster);
|
||||
}
|
||||
|
||||
bool Spell::IsAffectedByAura(Aura *aura) const
|
||||
{
|
||||
if(SpellModifier* mod = aura->getAuraSpellMod())
|
||||
return mod->isAffectedOnSpell(m_spellInfo);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Spell::CheckTargetCreatureType(Unit* target) const
|
||||
{
|
||||
uint32 spellCreatureTargetMask = m_spellInfo->TargetCreatureType;
|
||||
|
|
|
|||
|
|
@ -456,8 +456,6 @@ class Spell
|
|||
|
||||
void UpdatePointers(); // must be used at call Spell code after time delay (non triggered spell cast/update spell call/etc)
|
||||
|
||||
bool IsAffectedByAura(Aura *aura) const;
|
||||
|
||||
bool CheckTargetCreatureType(Unit* target) const;
|
||||
|
||||
void AddTriggeredSpell(SpellEntry const* spellInfo) { m_TriggerSpells.push_back(spellInfo); }
|
||||
|
|
|
|||
|
|
@ -244,8 +244,6 @@ class MANGOS_DLL_SPEC Aura
|
|||
uint32 GetAuraTicks() const { return m_periodicTick; }
|
||||
uint32 GetAuraMaxTicks() const { return m_maxduration > 0 && m_modifier.periodictime > 0 ? m_maxduration / m_modifier.periodictime : 0; }
|
||||
|
||||
SpellModifier *getAuraSpellMod() {return m_spellmod; }
|
||||
|
||||
uint64 const& GetCasterGUID() const { return m_caster_guid; }
|
||||
Unit* GetCaster() const;
|
||||
Unit* GetTarget() const { return m_target; }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9529"
|
||||
#define REVISION_NR "9530"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue