Skip to content

Commit

Permalink
[12371] Implement spell effects for spells 74452 and 74455
Browse files Browse the repository at this point in the history
Also limit the targets of 74452 depending on dungeon difficulty
  • Loading branch information
xfurry committed Feb 22, 2013
1 parent 3c73ecc commit 3e92774
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/game/Spell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1762,6 +1762,24 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
case 63482: // Lightning Whirl (h) (Ulduar, Stormcaller Brundir)
unMaxTargets = urand(3, 6);
break;
case 74452: // Conflagration (Saviana, Ruby Sanctum)

This comment has been minimized.

Copy link
@rsa

rsa Feb 23, 2013

Contributor

in 25 spell casted double times, as i remember...

This comment has been minimized.

Copy link
@Schmoozerd

Schmoozerd Feb 23, 2013

Member

Very possible, i did not remember that blizz might do this.
Though I do not know how effective this would be (prevent not targeting the same target twice)

This comment has been minimized.

Copy link
@xfurry

xfurry via email Feb 23, 2013

Author Member

This comment has been minimized.

Copy link
@xfurry

xfurry Feb 23, 2013

Author Member

I think this should fix it

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index b5501fa..1876635 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1770,11 +1770,11 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
                         {
                             case RAID_DIFFICULTY_10MAN_NORMAL:
                             case RAID_DIFFICULTY_10MAN_HEROIC:
-                                unMaxTargets = 3;
+                                unMaxTargets = 2;
                                 break;
                             case RAID_DIFFICULTY_25MAN_NORMAL:
                             case RAID_DIFFICULTY_25MAN_HEROIC:
-                                unMaxTargets = 6;
+                                unMaxTargets = 5;
                                 break;
                         }
                     }
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index afa22f1..9694c5c 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -2767,6 +2767,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
                         return;

                     m_caster->CastSpell(unitTarget, 74453, true);
+                    m_caster->CastSpell(unitTarget, 74454, true);
                     return;
                 }
             }

But I'm not sure if spell 74454 will be cast in sync with the other.

{
if (m_caster)
{
switch (m_caster->GetMap()->GetDifficulty())
{
case RAID_DIFFICULTY_10MAN_NORMAL:
case RAID_DIFFICULTY_10MAN_HEROIC:
unMaxTargets = 3;
break;
case RAID_DIFFICULTY_25MAN_NORMAL:
case RAID_DIFFICULTY_25MAN_HEROIC:
unMaxTargets = 6;
break;
}
}
break;
}
default:
break;
}
Expand Down
16 changes: 16 additions & 0 deletions src/game/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2761,6 +2761,14 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
m_caster->CastSpell(unitTarget, m_caster->CanReachWithMeleeAttack(unitTarget) ? 71623 : 72264, true);
return;
}
case 74452: // Conflagration
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;

m_caster->CastSpell(unitTarget, 74453, true);
return;
}
}
break;
}
Expand Down Expand Up @@ -8384,6 +8392,14 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)

return;
}
case 74455: // Conflagration
{
if (!unitTarget)
return;

unitTarget->CastSpell(m_caster, m_spellInfo->CalculateSimpleValue(eff_idx), true);
return;
}
}
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12370"
#define REVISION_NR "12371"
#endif // __REVISION_NR_H__

0 comments on commit 3e92774

Please sign in to comment.