[10532] Aura SPELL_AURA_ALLOW_ONLY_ABILITY not prevent auto-attacks.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
insider42 2010-09-25 11:39:31 +04:00 committed by VladimirMangos
parent 96b317eea4
commit c2742dccc3
3 changed files with 2 additions and 28 deletions

View file

@ -313,7 +313,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
&Aura::HandleNoImmediateEffect, //260 SPELL_AURA_SCREEN_EFFECT (miscvalue = id in ScreenEffect.dbc) not required any code
&Aura::HandlePhase, //261 SPELL_AURA_PHASE undetectable invisibility? implemented in Unit::isVisibleForOrDetect
&Aura::HandleNULL, //262 ignore combat/aura state?
&Aura::HandleAllowOnlyAbility, //263 SPELL_AURA_ALLOW_ONLY_ABILITY player can use only abilities set in SpellClassMask
&Aura::HandleNoImmediateEffect, //263 SPELL_AURA_ALLOW_ONLY_ABILITY implemented in Spell::CheckCasterAuras
&Aura::HandleUnused, //264 unused (3.0.8a-3.2.2a)
&Aura::HandleUnused, //265 unused (3.0.8a-3.2.2a)
&Aura::HandleUnused, //266 unused (3.0.8a-3.2.2a)
@ -7747,31 +7747,6 @@ void Aura::HandleAuraModAllCritChance(bool apply, bool Real)
((Player*)target)->UpdateAllSpellCritChances();
}
void Aura::HandleAllowOnlyAbility(bool apply, bool Real)
{
if(!Real)
return;
Unit *target = GetTarget();
if(apply)
{
target->setAttackTimer(BASE_ATTACK,m_duration);
target->setAttackTimer(RANGED_ATTACK,m_duration);
target->setAttackTimer(OFF_ATTACK,m_duration);
}
else
{
target->resetAttackTimer(BASE_ATTACK);
target->resetAttackTimer(RANGED_ATTACK);
target->resetAttackTimer(OFF_ATTACK);
}
target->UpdateDamagePhysical(BASE_ATTACK);
target->UpdateDamagePhysical(RANGED_ATTACK);
target->UpdateDamagePhysical(OFF_ATTACK);
}
void Aura::SetAuraMaxDuration( int32 duration )
{
m_maxduration = duration;

View file

@ -361,7 +361,6 @@ class MANGOS_DLL_SPEC Aura
void HandlePhase(bool Apply, bool Real);
void HandleModTargetArmorPct(bool Apply, bool Real);
void HandleAuraModAllCritChance(bool Apply, bool Real);
void HandleAllowOnlyAbility(bool Apply, bool Real);
void HandleAuraOpenStable(bool apply, bool Real);
virtual ~Aura();

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10531"
#define REVISION_NR "10532"
#endif // __REVISION_NR_H__