From 63018ccc4a3f35da92f7ce11e71360f3e4a60908 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Sun, 6 Jun 2010 17:28:30 +0400 Subject: [PATCH] [10033] Use sometime stored in spell data triggred spell info for dummy auras. --- src/game/Unit.cpp | 21 +++++++++------------ src/shared/revision_nr.h | 2 +- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 0bab7ea9b..08e46b046 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -2204,12 +2204,14 @@ void Unit::CalculateAbsorbAndResist(Unit *pCaster, SpellSchoolMask schoolMask, D int32 amount = int32(incanterAbsorption * (*itr)->GetModifier()->m_amount / 100); + uint32 triggered_id = itr_spellProto->EffectTriggerSpell[(*itr)->GetEffIndex()]; + // apply normalized part of already accumulated amount in aura - if (Aura* spdAura = GetAura(44413, EFFECT_INDEX_0)) + if (Aura* spdAura = GetAura(triggered_id, EFFECT_INDEX_0)) amount += spdAura->GetModifier()->m_amount * spdAura->GetAuraDuration() / spdAura->GetAuraMaxDuration(); // Incanter's Absorption (triggered absorb based spell power, will replace existed if any) - CastCustomSpell(this, 44413, &amount, NULL, NULL, true); + CastCustomSpell(this, triggered_id, &amount, NULL, NULL, true, NULL, *itr); break; } } @@ -5113,7 +5115,8 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu Item* castItem = triggeredByAura->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER ? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGUID()) : NULL; - uint32 triggered_spell_id = 0; + // some dummy spells have trigger spell in spell data already (from 3.0.3) + uint32 triggered_spell_id = dummySpell->EffectApplyAuraName[effIndex] == SPELL_AURA_DUMMY ? dummySpell->EffectTriggerSpell[effIndex] : 0; Unit* target = pVictim; int32 basepoints[MAX_EFFECT_INDEX] = {0, 0, 0}; @@ -5691,12 +5694,6 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu triggered_spell_id = 22858; break; } - // Gag Order - if (dummySpell->SpellIconID == 280) - { - triggered_spell_id = 18498; // Silenced - Gag Order - break; - } // Second Wind if (dummySpell->SpellIconID == 1697) { @@ -5998,7 +5995,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu return false; basepoints[0] = int32(target->GetMaxHealth() * triggerAmount / 100); - triggered_spell_id = 56131; + // triggered_spell_id in spell data break; } } @@ -6585,7 +6582,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu // Sacred Shield (talent rank) case 53601: { - triggered_spell_id = 58597; + // triggered_spell_id in spell data target = this; break; } @@ -7125,7 +7122,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu // Blood-Caked Blade if (dummySpell->SpellIconID == 138) { - triggered_spell_id = dummySpell->EffectTriggerSpell[effIndex]; + // triggered_spell_id in spell data break; } break; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 2a6f283a6..e08f10e15 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10032" + #define REVISION_NR "10033" #endif // __REVISION_NR_H__