Skip to content

Commit

Permalink
[c13089] Implement some spell effects required for Saurfang - ICC
Browse files Browse the repository at this point in the history
Spell ids: 72202, 72254, 72195, 72257, 72409, 72178

(based on commit [12876] - 68bbfc0)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
  • Loading branch information
xfurry committed Jul 9, 2015
1 parent 8cce2a9 commit 6d9881f
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
48 changes: 48 additions & 0 deletions src/game/SpellEffects.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions src/game/UnitAuraProcHandler.cpp
Expand Up @@ -1089,6 +1089,10 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
}
break;
}
// Blood Link
case 72178:
triggered_spell_id = 72195;
break;
}
break;
}
Expand Down
2 changes: 1 addition & 1 deletion 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__

0 comments on commit 6d9881f

Please sign in to comment.