From 6d9881f31479ef7907740e04a236438eb3e95e98 Mon Sep 17 00:00:00 2001 From: Xfurry Date: Thu, 9 Jul 2015 16:53:43 +0200 Subject: [PATCH] [c13089] Implement some spell effects required for Saurfang - ICC Spell ids: 72202, 72254, 72195, 72257, 72409, 72178 (based on commit [12876] - 68bbfc0) Signed-off-by: Xfurry --- src/game/SpellEffects.cpp | 48 ++++++++++++++++++++++++++++++++ src/game/UnitAuraProcHandler.cpp | 4 +++ src/shared/revision_nr.h | 2 +- 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 72f1a83dc9..88e4aa3109 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3096,6 +3096,22 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) m_caster->CastSpell(unitTarget, 71264, true); return; } + case 72202: // Blood Link + { + if (!unitTarget) + return; + + unitTarget->CastSpell(unitTarget, 72195, true); + return; + } + case 72254: // Mark of the Fallen Champion + { + if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER || unitTarget->HasAura(effect->CalculateSimpleValue())) + return; + + m_caster->CastSpell(unitTarget, effect->CalculateSimpleValue(), true); + return; + } case 72261: // Delirious Slash { if (!unitTarget) @@ -9441,6 +9457,38 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect) m_caster->CastSpell(unitTarget, 72036, true); return; } + case 72195: // Blood Link + { + if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT) + return; + + uint32 auraStacks = 0; + if (SpellAuraHolder* playerAura = unitTarget->GetSpellAuraHolder(72371)) + auraStacks = playerAura->GetStackAmount(); + + int32 missingStacks = unitTarget->GetPower(unitTarget->GetPowerType()) - auraStacks; + if (missingStacks <= 0) + return; + + unitTarget->CastCustomSpell(unitTarget, 72371, &missingStacks, &missingStacks, NULL, true); + return; + } + case 72257: // Remove Marks of the Fallen Champion + { + if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) + return; + + unitTarget->RemoveAurasDueToSpell(effect->CalculateSimpleValue()); + return; + } + case 72409: // Rune of Blood + { + if (!unitTarget) + return; + + unitTarget->CastSpell(m_caster, effect->CalculateSimpleValue(), true); + return; + } case 72705: // Coldflame (summon around the caster) { if (!unitTarget) diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp index 387a3dbc92..6cac634f55 100644 --- a/src/game/UnitAuraProcHandler.cpp +++ b/src/game/UnitAuraProcHandler.cpp @@ -1089,6 +1089,10 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura } break; } + // Blood Link + case 72178: + triggered_spell_id = 72195; + break; } break; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index b02139b039..62692df2e7 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 "13088" + #define REVISION_NR "13089" #endif // __REVISION_NR_H__