aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQAston <none@none>2009-05-16 17:59:36 +0200
committerQAston <none@none>2009-05-16 17:59:36 +0200
commit14daff6d38f5100c311af334f4e02c47cd946904 (patch)
tree0c1808ce273e746aa9c1b5398ce087941fdca12c
parent68a8c72041d601ba226e6f932c9cde3f4c66ca0e (diff)
*Change amount of passive auras if mod changed for them (this fixes Glyph of vigor apply/remove and some other spells)
*Backfire damage from unstable affliction is applied to dispeller now *Correct amount of improved Divine Spirit --HG-- branch : trunk
-rw-r--r--sql/world_spell_full.sql1
-rw-r--r--src/game/SpellAuras.cpp621
-rw-r--r--src/game/SpellAuras.h306
-rw-r--r--src/game/Unit.cpp4
4 files changed, 489 insertions, 443 deletions
diff --git a/sql/world_spell_full.sql b/sql/world_spell_full.sql
index 11f8b411b55..1f5b9c8d14f 100644
--- a/sql/world_spell_full.sql
+++ b/sql/world_spell_full.sql
@@ -76,6 +76,7 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comm
( 32389, 60466, 2, 'Shadow Embrace Rank3'),
( 32390, 60467, 2, 'Shadow Embrace Rank4'),
( 32391, 60468, 2, 'Shadow Embrace Rank5'),
+( 33206, 44416, 2, 'Pain Suppression (threat)'),
-- Creature
( 36574, 36650, 0, 'Apply Phase Slip Vulnerability'),
-- instance
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 8a43ba5bebf..639f6a1e2e0 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -287,7 +287,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
&AuraEffect::HandleNoImmediateEffect, //232 SPELL_AURA_MECHANIC_DURATION_MOD implement in Unit::CalculateSpellDuration
&AuraEffect::HandleNULL, //233 set model id to the one of the creature with id GetMiscValue()
&AuraEffect::HandleNoImmediateEffect, //234 SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK implement in Unit::CalculateSpellDuration
- &AuraEffect::HandleAuraModDispelResist, //235 SPELL_AURA_MOD_DISPEL_RESIST implement in Unit::MagicSpellHitResult
+ &AuraEffect::HandleNoImmediateEffect, //235 SPELL_AURA_MOD_DISPEL_RESIST implement in Unit::MagicSpellHitResult
&AuraEffect::HandleAuraControlVehicle, //236 SPELL_AURA_CONTROL_VEHICLE
&AuraEffect::HandleModSpellDamagePercentFromAttackPower, //237 SPELL_AURA_MOD_SPELL_DAMAGE_OF_ATTACK_POWER implemented in Unit::SpellBaseDamageBonus
&AuraEffect::HandleModSpellHealingPercentFromAttackPower, //238 SPELL_AURA_MOD_SPELL_HEALING_OF_ATTACK_POWER implemented in Unit::SpellBaseHealingBonus
@@ -836,13 +836,27 @@ void PersistentAreaAuraEffect::Update(uint32 diff)
m_target->RemoveAura(GetParentAura());
}
-void AuraEffect::ApplyModifier(bool apply, bool Real)
+void AuraEffect::ApplyModifier(bool apply, bool Real, bool changeAmount)
{
if (GetParentAura()->IsRemoved())
return;
if(m_auraName<TOTAL_AURAS)
- (*this.*AuraHandler [m_auraName])(apply,Real);
+ (*this.*AuraHandler [m_auraName])(apply,Real, changeAmount);
+}
+
+void AuraEffect::RecalculateAmount()
+{
+ Unit *caster = GetParentAura()->GetCaster();
+ int32 amount = GetParentAura()->GetStackAmount() * caster->CalculateSpellDamage(m_spellProto, GetEffIndex(), GetBasePoints(), m_target);
+ // Reapply if amount change
+ if (amount!=GetAmount())
+ {
+ // Auras which are applying spellmod should have removed spellmods for real
+ ApplyModifier(false,false,true);
+ SetAmount(amount);
+ ApplyModifier(true,false,true);
+ }
}
void AuraEffect::CleanupTriggeredSpells()
@@ -934,8 +948,8 @@ void Aura::_AddAura()
// passive auras (except totem auras) do not get placed in the slots
// area auras with SPELL_AURA_NONE are not shown on target
- if((m_spellProto->Attributes & 0x80 && GetTalentSpellPos(GetId()))
- || !m_isPassive
+ if(/*(m_spellProto->Attributes & 0x80 && GetTalentSpellPos(GetId()))
+ || */!m_isPassive
|| (caster && caster->GetTypeId() == TYPEID_UNIT && ((Creature*)caster)->isTotem())
|| (IsAuraType(SPELL_AURA_ABILITY_IGNORE_AURASTATE))
&& (!IsAreaAura()
@@ -1182,25 +1196,12 @@ void Aura::SetStackAmount(uint8 stackAmount)
{
if (stackAmount != m_stackAmount)
{
- Unit *target = GetTarget();
- Unit *caster = GetCaster();
- if (target && caster)
+ m_stackAmount = stackAmount;
+ for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
{
- m_stackAmount = stackAmount;
- for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
+ if (AuraEffect * part = GetPartAura(i))
{
- if (AuraEffect * part = GetPartAura(i))
- {
- int32 amount = m_stackAmount * caster->CalculateSpellDamage(m_spellProto, part->GetEffIndex(), part->GetBasePoints(), target);
- // Reapply if amount change
- if (amount!=part->GetAmount())
- {
- // Auras which are applying spellmod should have removed spellmods for real
- part->ApplyModifier(false,true);
- part->SetAmount(amount);
- part->ApplyModifier(true,true);
- }
- }
+ part->RecalculateAmount();
}
}
}
@@ -1450,22 +1451,42 @@ bool AuraEffect::isAffectedOnSpell(SpellEntry const *spell) const
return false;
}
+void Aura::UnregisterSingleCastAura()
+{
+ if (IsSingleTarget())
+ {
+ Unit* caster = NULL;
+ caster = GetCaster();
+ if(caster)
+ {
+ caster->GetSingleCastAuras().remove(this);
+ }
+ else
+ {
+ sLog.outError("Couldn't find the caster of the single target aura, may crash later!");
+ assert(false);
+ }
+ m_isSingleTargetAura = false;
+ }
+}
+
/*********************************************************/
/*** BASIC AURA FUNCTION ***/
/*********************************************************/
-void AuraEffect::HandleAddModifier(bool apply, bool Real)
+void AuraEffect::HandleAddModifier(bool apply, bool Real, bool changeAmount)
{
- if(m_target->GetTypeId() != TYPEID_PLAYER || !Real)
+ if(m_target->GetTypeId() != TYPEID_PLAYER || (!Real && !changeAmount))
return;
- if(GetMiscValue() >= MAX_SPELLMOD)
+ uint32 modOp = GetMiscValue();
+
+ if(modOp >= MAX_SPELLMOD)
return;
if (apply)
{
-
SpellModifier *mod = new SpellModifier;
- mod->op = SpellModOp(GetMiscValue());
+ mod->op = SpellModOp(modOp);
mod->value = m_amount;
mod->type = SpellModType(m_auraName); // SpellModType value == spell aura types
mod->spellId = GetId();
@@ -1482,15 +1503,53 @@ void AuraEffect::HandleAddModifier(bool apply, bool Real)
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
// reapply some passive spells after add/remove related spellmods
- if(m_spellProto->SpellFamilyName==SPELLFAMILY_WARRIOR && (m_spellmod->mask[1] & 0x00001000))
- {
- m_target->RemoveAurasDueToSpell(45471);
-
- if(apply)
- m_target->CastSpell(m_target,45471,true);
+ //if (GetParentAura()->IsPassive())
+ // Warning: it is a dead loop if 2 auras each other amount-shouldn't happen
+ switch (modOp)
+ {
+ case SPELLMOD_ALL_EFFECTS:
+ case SPELLMOD_EFFECT1:
+ case SPELLMOD_EFFECT2:
+ case SPELLMOD_EFFECT3:
+ {
+ Unit::AuraMap & auras = m_target->GetAuras();
+ for(Unit::AuraMap::iterator iter = auras.begin(); iter != auras.end();++iter)
+ {
+ Aura * aur = iter->second;
+ // only passive auras-active auras should have amount set on spellcast and not be affected
+ if (aur->IsPassive() && isAffectedOnSpell(aur->GetSpellProto()))
+ {
+ if (modOp == SPELLMOD_ALL_EFFECTS)
+ {
+ for (uint8 i = 0; i<MAX_SPELL_EFFECTS;++i)
+ {
+ if (AuraEffect * aurEff = aur->GetPartAura(i))
+ aurEff->RecalculateAmount();
+ }
+ }
+ else if (modOp ==SPELLMOD_EFFECT1)
+ {
+ if (AuraEffect * aurEff = aur->GetPartAura(0))
+ aurEff->RecalculateAmount();
+ }
+ else if (modOp ==SPELLMOD_EFFECT2)
+ {
+ if (AuraEffect * aurEff = aur->GetPartAura(1))
+ aurEff->RecalculateAmount();
+ }
+ else //if (modOp ==SPELLMOD_EFFECT3)
+ {
+ if (AuraEffect * aurEff = aur->GetPartAura(2))
+ aurEff->RecalculateAmount();
+ }
+ }
+ }
+ }
+ default:
+ break;
}
}
-void AuraEffect::HandleAddTargetTrigger(bool apply, bool Real)
+void AuraEffect::HandleAddTargetTrigger(bool apply, bool Real, bool /*changeAmount*/)
{
// Use SpellModifier structure for check
// used only fields:
@@ -2254,14 +2313,13 @@ void AuraEffect::TriggerSpellWithValue()
/*** AURA EFFECTS ***/
/*********************************************************/
-void AuraEffect::HandleAuraDummy(bool apply, bool Real)
+void AuraEffect::HandleAuraDummy(bool apply, bool Real, bool changeAmount)
{
- // spells required only Real aura add/remove
- if(!Real)
- return;
-
Unit* caster = GetCaster();
+ // spells required only Real aura add/remove
+ if (Real)
+ {
// AT APPLY
if(apply)
{
@@ -2448,6 +2506,7 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real)
break;
}
}
+ }
// AT APPLY & REMOVE
@@ -2455,6 +2514,8 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real)
{
case SPELLFAMILY_GENERIC:
{
+ if (!Real)
+ break;
switch(GetId())
{
// Unstable Power
@@ -2552,10 +2613,14 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real)
}
case SPELLFAMILY_MAGE:
{
+ //if (!Real)
+ //break;
break;
}
case SPELLFAMILY_PRIEST:
{
+ if (!Real && !changeAmount)
+ break;
// Pain and Suffering
if( m_spellProto->SpellIconID == 2874 && m_target->GetTypeId()==TYPEID_PLAYER )
{
@@ -2577,6 +2642,8 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real)
}
case SPELLFAMILY_DRUID:
{
+ if (!Real && !changeAmount)
+ break;
switch(GetId())
{
case 34246: // Idol of the Emerald Queen
@@ -2602,6 +2669,8 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real)
}
case 61336: // Survival Instincts
{
+ if (!Real)
+ break;
if(apply)
{
if (!m_target->IsInFeralForm())
@@ -2632,10 +2701,6 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real)
if (GetParentAura()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE && GetParentAura()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL)
return;
- // Not needed in 3.1
- if (GetParentAura() && GetParentAura()->GetStackAmount()!=0)
- m_amount /= GetParentAura()->GetStackAmount();
-
// final heal
if(m_target->IsInWorld())
m_target->CastCustomSpell(m_target,33778,&m_amount,NULL,NULL,true,NULL,this,GetCasterGUID());
@@ -2667,6 +2732,8 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real)
}
case SPELLFAMILY_HUNTER:
{
+ if (!Real)
+ break;
// Glyph of Aspect of the Monkey
if(m_spellProto->Id==56833)
{
@@ -2690,6 +2757,8 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real)
}
case SPELLFAMILY_SHAMAN:
{
+ if (!Real && !changeAmount)
+ break;
// Improved Weapon Totems
if( GetSpellProto()->SpellIconID == 57 && m_target->GetTypeId()==TYPEID_PLAYER )
{
@@ -2716,7 +2785,8 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real)
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
return;
}
-
+ if (!Real)
+ break;
// Sentry Totem
if (GetId() == 6495 && caster->GetTypeId() == TYPEID_PLAYER)
{
@@ -2738,41 +2808,44 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real)
}
}
- // pet auras
- if(PetAura const* petSpell = spellmgr.GetPetAura(GetId()))
+ if (Real)
{
- if(apply)
- m_target->AddPetAura(petSpell);
- else
- m_target->RemovePetAura(petSpell);
- return;
- }
-
- if(GetEffIndex()==0 && m_target->GetTypeId()==TYPEID_PLAYER)
- {
- SpellAreaForAreaMapBounds saBounds = spellmgr.GetSpellAreaForAuraMapBounds(GetId());
- if(saBounds.first != saBounds.second)
+ // pet auras
+ if(PetAura const* petSpell = spellmgr.GetPetAura(GetId()))
{
- uint32 zone, area;
- m_target->GetZoneAndAreaId(zone,area);
+ if(apply)
+ m_target->AddPetAura(petSpell);
+ else
+ m_target->RemovePetAura(petSpell);
+ return;
+ }
- for(SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
+ if(GetEffIndex()==0 && m_target->GetTypeId()==TYPEID_PLAYER)
+ {
+ SpellAreaForAreaMapBounds saBounds = spellmgr.GetSpellAreaForAuraMapBounds(GetId());
+ if(saBounds.first != saBounds.second)
{
- // some auras remove at aura remove
- if(!itr->second->IsFitToRequirements((Player*)m_target,zone,area))
- m_target->RemoveAurasDueToSpell(itr->second->spellId);
- // some auras applied at aura apply
- else if(itr->second->autocast)
+ uint32 zone, area;
+ m_target->GetZoneAndAreaId(zone,area);
+
+ for(SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
{
- if( !m_target->HasAuraEffect(itr->second->spellId,0) )
- m_target->CastSpell(m_target,itr->second->spellId,true);
+ // some auras remove at aura remove
+ if(!itr->second->IsFitToRequirements((Player*)m_target,zone,area))
+ m_target->RemoveAurasDueToSpell(itr->second->spellId);
+ // some auras applied at aura apply
+ else if(itr->second->autocast)
+ {
+ if( !m_target->HasAuraEffect(itr->second->spellId,0) )
+ m_target->CastSpell(m_target,itr->second->spellId,true);
+ }
}
}
}
}
}
-void AuraEffect::HandleAuraMounted(bool apply, bool Real)
+void AuraEffect::HandleAuraMounted(bool apply, bool Real, bool /*changeAmount*/)
{
// only at real add/remove aura
if(!Real)
@@ -2809,7 +2882,7 @@ void AuraEffect::HandleAuraMounted(bool apply, bool Real)
}
}
-void AuraEffect::HandleAuraWaterWalk(bool apply, bool Real)
+void AuraEffect::HandleAuraWaterWalk(bool apply, bool Real, bool /*changeAmount*/)
{
// only at real add/remove aura
if(!Real)
@@ -2825,7 +2898,7 @@ void AuraEffect::HandleAuraWaterWalk(bool apply, bool Real)
m_target->SendMessageToSet(&data,true);
}
-void AuraEffect::HandleAuraFeatherFall(bool apply, bool Real)
+void AuraEffect::HandleAuraFeatherFall(bool apply, bool Real, bool /*changeAmount*/)
{
// only at real add/remove aura
if(!Real)
@@ -2841,7 +2914,7 @@ void AuraEffect::HandleAuraFeatherFall(bool apply, bool Real)
m_target->SendMessageToSet(&data,true);
}
-void AuraEffect::HandleAuraHover(bool apply, bool Real)
+void AuraEffect::HandleAuraHover(bool apply, bool Real, bool /*changeAmount*/)
{
// only at real add/remove aura
if(!Real)
@@ -2857,16 +2930,16 @@ void AuraEffect::HandleAuraHover(bool apply, bool Real)
m_target->SendMessageToSet(&data,true);
}
-void AuraEffect::HandleWaterBreathing(bool apply, bool Real)
+void AuraEffect::HandleWaterBreathing(bool apply, bool Real, bool /*changeAmount*/)
{
// update timers in client
if(m_target->GetTypeId()==TYPEID_PLAYER)
((Player*)m_target)->UpdateMirrorTimers();
}
-void AuraEffect::HandleAuraModShapeshift(bool apply, bool Real)
+void AuraEffect::HandleAuraModShapeshift(bool apply, bool Real, bool changeAmount)
{
- if(!Real)
+ if(!Real && !changeAmount)
return;
uint32 modelid = 0;
@@ -3107,7 +3180,7 @@ void AuraEffect::HandleAuraModShapeshift(bool apply, bool Real)
}
}
-void AuraEffect::HandleAuraTransform(bool apply, bool Real)
+void AuraEffect::HandleAuraTransform(bool apply, bool Real, bool /*changeAmount*/)
{
if (apply)
{
@@ -3261,12 +3334,12 @@ void AuraEffect::HandleAuraTransform(bool apply, bool Real)
}
}
-void AuraEffect::HandleForceReaction(bool apply, bool Real)
+void AuraEffect::HandleForceReaction(bool apply, bool Real, bool changeAmount)
{
if(m_target->GetTypeId() != TYPEID_PLAYER)
return;
- if(!Real)
+ if(!Real && !changeAmount)
return;
Player* player = (Player*)m_target;
@@ -3278,7 +3351,7 @@ void AuraEffect::HandleForceReaction(bool apply, bool Real)
player->GetReputationMgr().SendForceReactions();
}
-void AuraEffect::HandleAuraModSkill(bool apply, bool Real)
+void AuraEffect::HandleAuraModSkill(bool apply, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId() != TYPEID_PLAYER)
return;
@@ -3291,7 +3364,7 @@ void AuraEffect::HandleAuraModSkill(bool apply, bool Real)
((Player*)m_target)->UpdateDefenseBonusesMod();
}
-void AuraEffect::HandleChannelDeathItem(bool apply, bool Real)
+void AuraEffect::HandleChannelDeathItem(bool apply, bool Real, bool /*changeAmount*/)
{
if(Real && !apply)
{
@@ -3336,8 +3409,10 @@ void AuraEffect::HandleChannelDeathItem(bool apply, bool Real)
}
}
-void AuraEffect::HandleBindSight(bool apply, bool Real)
+void AuraEffect::HandleBindSight(bool apply, bool Real, bool /*changeAmount*/)
{
+ if (!Real)
+ return;
Unit* caster = GetCaster();
if(!caster || caster->GetTypeId() != TYPEID_PLAYER)
return;
@@ -3345,12 +3420,12 @@ void AuraEffect::HandleBindSight(bool apply, bool Real)
((Player*)caster)->SetViewpoint(m_target, apply);
}
-void AuraEffect::HandleFarSight(bool apply, bool Real)
+void AuraEffect::HandleFarSight(bool apply, bool Real, bool /*changeAmount*/)
{
//Handled by client
}
-void AuraEffect::HandleAuraTrackCreatures(bool apply, bool Real)
+void AuraEffect::HandleAuraTrackCreatures(bool apply, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId()!=TYPEID_PLAYER)
return;
@@ -3358,7 +3433,7 @@ void AuraEffect::HandleAuraTrackCreatures(bool apply, bool Real)
m_target->SetUInt32Value(PLAYER_TRACK_CREATURES, apply ? ((uint32)1)<<(GetMiscValue()-1) : 0 );
}
-void AuraEffect::HandleAuraTrackResources(bool apply, bool Real)
+void AuraEffect::HandleAuraTrackResources(bool apply, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId()!=TYPEID_PLAYER)
return;
@@ -3366,7 +3441,7 @@ void AuraEffect::HandleAuraTrackResources(bool apply, bool Real)
m_target->SetUInt32Value(PLAYER_TRACK_RESOURCES, apply ? ((uint32)1)<<(GetMiscValue()-1): 0 );
}
-void AuraEffect::HandleAuraTrackStealthed(bool apply, bool Real)
+void AuraEffect::HandleAuraTrackStealthed(bool apply, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId()!=TYPEID_PLAYER)
return;
@@ -3374,7 +3449,7 @@ void AuraEffect::HandleAuraTrackStealthed(bool apply, bool Real)
m_target->ApplyModFlag(PLAYER_FIELD_BYTES,PLAYER_FIELD_BYTE_TRACK_STEALTHED,apply);
}
-void AuraEffect::HandleAuraModScale(bool apply, bool Real)
+void AuraEffect::HandleAuraModScale(bool apply, bool Real, bool /*changeAmount*/)
{
m_target->ApplyPercentModFloatValue(OBJECT_FIELD_SCALE_X,m_amount,apply);
}
@@ -3502,9 +3577,9 @@ void AuraEffect::HandleModPossessPet(bool apply, bool Real)
}
}*/
-void AuraEffect::HandleAuraModPetTalentsPoints(bool Apply, bool Real)
+void AuraEffect::HandleAuraModPetTalentsPoints(bool Apply, bool Real, bool changeAmount)
{
- if(!Real)
+ if(!Real && !changeAmount)
return;
if(m_target->GetTypeId() != TYPEID_PLAYER)
@@ -3623,7 +3698,7 @@ void AuraEffect::HandleAuraModPetTalentsPoints(bool Apply, bool Real)
}
}*/
-void AuraEffect::HandleModConfuse(bool apply, bool Real)
+void AuraEffect::HandleModConfuse(bool apply, bool Real, bool /*changeAmount*/)
{
if(!Real)
return;
@@ -3632,7 +3707,7 @@ void AuraEffect::HandleModConfuse(bool apply, bool Real)
m_target->SetControlled(apply, UNIT_STAT_CONFUSED);
}
-void AuraEffect::HandleModFear(bool apply, bool Real)
+void AuraEffect::HandleModFear(bool apply, bool Real, bool /*changeAmount*/)
{
if (!Real)
return;
@@ -3641,7 +3716,7 @@ void AuraEffect::HandleModFear(bool apply, bool Real)
m_target->SetControlled(apply, UNIT_STAT_FLEEING);
}
-void AuraEffect::HandleFeignDeath(bool apply, bool Real)
+void AuraEffect::HandleFeignDeath(bool apply, bool Real, bool /*changeAmount*/)
{
if(!Real)
return;
@@ -3712,7 +3787,7 @@ void AuraEffect::HandleFeignDeath(bool apply, bool Real)
}
}
-void AuraEffect::HandleAuraModDisarm(bool apply, bool Real)
+void AuraEffect::HandleAuraModDisarm(bool apply, bool Real, bool /*changeAmount*/)
{
if (!Real)
return;
@@ -3762,7 +3837,7 @@ void AuraEffect::HandleAuraModDisarm(bool apply, bool Real)
m_target->UpdateDamagePhysical(attType);
}
-void AuraEffect::HandleModStealth(bool apply, bool Real)
+void AuraEffect::HandleModStealth(bool apply, bool Real, bool /*changeAmount*/)
{
if(!Real)
return;
@@ -3791,7 +3866,7 @@ void AuraEffect::HandleModStealth(bool apply, bool Real)
}
}
-void AuraEffect::HandleInvisibility(bool apply, bool Real)
+void AuraEffect::HandleInvisibility(bool apply, bool Real, bool /*changeAmount*/)
{
if(apply)
{
@@ -3828,7 +3903,7 @@ void AuraEffect::HandleInvisibility(bool apply, bool Real)
}
}
-void AuraEffect::HandleInvisibilityDetect(bool apply, bool Real)
+void AuraEffect::HandleInvisibilityDetect(bool apply, bool Real, bool /*changeAmount*/)
{
if(apply)
{
@@ -3847,7 +3922,7 @@ void AuraEffect::HandleInvisibilityDetect(bool apply, bool Real)
m_target->SetToNotify();
}
-void AuraEffect::HandleAuraModSilence(bool apply, bool Real)
+void AuraEffect::HandleAuraModSilence(bool apply, bool Real, bool /*changeAmount*/)
{
// only at real add/remove aura
if(!Real)
@@ -3877,10 +3952,10 @@ void AuraEffect::HandleAuraModSilence(bool apply, bool Real)
}
}
-void AuraEffect::HandleModThreat(bool apply, bool Real)
+void AuraEffect::HandleModThreat(bool apply, bool Real, bool changeAmount)
{
// only at real add/remove aura
- if(!Real)
+ if(!Real && !changeAmount)
return;
if(!m_target->isAlive())
@@ -3919,10 +3994,10 @@ void AuraEffect::HandleModThreat(bool apply, bool Real)
}
}
-void AuraEffect::HandleAuraModTotalThreat(bool apply, bool Real)
+void AuraEffect::HandleAuraModTotalThreat(bool apply, bool Real, bool changeAmount)
{
// only at real add/remove aura
- if(!Real)
+ if(!Real && !changeAmount)
return;
if(!m_target->isAlive() || m_target->GetTypeId()!= TYPEID_PLAYER)
@@ -3942,7 +4017,7 @@ void AuraEffect::HandleAuraModTotalThreat(bool apply, bool Real)
m_target->getHostilRefManager().threatAssist(caster, threatMod);
}
-void AuraEffect::HandleModTaunt(bool apply, bool Real)
+void AuraEffect::HandleModTaunt(bool apply, bool Real, bool /*changeAmount*/)
{
// only at real add/remove aura
if(!Real)
@@ -3968,10 +4043,10 @@ void AuraEffect::HandleModTaunt(bool apply, bool Real)
/*********************************************************/
/*** MODIFY SPEED ***/
/*********************************************************/
-void AuraEffect::HandleAuraModIncreaseSpeed(bool apply, bool Real)
+void AuraEffect::HandleAuraModIncreaseSpeed(bool apply, bool Real, bool changeAmount)
{
// all applied/removed only at real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
if(apply) // Dash wont work if you are not in cat form
@@ -3981,19 +4056,19 @@ void AuraEffect::HandleAuraModIncreaseSpeed(bool apply, bool Real)
m_target->UpdateSpeed(MOVE_RUN, true);
}
-void AuraEffect::HandleAuraModIncreaseMountedSpeed(bool /*apply*/, bool Real)
+void AuraEffect::HandleAuraModIncreaseMountedSpeed(bool /*apply*/, bool Real, bool changeAmount)
{
// all applied/removed only at real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
m_target->UpdateSpeed(MOVE_RUN, true);
}
-void AuraEffect::HandleAuraModIncreaseFlightSpeed(bool apply, bool Real)
+void AuraEffect::HandleAuraModIncreaseFlightSpeed(bool apply, bool Real, bool changeAmount)
{
// all applied/removed only at real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
// Enable Fly mode for flying mounts
@@ -4020,19 +4095,19 @@ void AuraEffect::HandleAuraModIncreaseFlightSpeed(bool apply, bool Real)
m_target->UpdateSpeed(MOVE_FLIGHT, true);
}
-void AuraEffect::HandleAuraModIncreaseSwimSpeed(bool /*apply*/, bool Real)
+void AuraEffect::HandleAuraModIncreaseSwimSpeed(bool /*apply*/, bool Real, bool changeAmount)
{
// all applied/removed only at real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
m_target->UpdateSpeed(MOVE_SWIM, true);
}
-void AuraEffect::HandleAuraModDecreaseSpeed(bool /*apply*/, bool Real)
+void AuraEffect::HandleAuraModDecreaseSpeed(bool /*apply*/, bool Real, bool changeAmount)
{
// all applied/removed only at real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
m_target->UpdateSpeed(MOVE_RUN, true);
@@ -4040,10 +4115,10 @@ void AuraEffect::HandleAuraModDecreaseSpeed(bool /*apply*/, bool Real)
m_target->UpdateSpeed(MOVE_FLIGHT, true);
}
-void AuraEffect::HandleAuraModUseNormalSpeed(bool /*apply*/, bool Real)
+void AuraEffect::HandleAuraModUseNormalSpeed(bool /*apply*/, bool Real, bool changeAmount)
{
// all applied/removed only at real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
m_target->UpdateSpeed(MOVE_RUN, true);
@@ -4055,7 +4130,7 @@ void AuraEffect::HandleAuraModUseNormalSpeed(bool /*apply*/, bool Real)
/*** IMMUNITY ***/
/*********************************************************/
-void AuraEffect::HandleModStateImmunityMask(bool apply, bool Real)
+void AuraEffect::HandleModStateImmunityMask(bool apply, bool Real, bool /*changeAmount*/)
{
std::list <AuraType> immunity_list;
if (GetMiscValue() & (1<<10))
@@ -4096,7 +4171,7 @@ void AuraEffect::HandleModStateImmunityMask(bool apply, bool Real)
}
}
-void AuraEffect::HandleModMechanicImmunity(bool apply, bool Real)
+void AuraEffect::HandleModMechanicImmunity(bool apply, bool Real, bool /*changeAmount*/)
{
uint32 mechanic;
mechanic = 1 << GetMiscValue();
@@ -4184,7 +4259,7 @@ void AuraEffect::HandleModMechanicImmunity(bool apply, bool Real)
}
//this method is called whenever we add / remove aura which gives m_target some imunity to some spell effect
-void AuraEffect::HandleAuraModEffectImmunity(bool apply, bool Real)
+void AuraEffect::HandleAuraModEffectImmunity(bool apply, bool Real, bool /*changeAmount*/)
{
// when removing flag aura, handle flag drop
if( !apply && m_target->GetTypeId() == TYPEID_PLAYER
@@ -4205,7 +4280,7 @@ void AuraEffect::HandleAuraModEffectImmunity(bool apply, bool Real)
m_target->ApplySpellImmune(GetId(),IMMUNITY_EFFECT,GetMiscValue(),apply);
}
-void AuraEffect::HandleAuraModStateImmunity(bool apply, bool Real)
+void AuraEffect::HandleAuraModStateImmunity(bool apply, bool Real, bool /*changeAmount*/)
{
if(apply && Real && GetSpellProto()->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)
{
@@ -4215,7 +4290,7 @@ void AuraEffect::HandleAuraModStateImmunity(bool apply, bool Real)
m_target->ApplySpellImmune(GetId(),IMMUNITY_STATE,GetMiscValue(),apply);
}
-void AuraEffect::HandleAuraModSchoolImmunity(bool apply, bool Real)
+void AuraEffect::HandleAuraModSchoolImmunity(bool apply, bool Real, bool /*changeAmount*/)
{
if(apply && GetMiscValue() == SPELL_SCHOOL_MASK_NORMAL)
m_target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION);
@@ -4257,12 +4332,12 @@ void AuraEffect::HandleAuraModSchoolImmunity(bool apply, bool Real)
}
}
-void AuraEffect::HandleAuraModDmgImmunity(bool apply, bool Real)
+void AuraEffect::HandleAuraModDmgImmunity(bool apply, bool Real, bool /*changeAmount*/)
{
m_target->ApplySpellImmune(GetId(),IMMUNITY_DAMAGE,GetMiscValue(),apply);
}
-void AuraEffect::HandleAuraModDispelImmunity(bool apply, bool Real)
+void AuraEffect::HandleAuraModDispelImmunity(bool apply, bool Real, bool /*changeAmount*/)
{
// all applied/removed only at real aura add/remove
if(!Real)
@@ -4271,13 +4346,13 @@ void AuraEffect::HandleAuraModDispelImmunity(bool apply, bool Real)
m_target->ApplySpellDispelImmunity(m_spellProto, DispelType(GetMiscValue()), apply);
}
-void AuraEffect::HandleAuraProcTriggerSpell(bool apply, bool Real)
+void AuraEffect::HandleAuraProcTriggerSpell(bool apply, bool Real, bool /*changeAmount*/)
{
if(!Real)
return;
}
-void AuraEffect::HandleAuraModStalked(bool apply, bool Real)
+void AuraEffect::HandleAuraModStalked(bool apply, bool Real, bool /*changeAmount*/)
{
// used by spells: Hunter's Mark, Mind Vision, Syndicate Tracker (MURP) DND
if(apply)
@@ -4290,30 +4365,24 @@ void AuraEffect::HandleAuraModStalked(bool apply, bool Real)
/*** PERIODIC ***/
/*********************************************************/
-void AuraEffect::HandlePeriodicTriggerSpell(bool apply, bool Real)
+void AuraEffect::HandlePeriodicTriggerSpell(bool apply, bool Real, bool /*changeAmount*/)
{
m_isPeriodic = apply;
- if (m_spellProto->Id == 66 && !apply)
+ if (Real && m_spellProto->Id == 66 && !apply)
{
if (GetParentAura()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
m_target->CastSpell(m_target, 32612, true, NULL, this);
}
}
-void AuraEffect::HandlePeriodicTriggerSpellWithValue(bool apply, bool Real)
+void AuraEffect::HandlePeriodicTriggerSpellWithValue(bool apply, bool Real, bool /*changeAmount*/)
{
m_isPeriodic = apply;
-
- // Wrath of the Astromancer
- if(!apply && m_spellProto->Id == 42783)
- {
- m_target->CastSpell(m_target, 42787, true, 0, this);
- }
}
-void AuraEffect::HandlePeriodicEnergize(bool apply, bool Real)
+void AuraEffect::HandlePeriodicEnergize(bool apply, bool Real, bool changeAmount)
{
- if (!Real)
+ if(!Real && !changeAmount)
return;
m_isPeriodic = apply;
@@ -4324,15 +4393,15 @@ void AuraEffect::HandlePeriodicEnergize(bool apply, bool Real)
m_amount = m_target->GetMaxPower(POWER_MANA) * 25 / 10000;
}
-void AuraEffect::HandleAuraPowerBurn(bool apply, bool Real)
+void AuraEffect::HandleAuraPowerBurn(bool apply, bool Real, bool /*changeAmount*/)
{
m_isPeriodic = apply;
}
-void AuraEffect::HandleAuraPeriodicDummy(bool apply, bool Real)
+void AuraEffect::HandleAuraPeriodicDummy(bool apply, bool Real, bool changeAmount)
{
// spells required only Real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
// For prevent double apply bonuses
@@ -4355,15 +4424,15 @@ void AuraEffect::HandleAuraPeriodicDummy(bool apply, bool Real)
m_isPeriodic = apply;
}
-void AuraEffect::HandlePeriodicHeal(bool apply, bool Real)
+void AuraEffect::HandlePeriodicHeal(bool apply, bool Real, bool /*changeAmount*/)
{
m_isPeriodic = apply;
}
-void AuraEffect::HandlePeriodicDamage(bool apply, bool Real)
+void AuraEffect::HandlePeriodicDamage(bool apply, bool Real, bool changeAmount)
{
// spells required only Real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
m_isPeriodic = apply;
@@ -4511,22 +4580,22 @@ void AuraEffect::HandlePeriodicDamage(bool apply, bool Real)
}
}
-void AuraEffect::HandlePeriodicDamagePCT(bool apply, bool Real)
+void AuraEffect::HandlePeriodicDamagePCT(bool apply, bool Real, bool /*changeAmount*/)
{
m_isPeriodic = apply;
}
-void AuraEffect::HandlePeriodicLeech(bool apply, bool Real)
+void AuraEffect::HandlePeriodicLeech(bool apply, bool Real, bool /*changeAmount*/)
{
m_isPeriodic = apply;
}
-void AuraEffect::HandlePeriodicManaLeech(bool apply, bool Real)
+void AuraEffect::HandlePeriodicManaLeech(bool apply, bool Real, bool /*changeAmount*/)
{
m_isPeriodic = apply;
}
-void AuraEffect::HandlePeriodicHealthFunnel(bool apply, bool Real)
+void AuraEffect::HandlePeriodicHealthFunnel(bool apply, bool Real, bool /*changeAmount*/)
{
m_isPeriodic = apply;
}
@@ -4539,7 +4608,7 @@ void AuraEffect::HandlePeriodicHealthFunnel(bool apply, bool Real)
/*** RESISTANCE ***/
/********************************/
-void AuraEffect::HandleAuraModResistanceExclusive(bool apply, bool Real)
+void AuraEffect::HandleAuraModResistanceExclusive(bool apply, bool Rea, bool /*changeAmount*/)
{
for(int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL;x++)
{
@@ -4552,7 +4621,7 @@ void AuraEffect::HandleAuraModResistanceExclusive(bool apply, bool Real)
}
}
-void AuraEffect::HandleAuraModResistance(bool apply, bool Real)
+void AuraEffect::HandleAuraModResistance(bool apply, bool Real, bool /*changeAmount*/)
{
for(int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL;x++)
{
@@ -4566,7 +4635,7 @@ void AuraEffect::HandleAuraModResistance(bool apply, bool Real)
}
-void AuraEffect::HandleAuraModBaseResistancePCT(bool apply, bool Real)
+void AuraEffect::HandleAuraModBaseResistancePCT(bool apply, bool Real, bool /*changeAmount*/)
{
// only players have base stats
if(m_target->GetTypeId() != TYPEID_PLAYER)
@@ -4585,7 +4654,7 @@ void AuraEffect::HandleAuraModBaseResistancePCT(bool apply, bool Real)
}
}
-void AuraEffect::HandleModResistancePercent(bool apply, bool Real)
+void AuraEffect::HandleModResistancePercent(bool apply, bool Real, bool /*changeAmount*/)
{
for(int8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++)
{
@@ -4601,7 +4670,7 @@ void AuraEffect::HandleModResistancePercent(bool apply, bool Real)
}
}
-void AuraEffect::HandleModBaseResistance(bool apply, bool Real)
+void AuraEffect::HandleModBaseResistance(bool apply, bool Real, bool /*changeAmount*/)
{
// only players have base stats
if(m_target->GetTypeId() != TYPEID_PLAYER)
@@ -4622,7 +4691,7 @@ void AuraEffect::HandleModBaseResistance(bool apply, bool Real)
/*** STAT ***/
/********************************/
-void AuraEffect::HandleAuraModStat(bool apply, bool Real)
+void AuraEffect::HandleAuraModStat(bool apply, bool Real, bool /*changeAmount*/)
{
if (GetMiscValue() < -2 || GetMiscValue() > 4)
{
@@ -4643,7 +4712,7 @@ void AuraEffect::HandleAuraModStat(bool apply, bool Real)
}
}
-void AuraEffect::HandleModPercentStat(bool apply, bool Real)
+void AuraEffect::HandleModPercentStat(bool apply, bool Real, bool /*changeAmount*/)
{
if (GetMiscValue() < -1 || GetMiscValue() > 4)
{
@@ -4662,7 +4731,7 @@ void AuraEffect::HandleModPercentStat(bool apply, bool Real)
}
}
-void AuraEffect::HandleModSpellDamagePercentFromStat(bool /*apply*/, bool Real)
+void AuraEffect::HandleModSpellDamagePercentFromStat(bool /*apply*/, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId() != TYPEID_PLAYER)
return;
@@ -4673,7 +4742,7 @@ void AuraEffect::HandleModSpellDamagePercentFromStat(bool /*apply*/, bool Real)
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
}
-void AuraEffect::HandleModSpellHealingPercentFromStat(bool /*apply*/, bool Real)
+void AuraEffect::HandleModSpellHealingPercentFromStat(bool /*apply*/, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId() != TYPEID_PLAYER)
return;
@@ -4682,16 +4751,7 @@ void AuraEffect::HandleModSpellHealingPercentFromStat(bool /*apply*/, bool Real)
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
}
-void AuraEffect::HandleAuraModDispelResist(bool apply, bool Real)
-{
- if(!Real || !apply)
- return;
-
- if(GetId()==33206)
- m_target->CastSpell(m_target,44416,true,NULL,this,GetCasterGUID());
-}
-
-void AuraEffect::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool Real)
+void AuraEffect::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId() != TYPEID_PLAYER)
return;
@@ -4702,7 +4762,7 @@ void AuraEffect::HandleModSpellDamagePercentFromAttackPower(bool /*apply*/, bool
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
}
-void AuraEffect::HandleModSpellHealingPercentFromAttackPower(bool /*apply*/, bool Real)
+void AuraEffect::HandleModSpellHealingPercentFromAttackPower(bool /*apply*/, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId() != TYPEID_PLAYER)
return;
@@ -4711,7 +4771,7 @@ void AuraEffect::HandleModSpellHealingPercentFromAttackPower(bool /*apply*/, boo
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
}
-void AuraEffect::HandleModHealingDone(bool /*apply*/, bool Real)
+void AuraEffect::HandleModHealingDone(bool /*apply*/, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId() != TYPEID_PLAYER)
return;
@@ -4720,7 +4780,7 @@ void AuraEffect::HandleModHealingDone(bool /*apply*/, bool Real)
((Player*)m_target)->UpdateSpellDamageAndHealingBonus();
}
-void AuraEffect::HandleModTotalPercentStat(bool apply, bool Real)
+void AuraEffect::HandleModTotalPercentStat(bool apply, bool Real, bool /*changeAmount*/)
{
if (GetMiscValue() < -1 || GetMiscValue() > 4)
{
@@ -4751,7 +4811,7 @@ void AuraEffect::HandleModTotalPercentStat(bool apply, bool Real)
}
}
-void AuraEffect::HandleAuraModResistenceOfStatPercent(bool /*apply*/, bool Real)
+void AuraEffect::HandleAuraModResistenceOfStatPercent(bool /*apply*/, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId() != TYPEID_PLAYER)
return;
@@ -4771,12 +4831,12 @@ void AuraEffect::HandleAuraModResistenceOfStatPercent(bool /*apply*/, bool Real)
/********************************/
/*** HEAL & ENERGIZE ***/
/********************************/
-void AuraEffect::HandleAuraModTotalHealthPercentRegen(bool apply, bool Real)
+void AuraEffect::HandleAuraModTotalHealthPercentRegen(bool apply, bool Real, bool /*changeAmount*/)
{
m_isPeriodic = apply;
}
-void AuraEffect::HandleAuraModTotalEnergyPercentRegen(bool apply, bool Real)
+void AuraEffect::HandleAuraModTotalEnergyPercentRegen(bool apply, bool Real, bool /*changeAmount*/)
{
if(m_amplitude == 0)
m_amplitude = 1000;
@@ -4785,7 +4845,7 @@ void AuraEffect::HandleAuraModTotalEnergyPercentRegen(bool apply, bool Real)
m_isPeriodic = apply;
}
-void AuraEffect::HandleModRegen(bool apply, bool Real) // eating
+void AuraEffect::HandleModRegen(bool apply, bool Real, bool /*changeAmount*/) // eating
{
if(m_amplitude == 0)
m_amplitude = 5000;
@@ -4794,9 +4854,9 @@ void AuraEffect::HandleModRegen(bool apply, bool Real) // eating
m_isPeriodic = apply;
}
-void AuraEffect::HandleModPowerRegen(bool apply, bool Real) // drinking
+void AuraEffect::HandleModPowerRegen(bool apply, bool Real, bool changeAmount) // drinking
{
- if (!Real)
+ if(!Real && !changeAmount)
return;
Powers pt = m_target->getPowerType();
@@ -4817,10 +4877,10 @@ void AuraEffect::HandleModPowerRegen(bool apply, bool Real) // drinking
m_isPeriodic = apply;
}
-void AuraEffect::HandleModPowerRegenPCT(bool /*apply*/, bool Real)
+void AuraEffect::HandleModPowerRegenPCT(bool /*apply*/, bool Real, bool changeAmount)
{
// spells required only Real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
if (m_target->GetTypeId() != TYPEID_PLAYER)
@@ -4831,10 +4891,10 @@ void AuraEffect::HandleModPowerRegenPCT(bool /*apply*/, bool Real)
((Player*)m_target)->UpdateManaRegen();
}
-void AuraEffect::HandleModManaRegen(bool /*apply*/, bool Real)
+void AuraEffect::HandleModManaRegen(bool /*apply*/, bool Real, bool changeAmount)
{
// spells required only Real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
if (m_target->GetTypeId() != TYPEID_PLAYER)
@@ -4844,7 +4904,7 @@ void AuraEffect::HandleModManaRegen(bool /*apply*/, bool Real)
((Player*)m_target)->UpdateManaRegen();
}
-void AuraEffect::HandleComprehendLanguage(bool apply, bool Real)
+void AuraEffect::HandleComprehendLanguage(bool apply, bool Real, bool /*changeAmount*/)
{
if(apply)
m_target->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_COMPREHEND_LANG);
@@ -4852,9 +4912,9 @@ void AuraEffect::HandleComprehendLanguage(bool apply, bool Real)
m_target->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_COMPREHEND_LANG);
}
-void AuraEffect::HandleAuraModIncreaseHealth(bool apply, bool Real)
+void AuraEffect::HandleAuraModIncreaseHealth(bool apply, bool Real, bool changeAmount)
{
- if(Real)
+ if(Real || changeAmount)
{
if(apply)
{
@@ -4872,7 +4932,7 @@ void AuraEffect::HandleAuraModIncreaseHealth(bool apply, bool Real)
}
}
-void AuraEffect::HandleAuraModIncreaseMaxHealth(bool apply, bool Real)
+void AuraEffect::HandleAuraModIncreaseMaxHealth(bool apply, bool Real, bool /*changeAmount*/)
{
uint32 oldhealth = m_target->GetHealth();
double healthPercentage = (double)oldhealth / (double)m_target->GetMaxHealth();
@@ -4890,7 +4950,7 @@ void AuraEffect::HandleAuraModIncreaseMaxHealth(bool apply, bool Real)
}
}
-void AuraEffect::HandleAuraModIncreaseEnergy(bool apply, bool Real)
+void AuraEffect::HandleAuraModIncreaseEnergy(bool apply, bool Real, bool /*changeAmount*/)
{
Powers powerType = m_target->getPowerType();
if(int32(powerType) != GetMiscValue())
@@ -4901,7 +4961,7 @@ void AuraEffect::HandleAuraModIncreaseEnergy(bool apply, bool Real)
m_target->HandleStatModifier(unitMod, TOTAL_VALUE, float(m_amount), apply);
}
-void AuraEffect::HandleAuraModIncreaseEnergyPercent(bool apply, bool /*Real*/)
+void AuraEffect::HandleAuraModIncreaseEnergyPercent(bool apply, bool /*Real*/, bool /*changeAmount*/)
{
Powers powerType = m_target->getPowerType();
if(int32(powerType) != GetMiscValue())
@@ -4912,12 +4972,12 @@ void AuraEffect::HandleAuraModIncreaseEnergyPercent(bool apply, bool /*Real*/)
m_target->HandleStatModifier(unitMod, TOTAL_PCT, float(m_amount), apply);
}
-void AuraEffect::HandleAuraModIncreaseHealthPercent(bool apply, bool /*Real*/)
+void AuraEffect::HandleAuraModIncreaseHealthPercent(bool apply, bool /*Real*/, bool /*changeAmount*/)
{
m_target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_PCT, float(m_amount), apply);
}
-void AuraEffect::HandleAuraIncreaseBaseHealthPercent(bool apply, bool /*Real*/)
+void AuraEffect::HandleAuraIncreaseBaseHealthPercent(bool apply, bool /*Real*/, bool /*changeAmount*/)
{
m_target->HandleStatModifier(UNIT_MOD_HEALTH, BASE_PCT, float(m_amount), apply);
}
@@ -4926,7 +4986,7 @@ void AuraEffect::HandleAuraIncreaseBaseHealthPercent(bool apply, bool /*Real*/)
/*** FIGHT ***/
/********************************/
-void AuraEffect::HandleAuraModParryPercent(bool /*apply*/, bool Real)
+void AuraEffect::HandleAuraModParryPercent(bool /*apply*/, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId()!=TYPEID_PLAYER)
return;
@@ -4934,7 +4994,7 @@ void AuraEffect::HandleAuraModParryPercent(bool /*apply*/, bool Real)
((Player*)m_target)->UpdateParryPercentage();
}
-void AuraEffect::HandleAuraModDodgePercent(bool /*apply*/, bool Real)
+void AuraEffect::HandleAuraModDodgePercent(bool /*apply*/, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId()!=TYPEID_PLAYER)
return;
@@ -4943,7 +5003,7 @@ void AuraEffect::HandleAuraModDodgePercent(bool /*apply*/, bool Real)
//sLog.outError("BONUS DODGE CHANCE: + %f", float(m_amount));
}
-void AuraEffect::HandleAuraModBlockPercent(bool /*apply*/, bool Real)
+void AuraEffect::HandleAuraModBlockPercent(bool /*apply*/, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId()!=TYPEID_PLAYER)
return;
@@ -4952,10 +5012,10 @@ void AuraEffect::HandleAuraModBlockPercent(bool /*apply*/, bool Real)
//sLog.outError("BONUS BLOCK CHANCE: + %f", float(m_amount));
}
-void AuraEffect::HandleAuraModRegenInterrupt(bool /*apply*/, bool Real)
+void AuraEffect::HandleAuraModRegenInterrupt(bool /*apply*/, bool Real, bool changeAmount)
{
// spells required only Real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
if(m_target->GetTypeId()!=TYPEID_PLAYER)
@@ -4964,13 +5024,13 @@ void AuraEffect::HandleAuraModRegenInterrupt(bool /*apply*/, bool Real)
((Player*)m_target)->UpdateManaRegen();
}
-void AuraEffect::HandleAuraModCritPercent(bool apply, bool Real)
+void AuraEffect::HandleAuraModCritPercent(bool apply, bool Real, bool changeAmount)
{
if(m_target->GetTypeId()!=TYPEID_PLAYER)
return;
// apply item specific bonuses for already equipped weapon
- if(Real)
+ if(Real || changeAmount)
{
for(int i = 0; i < MAX_ATTACK; ++i)
if(Item* pItem = ((Player*)m_target)->GetWeaponForAttack(WeaponAttackType(i)))
@@ -4993,7 +5053,7 @@ void AuraEffect::HandleAuraModCritPercent(bool apply, bool Real)
}
}
-void AuraEffect::HandleModHitChance(bool apply, bool Real)
+void AuraEffect::HandleModHitChance(bool apply, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId() == TYPEID_PLAYER)
{
@@ -5007,7 +5067,7 @@ void AuraEffect::HandleModHitChance(bool apply, bool Real)
}
}
-void AuraEffect::HandleModSpellHitChance(bool apply, bool Real)
+void AuraEffect::HandleModSpellHitChance(bool apply, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId() == TYPEID_PLAYER)
{
@@ -5019,10 +5079,10 @@ void AuraEffect::HandleModSpellHitChance(bool apply, bool Real)
}
}
-void AuraEffect::HandleModSpellCritChance(bool apply, bool Real)
+void AuraEffect::HandleModSpellCritChance(bool apply, bool Real, bool changeAmount)
{
// spells required only Real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
if(m_target->GetTypeId() == TYPEID_PLAYER)
@@ -5035,10 +5095,10 @@ void AuraEffect::HandleModSpellCritChance(bool apply, bool Real)
}
}
-void AuraEffect::HandleModSpellCritChanceShool(bool /*apply*/, bool Real)
+void AuraEffect::HandleModSpellCritChanceShool(bool /*apply*/, bool Real, bool changeAmount)
{
// spells required only Real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
if(m_target->GetTypeId() != TYPEID_PLAYER)
@@ -5053,19 +5113,19 @@ void AuraEffect::HandleModSpellCritChanceShool(bool /*apply*/, bool Real)
/*** ATTACK SPEED ***/
/********************************/
-void AuraEffect::HandleModCastingSpeed(bool apply, bool Real)
+void AuraEffect::HandleModCastingSpeed(bool apply, bool Real, bool /*changeAmount*/)
{
m_target->ApplyCastTimePercentMod(m_amount,apply);
}
-void AuraEffect::HandleModMeleeRangedSpeedPct(bool apply, bool Real)
+void AuraEffect::HandleModMeleeRangedSpeedPct(bool apply, bool Real, bool /*changeAmount*/)
{
m_target->ApplyAttackTimePercentMod(BASE_ATTACK,m_amount,apply);
m_target->ApplyAttackTimePercentMod(OFF_ATTACK,m_amount,apply);
m_target->ApplyAttackTimePercentMod(RANGED_ATTACK, m_amount, apply);
}
-void AuraEffect::HandleModCombatSpeedPct(bool apply, bool Real)
+void AuraEffect::HandleModCombatSpeedPct(bool apply, bool Real, bool /*changeAmount*/)
{
m_target->ApplyCastTimePercentMod(m_amount,apply);
m_target->ApplyAttackTimePercentMod(BASE_ATTACK,m_amount,apply);
@@ -5073,7 +5133,7 @@ void AuraEffect::HandleModCombatSpeedPct(bool apply, bool Real)
m_target->ApplyAttackTimePercentMod(RANGED_ATTACK, m_amount, apply);
}
-void AuraEffect::HandleModAttackSpeed(bool apply, bool Real)
+void AuraEffect::HandleModAttackSpeed(bool apply, bool Real, bool /*changeAmount*/)
{
if(!m_target->isAlive() )
return;
@@ -5081,19 +5141,19 @@ void AuraEffect::HandleModAttackSpeed(bool apply, bool Real)
m_target->ApplyAttackTimePercentMod(BASE_ATTACK,m_amount,apply);
}
-void AuraEffect::HandleHaste(bool apply, bool Real)
+void AuraEffect::HandleHaste(bool apply, bool Real, bool /*changeAmount*/)
{
m_target->ApplyAttackTimePercentMod(BASE_ATTACK, m_amount,apply);
m_target->ApplyAttackTimePercentMod(OFF_ATTACK, m_amount,apply);
m_target->ApplyAttackTimePercentMod(RANGED_ATTACK,m_amount,apply);
}
-void AuraEffect::HandleAuraModRangedHaste(bool apply, bool Real)
+void AuraEffect::HandleAuraModRangedHaste(bool apply, bool Real, bool /*changeAmount*/)
{
m_target->ApplyAttackTimePercentMod(RANGED_ATTACK, m_amount, apply);
}
-void AuraEffect::HandleRangedAmmoHaste(bool apply, bool Real)
+void AuraEffect::HandleRangedAmmoHaste(bool apply, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId() != TYPEID_PLAYER)
return;
@@ -5104,12 +5164,12 @@ void AuraEffect::HandleRangedAmmoHaste(bool apply, bool Real)
/*** ATTACK POWER ***/
/********************************/
-void AuraEffect::HandleAuraModAttackPower(bool apply, bool Real)
+void AuraEffect::HandleAuraModAttackPower(bool apply, bool Real, bool /*changeAmount*/)
{
m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(m_amount), apply);
}
-void AuraEffect::HandleAuraModRangedAttackPower(bool apply, bool Real)
+void AuraEffect::HandleAuraModRangedAttackPower(bool apply, bool Real, bool /*changeAmount*/)
{
if((m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0)
return;
@@ -5117,13 +5177,13 @@ void AuraEffect::HandleAuraModRangedAttackPower(bool apply, bool Real)
m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(m_amount), apply);
}
-void AuraEffect::HandleAuraModAttackPowerPercent(bool apply, bool Real)
+void AuraEffect::HandleAuraModAttackPowerPercent(bool apply, bool Real, bool /*changeAmount*/)
{
//UNIT_FIELD_ATTACK_POWER_MULTIPLIER = multiplier - 1
m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_PCT, float(m_amount), apply);
}
-void AuraEffect::HandleAuraModRangedAttackPowerPercent(bool apply, bool Real)
+void AuraEffect::HandleAuraModRangedAttackPowerPercent(bool apply, bool Real, bool /*changeAmount*/)
{
if((m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0)
return;
@@ -5132,10 +5192,10 @@ void AuraEffect::HandleAuraModRangedAttackPowerPercent(bool apply, bool Real)
m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_PCT, float(m_amount), apply);
}
-void AuraEffect::HandleAuraModRangedAttackPowerOfStatPercent(bool apply, bool Real)
+void AuraEffect::HandleAuraModRangedAttackPowerOfStatPercent(bool apply, bool Real, bool changeAmount)
{
// spells required only Real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
// Recalculate bonus
@@ -5143,10 +5203,10 @@ void AuraEffect::HandleAuraModRangedAttackPowerOfStatPercent(bool apply, bool Re
((Player*)m_target)->UpdateAttackPowerAndDamage(true);
}
-void AuraEffect::HandleAuraModAttackPowerOfStatPercent(bool apply, bool Real)
+void AuraEffect::HandleAuraModAttackPowerOfStatPercent(bool apply, bool Real, bool changeAmount)
{
// spells required only Real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
// Recalculate bonus
@@ -5157,10 +5217,10 @@ void AuraEffect::HandleAuraModAttackPowerOfStatPercent(bool apply, bool Real)
/********************************/
/*** DAMAGE BONUS ***/
/********************************/
-void AuraEffect::HandleModDamageDone(bool apply, bool Real)
+void AuraEffect::HandleModDamageDone(bool apply, bool Real, bool changeAmount)
{
// apply item specific bonuses for already equipped weapon
- if(Real && m_target->GetTypeId()==TYPEID_PLAYER)
+ if((Real || changeAmount) && m_target->GetTypeId()==TYPEID_PLAYER)
{
for(int i = 0; i < MAX_ATTACK; ++i)
if(Item* pItem = ((Player*)m_target)->GetWeaponForAttack(WeaponAttackType(i)))
@@ -5238,12 +5298,12 @@ void AuraEffect::HandleModDamageDone(bool apply, bool Real)
}
}
-void AuraEffect::HandleModDamagePercentDone(bool apply, bool Real)
+void AuraEffect::HandleModDamagePercentDone(bool apply, bool Real, bool changeAmount)
{
sLog.outDebug("AURA MOD DAMAGE type:%u negative:%u", GetMiscValue(), GetParentAura()->IsPositive() ? 0 : 1);
// apply item specific bonuses for already equipped weapon
- if(Real && m_target->GetTypeId()==TYPEID_PLAYER)
+ if((Real || changeAmount) && m_target->GetTypeId()==TYPEID_PLAYER)
{
for(int i = 0; i < MAX_ATTACK; ++i)
if(Item* pItem = ((Player*)m_target)->GetWeaponForAttack(WeaponAttackType(i)))
@@ -5297,10 +5357,10 @@ void AuraEffect::HandleModDamagePercentDone(bool apply, bool Real)
m_target->ApplyModSignedFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT+i,m_amount/100.0f,apply);
}
-void AuraEffect::HandleModOffhandDamagePercent(bool apply, bool Real)
+void AuraEffect::HandleModOffhandDamagePercent(bool apply, bool Real, bool changeAmount)
{
// spells required only Real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
sLog.outDebug("AURA MOD OFFHAND DAMAGE");
@@ -5312,10 +5372,10 @@ void AuraEffect::HandleModOffhandDamagePercent(bool apply, bool Real)
/*** POWER COST ***/
/********************************/
-void AuraEffect::HandleModPowerCostPCT(bool apply, bool Real)
+void AuraEffect::HandleModPowerCostPCT(bool apply, bool Real, bool changeAmount)
{
// spells required only Real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
float amount = m_amount /100.0f;
@@ -5324,10 +5384,10 @@ void AuraEffect::HandleModPowerCostPCT(bool apply, bool Real)
m_target->ApplyModSignedFloatValue(UNIT_FIELD_POWER_COST_MULTIPLIER+i,amount,apply);
}
-void AuraEffect::HandleModPowerCost(bool apply, bool Real)
+void AuraEffect::HandleModPowerCost(bool apply, bool Real, bool changeAmount)
{
// spells required only Real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
for(int i = 0; i < MAX_SPELL_SCHOOL; ++i)
@@ -5335,7 +5395,7 @@ void AuraEffect::HandleModPowerCost(bool apply, bool Real)
m_target->ApplyModInt32Value(UNIT_FIELD_POWER_COST_MODIFIER+i,m_amount,apply);
}
-void AuraEffect::HandleNoReagentUseAura(bool Apply, bool Real)
+void AuraEffect::HandleNoReagentUseAura(bool Apply, bool Real, bool /*changeAmount*/)
{
// spells required only Real aura add/remove
if(!Real)
@@ -5356,7 +5416,7 @@ void AuraEffect::HandleNoReagentUseAura(bool Apply, bool Real)
/*** OTHERS ***/
/*********************************************************/
-void AuraEffect::HandleAuraAllowOnlyAbility(bool apply, bool Real)
+void AuraEffect::HandleAuraAllowOnlyAbility(bool apply, bool Real, bool /*changeAmount*/)
{
if(!Real)
return;
@@ -5373,9 +5433,9 @@ void AuraEffect::HandleAuraAllowOnlyAbility(bool apply, bool Real)
}
}
-void AuraEffect::HandleAuraEmpathy(bool apply, bool Real)
+void AuraEffect::HandleAuraEmpathy(bool apply, bool Real, bool /*changeAmount*/)
{
- if(m_target->GetTypeId() != TYPEID_UNIT)
+ if(!Real || m_target->GetTypeId() != TYPEID_UNIT)
return;
CreatureInfo const * ci = objmgr.GetCreatureTemplate(m_target->GetEntry());
@@ -5383,43 +5443,43 @@ void AuraEffect::HandleAuraEmpathy(bool apply, bool Real)
m_target->ApplyModUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_SPECIALINFO, apply);
}
-void AuraEffect::HandleAuraUntrackable(bool apply, bool Real)
+void AuraEffect::HandleAuraUntrackable(bool apply, bool Real, bool /*changeAmount*/)
{
+ if (!Real)
+ return;
if(apply)
m_target->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNTRACKABLE);
else
m_target->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_UNTRACKABLE);
}
-void AuraEffect::HandleAuraModPacify(bool apply, bool Real)
+void AuraEffect::HandleAuraModPacify(bool apply, bool Real, bool /*changeAmount*/)
{
- if(m_target->GetTypeId() != TYPEID_PLAYER)
+ if(!Real || m_target->GetTypeId() != TYPEID_PLAYER)
return;
if(apply)
m_target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED);
else
m_target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED);
-
-
- if(m_spellProto->Id == 45839){
- if(apply){
- m_target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- }else{
- m_target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- }
- }
}
-void AuraEffect::HandleAuraModPacifyAndSilence(bool apply, bool Real)
+void AuraEffect::HandleAuraModPacifyAndSilence(bool apply, bool Real, bool changeAmount)
{
- HandleAuraModPacify(apply,Real);
- HandleAuraModSilence(apply,Real);
+ if(m_spellProto->Id == 45839)
+ {
+ if(apply)
+ m_target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ else
+ m_target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ }
+ HandleAuraModPacify(apply,Real, changeAmount);
+ HandleAuraModSilence(apply,Real, changeAmount);
}
-void AuraEffect::HandleAuraGhost(bool apply, bool Real)
+void AuraEffect::HandleAuraGhost(bool apply, bool Real, bool /*changeAmount*/)
{
- if(m_target->GetTypeId() != TYPEID_PLAYER)
+ if(!Real || m_target->GetTypeId() != TYPEID_PLAYER)
return;
if(apply)
@@ -5432,7 +5492,7 @@ void AuraEffect::HandleAuraGhost(bool apply, bool Real)
}
}
-void AuraEffect::HandleAuraAllowFlight(bool apply, bool Real)
+void AuraEffect::HandleAuraAllowFlight(bool apply, bool Real, bool /*changeAmount*/)
{
// all applied/removed only at real aura add/remove
if(!Real)
@@ -5463,10 +5523,10 @@ void AuraEffect::HandleAuraAllowFlight(bool apply, bool Real)
m_target->SendMessageToSet(&data, true);
}
-void AuraEffect::HandleModRating(bool apply, bool Real)
+void AuraEffect::HandleModRating(bool apply, bool Real, bool changeAmount)
{
// spells required only Real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
if(m_target->GetTypeId() != TYPEID_PLAYER)
@@ -5477,10 +5537,10 @@ void AuraEffect::HandleModRating(bool apply, bool Real)
((Player*)m_target)->ApplyRatingMod(CombatRating(rating), m_amount, apply);
}
-void AuraEffect::HandleModRatingFromStat(bool apply, bool Real)
+void AuraEffect::HandleModRatingFromStat(bool apply, bool Real, bool changeAmount)
{
// spells required only Real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
if(m_target->GetTypeId() != TYPEID_PLAYER)
@@ -5491,7 +5551,7 @@ void AuraEffect::HandleModRatingFromStat(bool apply, bool Real)
((Player*)m_target)->ApplyRatingMod(CombatRating(rating), 0, apply);
}
-void AuraEffect::HandleForceMoveForward(bool apply, bool Real)
+void AuraEffect::HandleForceMoveForward(bool apply, bool Real, bool /*changeAmount*/)
{
if(!Real || m_target->GetTypeId() != TYPEID_PLAYER)
return;
@@ -5501,7 +5561,7 @@ void AuraEffect::HandleForceMoveForward(bool apply, bool Real)
m_target->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FORCE_MOVE);
}
-void AuraEffect::HandleAuraModExpertise(bool /*apply*/, bool Real)
+void AuraEffect::HandleAuraModExpertise(bool /*apply*/, bool Real, bool /*changeAmount*/)
{
if(m_target->GetTypeId() != TYPEID_PLAYER)
return;
@@ -5510,10 +5570,10 @@ void AuraEffect::HandleAuraModExpertise(bool /*apply*/, bool Real)
((Player*)m_target)->UpdateExpertise(OFF_ATTACK);
}
-void AuraEffect::HandleModTargetResistance(bool apply, bool Real)
+void AuraEffect::HandleModTargetResistance(bool apply, bool Real, bool changeAmount)
{
// spells required only Real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
// applied to damage as HandleNoImmediateEffect in Unit::CalcAbsorbResist and Unit::CalcArmorReducedDamage
@@ -5526,7 +5586,7 @@ void AuraEffect::HandleModTargetResistance(bool apply, bool Real)
m_target->ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE,m_amount, apply);
}
-void AuraEffect::HandleShieldBlockValue(bool apply, bool Real)
+void AuraEffect::HandleShieldBlockValue(bool apply, bool Real, bool /*changeAmount*/)
{
BaseModType modType = FLAT_MOD;
if(m_auraName == SPELL_AURA_MOD_SHIELD_BLOCKVALUE_PCT)
@@ -5536,10 +5596,10 @@ void AuraEffect::HandleShieldBlockValue(bool apply, bool Real)
((Player*)m_target)->HandleBaseModValue(SHIELD_BLOCK_VALUE, modType, float(m_amount), apply);
}
-void AuraEffect::HandleAuraRetainComboPoints(bool apply, bool Real)
+void AuraEffect::HandleAuraRetainComboPoints(bool apply, bool Real, bool changeAmount)
{
// spells required only Real aura add/remove
- if(!Real)
+ if(!Real && !changeAmount)
return;
if(m_target->GetTypeId() != TYPEID_PLAYER)
@@ -5554,7 +5614,7 @@ void AuraEffect::HandleAuraRetainComboPoints(bool apply, bool Real)
target->AddComboPoints(unit, -m_amount);
}
-void AuraEffect::HandleModUnattackable( bool Apply, bool Real )
+void AuraEffect::HandleModUnattackable( bool Apply, bool Real , bool /*changeAmount*/)
{
if(!Real)
return;
@@ -5568,7 +5628,7 @@ void AuraEffect::HandleModUnattackable( bool Apply, bool Real )
m_target->ApplyModFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE, Apply);
}
-void AuraEffect::HandleSpiritOfRedemption( bool apply, bool Real )
+void AuraEffect::HandleSpiritOfRedemption( bool apply, bool Real , bool /*changeAmount*/)
{
// spells required only Real aura add/remove
if(!Real)
@@ -5594,9 +5654,9 @@ void AuraEffect::HandleSpiritOfRedemption( bool apply, bool Real )
m_target->setDeathState(JUST_DIED);
}
-void AuraEffect::HandleSchoolAbsorb(bool apply, bool Real)
+void AuraEffect::HandleSchoolAbsorb(bool apply, bool Real, bool changeAmount)
{
- if(!Real)
+ if(!Real && !changeAmount)
return;
// prevent double apply bonuses
@@ -6655,7 +6715,7 @@ void AuraEffect::PeriodicDummyTick()
}
}
-void AuraEffect::HandlePreventFleeing(bool apply, bool Real)
+void AuraEffect::HandlePreventFleeing(bool apply, bool Real, bool /*changeAmount*/)
{
if(!Real)
return;
@@ -6671,9 +6731,9 @@ void AuraEffect::HandlePreventFleeing(bool apply, bool Real)
}
}
-void AuraEffect::HandleManaShield(bool apply, bool Real)
+void AuraEffect::HandleManaShield(bool apply, bool Real, bool changeAmount)
{
- if(!Real)
+ if(!Real && !changeAmount)
return;
// prevent double apply bonuses
@@ -6704,7 +6764,7 @@ void AuraEffect::HandleManaShield(bool apply, bool Real)
}
}
-void AuraEffect::HandleArenaPreparation(bool apply, bool Real)
+void AuraEffect::HandleArenaPreparation(bool apply, bool Real, bool /*changeAmount*/)
{
if(!Real)
return;
@@ -6719,7 +6779,7 @@ void AuraEffect::HandleArenaPreparation(bool apply, bool Real)
* Such auras are applied from a caster(=player) to a vehicle.
* This has been verified using spell #49256
*/
-void AuraEffect::HandleAuraControlVehicle(bool apply, bool Real)
+void AuraEffect::HandleAuraControlVehicle(bool apply, bool Real, bool /*changeAmount*/)
{
if(!Real)
return;
@@ -6751,7 +6811,7 @@ void AuraEffect::HandleAuraControlVehicle(bool apply, bool Real)
}*/
}
-void AuraEffect::HandleAuraConvertRune(bool apply, bool Real)
+void AuraEffect::HandleAuraConvertRune(bool apply, bool Real, bool /*changeAmount*/)
{
if(!Real)
return;
@@ -6788,7 +6848,7 @@ void AuraEffect::HandleAuraConvertRune(bool apply, bool Real)
// Control Auras
-void AuraEffect::HandleAuraModStun(bool apply, bool Real)
+void AuraEffect::HandleAuraModStun(bool apply, bool Real, bool /*changeAmount*/)
{
if(!Real)
return;
@@ -6796,7 +6856,7 @@ void AuraEffect::HandleAuraModStun(bool apply, bool Real)
m_target->SetControlled(apply, UNIT_STAT_STUNNED);
}
-void AuraEffect::HandleAuraModRoot(bool apply, bool Real)
+void AuraEffect::HandleAuraModRoot(bool apply, bool Real, bool /*changeAmount*/)
{
if(!Real)
return;
@@ -6806,7 +6866,7 @@ void AuraEffect::HandleAuraModRoot(bool apply, bool Real)
// Charm Auras
-void AuraEffect::HandleModPossess(bool apply, bool Real)
+void AuraEffect::HandleModPossess(bool apply, bool Real, bool /*changeAmount*/)
{
if(!Real)
return;
@@ -6814,7 +6874,7 @@ void AuraEffect::HandleModPossess(bool apply, bool Real)
Unit* caster = GetCaster();
if(caster && caster->GetTypeId() == TYPEID_UNIT)
{
- HandleModCharm(apply, Real);
+ HandleModCharm(apply, Real, false);
return;
}
@@ -6829,7 +6889,7 @@ void AuraEffect::HandleModPossess(bool apply, bool Real)
m_target->RemoveCharmedOrPossessedBy(caster);
}
-void AuraEffect::HandleModPossessPet(bool apply, bool Real)
+void AuraEffect::HandleModPossessPet(bool apply, bool Real, bool /*changeAmount*/)
{
if(!Real)
return;
@@ -6859,7 +6919,7 @@ void AuraEffect::HandleModPossessPet(bool apply, bool Real)
}
}
-void AuraEffect::HandleModCharm(bool apply, bool Real)
+void AuraEffect::HandleModCharm(bool apply, bool Real, bool /*changeAmount*/)
{
if(!Real)
return;
@@ -6877,7 +6937,7 @@ void AuraEffect::HandleModCharm(bool apply, bool Real)
m_target->RemoveCharmedOrPossessedBy(caster);
}
-void AuraEffect::HandlePhase(bool apply, bool Real)
+void AuraEffect::HandlePhase(bool apply, bool Real, bool /*changeAmount*/)
{
if(!Real)
return;
@@ -6935,26 +6995,7 @@ void AuraEffect::HandlePhase(bool apply, bool Real)
m_target->SetVisibility(m_target->GetVisibility());
}
-void Aura::UnregisterSingleCastAura()
-{
- if (IsSingleTarget())
- {
- Unit* caster = NULL;
- caster = GetCaster();
- if(caster)
- {
- caster->GetSingleCastAuras().remove(this);
- }
- else
- {
- sLog.outError("Couldn't find the caster of the single target aura, may crash later!");
- assert(false);
- }
- m_isSingleTargetAura = false;
- }
-}
-
-void AuraEffect::HandleAuraSafeFall( bool Apply, bool Real )
+void AuraEffect::HandleAuraSafeFall( bool Apply, bool Real , bool /*changeAmount*/)
{
// implemented in WorldSession::HandleMovementOpcodes
diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h
index 973272a75d2..148f09d3ffb 100644
--- a/src/game/SpellAuras.h
+++ b/src/game/SpellAuras.h
@@ -31,7 +31,7 @@ struct ProcTriggerSpell;
class Aura;
class AuraEffect;
-typedef void(AuraEffect::*pAuraHandler)(bool Apply, bool Real);
+typedef void(AuraEffect::*pAuraHandler)(bool Apply, bool Real, bool changeAmount);
// Real == true at aura add/remove
// Real == false at aura mod unapply/reapply; when adding/removing dependent aura/item/stat mods
//
@@ -44,6 +44,10 @@ typedef void(AuraEffect::*pAuraHandler)(bool Apply, bool Real);
// Other case choice: each code line moved under if(Real) check is Trinity speedup,
// each setting object update field code line moved under if(Real) check is significant Trinity speedup, and less server->client data sends
// each packet sending code moved under if(Real) check is _large_ Trinity speedup, and lot less server->client data sends
+//
+// changeAmount == true at changing existing aura amount - called wit real == false
+// if aura has amount dependant effect handler has to allow proceeding it
+// example: change speed aura, modifier aura
class TRINITY_DLL_SPEC Aura
{
@@ -81,13 +85,13 @@ class TRINITY_DLL_SPEC Aura
void SetStackAmount(uint8 num);
bool modStackAmount(int32 num); // return true if last charge dropped
uint32 GetAuraStateMask(){return m_auraStateMask;}
- void SetAuraState(uint8 num){m_auraStateMask |= 1<<(num-1);} //modifies aura's aura state (not unit!)
+ void SetAuraState(uint8 num){m_auraStateMask |= 1<<(num-1);} //modifies auras' aura state (not unit!)
void SetRemoveMode(AuraRemoveMode mode) { m_removeMode = mode; }
uint8 GetRemoveMode() const {return m_removeMode;}
inline uint8 GetEffectMask() const {return m_auraFlags & 7;}
- AuraEffect * GetPartAura (uint8 effIndex) const {return m_partAuras[effIndex];}
+ AuraEffect * GetPartAura (uint8 effIndex) const {assert (effIndex < MAX_SPELL_EFFECTS); return m_partAuras[effIndex];}
bool SetPartAura(AuraEffect* aurEff, uint8 effIndex);
bool IsPositive() const { return m_positive; }
@@ -169,162 +173,161 @@ class TRINITY_DLL_SPEC AuraEffect
friend AuraEffect* CreateAuraEffect(Aura * parentAura, uint32 effIndex, int32 *currentBasePoints, Unit * caster, Item * castItem, Unit * formalCaster);
friend void Aura::SetStackAmount(uint8 stackAmount);
//aura handlers
- void HandleNULL(bool, bool)
+ void HandleNULL(bool, bool, bool)
{
// NOT IMPLEMENTED
}
- void HandleUnused(bool, bool)
+ void HandleUnused(bool, bool, bool)
{
// NOT USED BY ANY SPELL OR USELESS
}
- void HandleNoImmediateEffect(bool, bool)
+ void HandleNoImmediateEffect(bool, bool, bool)
{
// aura not have immediate effect at add/remove and handled by ID in other code place
}
- void HandleBindSight(bool Apply, bool Real);
- void HandleModPossess(bool Apply, bool Real);
- void HandlePeriodicDamage(bool Apply, bool Real);
- void HandleAuraDummy(bool Apply, bool Real);
- void HandleAuraPeriodicDummy(bool apply, bool Real);
- void HandleModConfuse(bool Apply, bool Real);
- void HandleModCharm(bool Apply, bool Real);
- void HandleModFear(bool Apply, bool Real);
- void HandlePeriodicHeal(bool Apply, bool Real);
- void HandleModAttackSpeed(bool Apply, bool Real);
- void HandleModMeleeRangedSpeedPct(bool apply, bool Real);
- void HandleModCombatSpeedPct(bool apply, bool Real);
- void HandleModThreat(bool Apply, bool Real);
- void HandleModTaunt(bool Apply, bool Real);
- void HandleFeignDeath(bool Apply, bool Real);
- void HandleAuraModDisarm(bool Apply, bool Real);
- void HandleAuraModStalked(bool Apply, bool Real);
- void HandleAuraWaterWalk(bool Apply, bool Real);
- void HandleAuraFeatherFall(bool Apply, bool Real);
- void HandleAuraHover(bool Apply, bool Real);
- void HandleAddModifier(bool Apply, bool Real);
- void HandleAddTargetTrigger(bool Apply, bool Real);
- void HandleAuraModStun(bool Apply, bool Real);
- void HandleModDamageDone(bool Apply, bool Real);
- void HandleAuraUntrackable(bool Apply, bool Real);
- void HandleAuraEmpathy(bool Apply, bool Real);
- void HandleModOffhandDamagePercent(bool apply, bool Real);
- void HandleAuraModRangedAttackPower(bool Apply, bool Real);
- void HandleAuraModIncreaseEnergyPercent(bool Apply, bool Real);
- void HandleAuraModIncreaseHealthPercent(bool Apply, bool Real);
- void HandleAuraModRegenInterrupt(bool Apply, bool Real);
- void HandleHaste(bool Apply, bool Real);
- void HandlePeriodicTriggerSpell(bool Apply, bool Real);
- void HandlePeriodicTriggerSpellWithValue(bool apply, bool Real);
- void HandlePeriodicEnergize(bool Apply, bool Real);
- void HandleAuraModResistanceExclusive(bool Apply, bool Real);
- void HandleAuraSafeFall(bool Apply, bool Real);
- void HandleAuraModPetTalentsPoints(bool Apply, bool Real);
- void HandleModStealth(bool Apply, bool Real);
- void HandleInvisibility(bool Apply, bool Real);
- void HandleInvisibilityDetect(bool Apply, bool Real);
- void HandleAuraModTotalHealthPercentRegen(bool Apply, bool Real);
- void HandleAuraModTotalEnergyPercentRegen(bool Apply, bool Real);
- void HandleAuraModResistance(bool Apply, bool Real);
- void HandleAuraModRoot(bool Apply, bool Real);
- void HandleAuraModSilence(bool Apply, bool Real);
- void HandleAuraModStat(bool Apply, bool Real);
- void HandleAuraModIncreaseSpeed(bool Apply, bool Real);
- void HandleAuraModIncreaseMountedSpeed(bool Apply, bool Real);
- void HandleAuraModIncreaseFlightSpeed(bool Apply, bool Real);
- void HandleAuraModDecreaseSpeed(bool Apply, bool Real);
- void HandleAuraModUseNormalSpeed(bool Apply, bool Real);
- void HandleAuraModIncreaseHealth(bool Apply, bool Real);
- void HandleAuraModIncreaseEnergy(bool Apply, bool Real);
- void HandleAuraModShapeshift(bool Apply, bool Real);
- void HandleAuraModEffectImmunity(bool Apply, bool Real);
- void HandleAuraModStateImmunity(bool Apply, bool Real);
- void HandleAuraModSchoolImmunity(bool Apply, bool Real);
- void HandleAuraModDmgImmunity(bool Apply, bool Real);
- void HandleAuraModDispelImmunity(bool Apply, bool Real);
- void HandleAuraProcTriggerSpell(bool Apply, bool Real);
- void HandleAuraTrackCreatures(bool Apply, bool Real);
- void HandleAuraTrackResources(bool Apply, bool Real);
- void HandleAuraModParryPercent(bool Apply, bool Real);
- void HandleAuraModDodgePercent(bool Apply, bool Real);
- void HandleAuraModBlockPercent(bool Apply, bool Real);
- void HandleAuraModCritPercent(bool Apply, bool Real);
- void HandlePeriodicLeech(bool Apply, bool Real);
- void HandleModHitChance(bool Apply, bool Real);
- void HandleModSpellHitChance(bool Apply, bool Real);
- void HandleAuraModScale(bool Apply, bool Real);
- void HandlePeriodicManaLeech(bool Apply, bool Real);
- void HandlePeriodicHealthFunnel(bool apply, bool Real);
- void HandleModCastingSpeed(bool Apply, bool Real);
- void HandleAuraMounted(bool Apply, bool Real);
- void HandleWaterBreathing(bool Apply, bool Real);
- void HandleModBaseResistance(bool Apply, bool Real);
- void HandleModRegen(bool Apply, bool Real);
- void HandleModPowerRegen(bool Apply, bool Real);
- void HandleModPowerRegenPCT(bool Apply, bool Real);
- void HandleChannelDeathItem(bool Apply, bool Real);
- void HandlePeriodicDamagePCT(bool Apply, bool Real);
- void HandleAuraModAttackPower(bool Apply, bool Real);
- void HandleAuraTransform(bool Apply, bool Real);
- void HandleModSpellCritChance(bool Apply, bool Real);
- void HandleAuraModIncreaseSwimSpeed(bool Apply, bool Real);
- void HandleModPowerCostPCT(bool Apply, bool Real);
- void HandleModPowerCost(bool Apply, bool Real);
- void HandleFarSight(bool Apply, bool Real);
- void HandleModPossessPet(bool Apply, bool Real);
- void HandleModMechanicImmunity(bool Apply, bool Real);
- void HandleModStateImmunityMask(bool apply, bool Real);
- void HandleAuraModSkill(bool Apply, bool Real);
- void HandleModDamagePercentDone(bool Apply, bool Real);
- void HandleModPercentStat(bool Apply, bool Real);
- void HandleModResistancePercent(bool Apply, bool Real);
- void HandleAuraModBaseResistancePCT(bool Apply, bool Real);
- void HandleModShieldBlockPCT(bool Apply, bool Real);
- void HandleAuraTrackStealthed(bool Apply, bool Real);
- void HandleModShieldBlock(bool Apply, bool Real);
- void HandleForceReaction(bool Apply, bool Real);
- void HandleAuraModRangedHaste(bool Apply, bool Real);
- void HandleRangedAmmoHaste(bool Apply, bool Real);
- void HandleModHealingDone(bool Apply, bool Real);
- void HandleModTotalPercentStat(bool Apply, bool Real);
- void HandleAuraModTotalThreat(bool Apply, bool Real);
- void HandleModUnattackable(bool Apply, bool Real);
- void HandleAuraModPacify(bool Apply, bool Real);
- void HandleAuraGhost(bool Apply, bool Real);
- void HandleAuraAllowFlight(bool Apply, bool Real);
- void HandleModRating(bool apply, bool Real);
- void HandleModRatingFromStat(bool apply, bool Real);
- void HandleModTargetResistance(bool apply, bool Real);
- void HandleAuraModAttackPowerPercent(bool apply, bool Real);
- void HandleAuraModRangedAttackPowerPercent(bool apply, bool Real);
- void HandleAuraModRangedAttackPowerOfStatPercent(bool apply, bool Real);
- void HandleAuraModAttackPowerOfStatPercent(bool apply, bool Real);
- void HandleSpiritOfRedemption(bool apply, bool Real);
- void HandleModManaRegen(bool apply, bool Real);
- void HandleComprehendLanguage(bool apply, bool Real);
- void HandleShieldBlockValue(bool apply, bool Real);
- void HandleModSpellCritChanceShool(bool apply, bool Real);
- void HandleAuraRetainComboPoints(bool apply, bool Real);
- void HandleModSpellDamagePercentFromStat(bool apply, bool Real);
- void HandleModSpellHealingPercentFromStat(bool apply, bool Real);
- void HandleAuraModDispelResist(bool apply, bool Real);
- void HandleAuraControlVehicle(bool apply, bool Real);
- void HandleModSpellDamagePercentFromAttackPower(bool apply, bool Real);
- void HandleModSpellHealingPercentFromAttackPower(bool apply, bool Real);
- void HandleAuraModPacifyAndSilence(bool Apply, bool Real);
- void HandleAuraModIncreaseMaxHealth(bool apply, bool Real);
- void HandleAuraModExpertise(bool apply, bool Real);
- void HandleForceMoveForward(bool apply, bool Real);
- void HandleAuraModResistenceOfStatPercent(bool apply, bool Real);
- void HandleAuraPowerBurn(bool apply, bool Real);
- void HandleSchoolAbsorb(bool apply, bool Real);
- void HandlePreventFleeing(bool apply, bool Real);
- void HandleManaShield(bool apply, bool Real);
- void HandleArenaPreparation(bool apply, bool Real);
- void HandleAuraConvertRune(bool apply, bool Real);
- void HandleAuraIncreaseBaseHealthPercent(bool Apply, bool Real);
- void HandleNoReagentUseAura(bool Apply, bool Real);
- void HandlePhase(bool Apply, bool Real);
- void HandleAuraAllowOnlyAbility(bool apply, bool Real);
+ void HandleBindSight(bool Apply, bool Real, bool changeAmount);
+ void HandleModPossess(bool Apply, bool Real, bool changeAmount);
+ void HandlePeriodicDamage(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraDummy(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraPeriodicDummy(bool apply, bool Real, bool changeAmount);
+ void HandleModConfuse(bool Apply, bool Real, bool changeAmount);
+ void HandleModCharm(bool Apply, bool Real, bool changeAmount);
+ void HandleModFear(bool Apply, bool Real, bool changeAmount);
+ void HandlePeriodicHeal(bool Apply, bool Real, bool changeAmount);
+ void HandleModAttackSpeed(bool Apply, bool Real, bool changeAmount);
+ void HandleModMeleeRangedSpeedPct(bool apply, bool Real, bool changeAmount);
+ void HandleModCombatSpeedPct(bool apply, bool Real, bool changeAmount);
+ void HandleModThreat(bool Apply, bool Real, bool changeAmount);
+ void HandleModTaunt(bool Apply, bool Real, bool changeAmount);
+ void HandleFeignDeath(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModDisarm(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModStalked(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraWaterWalk(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraFeatherFall(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraHover(bool Apply, bool Real, bool changeAmount);
+ void HandleAddModifier(bool Apply, bool Real, bool changeAmount);
+ void HandleAddTargetTrigger(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModStun(bool Apply, bool Real, bool changeAmount);
+ void HandleModDamageDone(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraUntrackable(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraEmpathy(bool Apply, bool Real, bool changeAmount);
+ void HandleModOffhandDamagePercent(bool apply, bool Real, bool changeAmount);
+ void HandleAuraModRangedAttackPower(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModIncreaseEnergyPercent(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModIncreaseHealthPercent(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModRegenInterrupt(bool Apply, bool Real, bool changeAmount);
+ void HandleHaste(bool Apply, bool Real, bool changeAmount);
+ void HandlePeriodicTriggerSpell(bool Apply, bool Real, bool changeAmount);
+ void HandlePeriodicTriggerSpellWithValue(bool apply, bool Real, bool changeAmount);
+ void HandlePeriodicEnergize(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModResistanceExclusive(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraSafeFall(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModPetTalentsPoints(bool Apply, bool Real, bool changeAmount);
+ void HandleModStealth(bool Apply, bool Real, bool changeAmount);
+ void HandleInvisibility(bool Apply, bool Real, bool changeAmount);
+ void HandleInvisibilityDetect(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModTotalHealthPercentRegen(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModTotalEnergyPercentRegen(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModResistance(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModRoot(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModSilence(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModStat(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModIncreaseSpeed(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModIncreaseMountedSpeed(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModIncreaseFlightSpeed(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModDecreaseSpeed(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModUseNormalSpeed(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModIncreaseHealth(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModIncreaseEnergy(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModShapeshift(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModEffectImmunity(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModStateImmunity(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModSchoolImmunity(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModDmgImmunity(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModDispelImmunity(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraProcTriggerSpell(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraTrackCreatures(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraTrackResources(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModParryPercent(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModDodgePercent(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModBlockPercent(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModCritPercent(bool Apply, bool Real, bool changeAmount);
+ void HandlePeriodicLeech(bool Apply, bool Real, bool changeAmount);
+ void HandleModHitChance(bool Apply, bool Real, bool changeAmount);
+ void HandleModSpellHitChance(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModScale(bool Apply, bool Real, bool changeAmount);
+ void HandlePeriodicManaLeech(bool Apply, bool Real, bool changeAmount);
+ void HandlePeriodicHealthFunnel(bool apply, bool Real, bool changeAmount);
+ void HandleModCastingSpeed(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraMounted(bool Apply, bool Real, bool changeAmount);
+ void HandleWaterBreathing(bool Apply, bool Real, bool changeAmount);
+ void HandleModBaseResistance(bool Apply, bool Real, bool changeAmount);
+ void HandleModRegen(bool Apply, bool Real, bool changeAmount);
+ void HandleModPowerRegen(bool Apply, bool Real, bool changeAmount);
+ void HandleModPowerRegenPCT(bool Apply, bool Real, bool changeAmount);
+ void HandleChannelDeathItem(bool Apply, bool Real, bool changeAmount);
+ void HandlePeriodicDamagePCT(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModAttackPower(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraTransform(bool Apply, bool Real, bool changeAmount);
+ void HandleModSpellCritChance(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModIncreaseSwimSpeed(bool Apply, bool Real, bool changeAmount);
+ void HandleModPowerCostPCT(bool Apply, bool Real, bool changeAmount);
+ void HandleModPowerCost(bool Apply, bool Real, bool changeAmount);
+ void HandleFarSight(bool Apply, bool Real, bool changeAmount);
+ void HandleModPossessPet(bool Apply, bool Real, bool changeAmount);
+ void HandleModMechanicImmunity(bool Apply, bool Real, bool changeAmount);
+ void HandleModStateImmunityMask(bool apply, bool Real, bool changeAmount);
+ void HandleAuraModSkill(bool Apply, bool Real, bool changeAmount);
+ void HandleModDamagePercentDone(bool Apply, bool Real, bool changeAmount);
+ void HandleModPercentStat(bool Apply, bool Real, bool changeAmount);
+ void HandleModResistancePercent(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModBaseResistancePCT(bool Apply, bool Real, bool changeAmount);
+ void HandleModShieldBlockPCT(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraTrackStealthed(bool Apply, bool Real, bool changeAmount);
+ void HandleModShieldBlock(bool Apply, bool Real, bool changeAmount);
+ void HandleForceReaction(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModRangedHaste(bool Apply, bool Real, bool changeAmount);
+ void HandleRangedAmmoHaste(bool Apply, bool Real, bool changeAmount);
+ void HandleModHealingDone(bool Apply, bool Real, bool changeAmount);
+ void HandleModTotalPercentStat(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModTotalThreat(bool Apply, bool Real, bool changeAmount);
+ void HandleModUnattackable(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModPacify(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraGhost(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraAllowFlight(bool Apply, bool Real, bool changeAmount);
+ void HandleModRating(bool apply, bool Real, bool changeAmount);
+ void HandleModRatingFromStat(bool apply, bool Real, bool changeAmount);
+ void HandleModTargetResistance(bool apply, bool Real, bool changeAmount);
+ void HandleAuraModAttackPowerPercent(bool apply, bool Real, bool changeAmount);
+ void HandleAuraModRangedAttackPowerPercent(bool apply, bool Real, bool changeAmount);
+ void HandleAuraModRangedAttackPowerOfStatPercent(bool apply, bool Real, bool changeAmount);
+ void HandleAuraModAttackPowerOfStatPercent(bool apply, bool Real, bool changeAmount);
+ void HandleSpiritOfRedemption(bool apply, bool Real, bool changeAmount);
+ void HandleModManaRegen(bool apply, bool Real, bool changeAmount);
+ void HandleComprehendLanguage(bool apply, bool Real, bool changeAmount);
+ void HandleShieldBlockValue(bool apply, bool Real, bool changeAmount);
+ void HandleModSpellCritChanceShool(bool apply, bool Real, bool changeAmount);
+ void HandleAuraRetainComboPoints(bool apply, bool Real, bool changeAmount);
+ void HandleModSpellDamagePercentFromStat(bool apply, bool Real, bool changeAmount);
+ void HandleModSpellHealingPercentFromStat(bool apply, bool Real, bool changeAmount);
+ void HandleAuraControlVehicle(bool apply, bool Real, bool changeAmount);
+ void HandleModSpellDamagePercentFromAttackPower(bool apply, bool Real, bool changeAmount);
+ void HandleModSpellHealingPercentFromAttackPower(bool apply, bool Real, bool changeAmount);
+ void HandleAuraModPacifyAndSilence(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraModIncreaseMaxHealth(bool apply, bool Real, bool changeAmount);
+ void HandleAuraModExpertise(bool apply, bool Real, bool changeAmount);
+ void HandleForceMoveForward(bool apply, bool Real, bool changeAmount);
+ void HandleAuraModResistenceOfStatPercent(bool apply, bool Real, bool changeAmount);
+ void HandleAuraPowerBurn(bool apply, bool Real, bool changeAmount);
+ void HandleSchoolAbsorb(bool apply, bool Real, bool changeAmount);
+ void HandlePreventFleeing(bool apply, bool Real, bool changeAmount);
+ void HandleManaShield(bool apply, bool Real, bool changeAmount);
+ void HandleArenaPreparation(bool apply, bool Real, bool changeAmount);
+ void HandleAuraConvertRune(bool apply, bool Real, bool changeAmount);
+ void HandleAuraIncreaseBaseHealthPercent(bool Apply, bool Real, bool changeAmount);
+ void HandleNoReagentUseAura(bool Apply, bool Real, bool changeAmount);
+ void HandlePhase(bool Apply, bool Real, bool changeAmount);
+ void HandleAuraAllowOnlyAbility(bool apply, bool Real, bool changeAmount);
// add/remove SPELL_AURA_MOD_SHAPESHIFT (36) linked auras
void HandleShapeshiftBoosts(bool apply);
@@ -346,7 +349,8 @@ class TRINITY_DLL_SPEC AuraEffect
bool IsPersistent() const { return m_isPersistent; }
bool isAffectedOnSpell(SpellEntry const *spell) const;
- void ApplyModifier(bool apply, bool Real = false);
+ void ApplyModifier(bool apply, bool Real = false, bool changeAmount=false);
+ void RecalculateAmount();
void HandleAuraEffect(bool apply);
void ApplyAllModifiers(bool apply, bool Real);
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 9db62bf51fe..e417bd33488 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -4073,7 +4073,7 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit
int32 damage = aur->GetPartAura(0)->GetAmount()*9;
RemoveAuraFromStack(iter, AURA_REMOVE_BY_ENEMY_SPELL);
// backfire damage and silence
- dispeler->CastCustomSpell(this, 31117, &damage, NULL, NULL, true, NULL, NULL,dispeler->GetGUID());
+ dispeler->CastCustomSpell(dispeler, 31117, &damage, NULL, NULL, true, NULL, NULL,GetGUID());
return;
}
RemoveAuraFromStack(iter, AURA_REMOVE_BY_ENEMY_SPELL);
@@ -4853,7 +4853,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
{
// Remove aura mods
Aur->ApplyModifier(false);
- Aur->SetAmount(Aur->GetAmount() + spelldmg * triggerAmount / 100);
+ Aur->SetAmount(Aur->GetAmount() + spelldmg/* * triggerAmount / 100*/);
// Apply extended aura mods
Aur->ApplyModifier(true);
return true;