Skip to content

Commit

Permalink
[c12921] Implement spell effect 141 and spell id 41072
Browse files Browse the repository at this point in the history
(based on commit [12723] - 388ce61)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
  • Loading branch information
xfurry committed Sep 8, 2014
1 parent df54d6b commit e2d6620
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/game/SharedDefines.h
Expand Up @@ -875,7 +875,7 @@ enum SpellEffects
SPELL_EFFECT_LEAP_BACK = 138,
SPELL_EFFECT_CLEAR_QUEST = 139,
SPELL_EFFECT_FORCE_CAST = 140,
SPELL_EFFECT_141 = 141,
SPELL_EFFECT_FORCE_CAST_WITH_VALUE = 141,
SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE = 142,
SPELL_EFFECT_APPLY_AREA_AURA_OWNER = 143,
SPELL_EFFECT_KNOCKBACK_FROM_POSITION = 144,
Expand Down
18 changes: 16 additions & 2 deletions src/game/SpellEffects.cpp
Expand Up @@ -201,7 +201,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS] =
&Spell::EffectLeapBack, //138 SPELL_EFFECT_LEAP_BACK Leap back
&Spell::EffectClearQuest, //139 SPELL_EFFECT_CLEAR_QUEST (misc - is quest ID)
&Spell::EffectForceCast, //140 SPELL_EFFECT_FORCE_CAST
&Spell::EffectNULL, //141 SPELL_EFFECT_141 damage and reduce speed?
&Spell::EffectForceCast, //141 SPELL_EFFECT_FORCE_CAST_WITH_VALUE
&Spell::EffectTriggerSpellWithValue, //142 SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE
&Spell::EffectApplyAreaAura, //143 SPELL_EFFECT_APPLY_AREA_AURA_OWNER
&Spell::EffectKnockBackFromPosition, //144 SPELL_EFFECT_KNOCKBACK_FROM_POSITION
Expand Down Expand Up @@ -3931,7 +3931,13 @@ void Spell::EffectForceCast(SpellEffectEntry const* effect)
return;
}

unitTarget->CastSpell(unitTarget, spellInfo, true, NULL, NULL, m_originalCasterGUID, m_spellInfo);
int32 basePoints = damage;

// spell effect 141 has BasePoints greater than 1
if (basePoints > 1)
unitTarget->CastCustomSpell(unitTarget, spellInfo, &basePoints, &basePoints, &basePoints, true, NULL , NULL, m_originalCasterGUID, m_spellInfo);
else
unitTarget->CastSpell(unitTarget, spellInfo, true, NULL, NULL, m_originalCasterGUID, m_spellInfo);
}

void Spell::EffectTriggerSpell(SpellEffectEntry const* effect)
Expand Down Expand Up @@ -7587,6 +7593,14 @@ void Spell::EffectScriptEffect(SpellEffectEntry const* effect)

return;
}
case 41072: // Bloodbolt
{
if (!unitTarget)
return;

m_caster->CastSpell(unitTarget, m_spellInfo->CalculateSimpleValue(eff_idx), true);
return;
}
case 41126: // Flame Crash
{
if (!unitTarget)
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 "12920"
#define REVISION_NR "12921"
#endif // __REVISION_NR_H__

0 comments on commit e2d6620

Please sign in to comment.