diff options
author | QAston <none@none> | 2009-06-15 13:42:43 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-06-15 13:42:43 +0200 |
commit | 7268e291b40be2eb67d7acee88eee5ba5de98c55 (patch) | |
tree | a6a603ddf93283168a73a088d7e5f6c338af59fd /src/game/Unit.cpp | |
parent | 4696eeca71f51f618b7b17f3f30416c116be671c (diff) |
*Fix improved drain soul.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index e1120e90d12..408bf62f224 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -7275,15 +7275,16 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig trigger_spell_id = 18093; } - // Drain Soul + // Improved Drain Soul else if (auraSpellInfo->SpellFamilyFlags[0] & 0x4000) { - Unit::AuraEffectList const& mAddFlatModifier = GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER); + Unit::AuraEffectList const& mAddFlatModifier = GetAurasByType(SPELL_AURA_DUMMY); for(Unit::AuraEffectList::const_iterator i = mAddFlatModifier.begin(); i != mAddFlatModifier.end(); ++i) { if ((*i)->GetMiscValue() == SPELLMOD_CHANCE_OF_SUCCESS && (*i)->GetSpellProto()->SpellIconID == 113) { int32 value2 = CalculateSpellDamage((*i)->GetSpellProto(),2,(*i)->GetSpellProto()->EffectBasePoints[2],this); + basepoints0 = value2 * GetMaxPower(POWER_MANA) / 100; // Drain Soul CastCustomSpell(this, 18371, &basepoints0, NULL, NULL, true, castItem, triggeredByAura); break; @@ -12478,7 +12479,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag // Fill procTriggered list for(AuraMap::const_iterator itr = GetAuras().begin(); itr!= GetAuras().end(); ++itr) { - // Do not allow auras to proc from effect of itself + // Do not allow auras to proc from effect triggered by itself if (procAura && procAura->Id == itr->first) continue; ProcTriggeredData triggerData(itr->second); @@ -13365,8 +13366,9 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry co return false; } // Aura added by spell can`t trogger from self (prevent drop charges/do triggers) - // But except periodic triggers (can triggered from self) - if(procSpell && procSpell->Id == spellProto->Id && !(spellProto->procFlags&PROC_FLAG_ON_TAKE_PERIODIC)) + // But except periodic and kill triggers (can triggered from self) + if(procSpell && procSpell->Id == spellProto->Id + && !(spellProto->procFlags&PROC_FLAG_ON_TAKE_PERIODIC | PROC_FLAG_KILL)) return false; // Check if current equipment allows aura to proc |