aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQAston <none@none>2009-08-28 15:36:17 +0200
committerQAston <none@none>2009-08-28 15:36:17 +0200
commit3094cefe75b908e9769c66a656dd6d1c83a7d766 (patch)
treebca050c2bf7f65c53dbf134d92e20aef65c8720a /src
parent183e4c4bf9d8bc4dc57dcb61359ac07cc433971d (diff)
*Fix improved devouring plague.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellAuras.cpp17
-rw-r--r--src/game/Unit.cpp26
2 files changed, 17 insertions, 26 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index f697f618b9e..1e42a41210f 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1006,6 +1006,23 @@ void Aura::HandleAuraSpecificMods(bool apply)
}
}
}
+ else if (GetSpellProto()->SpellFamilyName == SPELLFAMILY_PRIEST)
+ {
+ // Devouring Plague
+ if (GetSpellProto()->SpellFamilyFlags[0] & 0x02000000 && GetPartAura(0))
+ {
+ Unit * caster = GetCaster();
+ if (!caster)
+ return;
+
+ // Improved Devouring Plague
+ if (AuraEffect const * aurEff = caster->GetDummyAura(SPELLFAMILY_PRIEST, 3790, 1))
+ {
+ int32 basepoints0 = aurEff->GetAmount() * GetPartAura(0)->GetTotalTicks() * GetPartAura(0)->GetAmount() / 100;
+ caster->CastCustomSpell(m_target, 63675, &basepoints0, NULL, NULL, true, NULL, GetPartAura(0));
+ }
+ }
+ }
else if (GetSpellProto()->SpellFamilyName == SPELLFAMILY_ROGUE)
{
// Sprint (skip non player casted spells by category)
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 9e7663cba2e..4b18db2c0a1 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -12757,7 +12757,6 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
takeCharges = true;
}
- uint32 procDebug = 0;
if (!handled)
for (uint8 effIndex = 0; effIndex<MAX_SPELL_EFFECTS;++effIndex)
{
@@ -12794,56 +12793,31 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
{
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (HandleDummyAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
- {
takeCharges=true;
- if (procDebug & 1)
- sLog.outError("Dummy aura of spell %d procs twice from one effect!",spellInfo->Id);
- procDebug |= 1;
- }
break;
}
case SPELL_AURA_OBS_MOD_POWER:
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (HandleObsModEnergyAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
- {
takeCharges=true;
- if (procDebug & 2)
- sLog.outError("ObsModEnergy aura of spell %d procs twice from one effect!",spellInfo->Id);
- procDebug |= 2;
- }
break;
case SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN:
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (HandleModDamagePctTakenAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
- {
takeCharges=true;
- if (procDebug & 16)
- sLog.outError("ModDamagePctTaken aura of spell %d procs twice from one effect!",spellInfo->Id);
- procDebug |= 16;
- }
break;
case SPELL_AURA_MOD_HASTE:
{
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s haste aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (HandleHasteAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
- {
takeCharges=true;
- if (procDebug & 4)
- sLog.outError("Haste aura of spell %d procs twice from one effect!",spellInfo->Id);
- procDebug |= 4;
- }
break;
}
case SPELL_AURA_OVERRIDE_CLASS_SCRIPTS:
{
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (HandleOverrideClassScriptAuraProc(pTarget, damage, triggeredByAura, procSpell, cooldown))
- {
takeCharges=true;
- if (procDebug & 8)
- sLog.outError("OverrideClassScripts aura of spell %d procs twice from one effect!",spellInfo->Id);
- procDebug |= 8;
- }
break;
}
case SPELL_AURA_RAID_PROC_FROM_CHARGE_WITH_VALUE: