Skip to content

Commit

Permalink
[12560] Implement some spell effects used by Hodir in Ulduar
Browse files Browse the repository at this point in the history
Dummy spells 62797, 63499, 63545 and 64543
Periodic dummy auras: 61968, 62038, 62039 and 65272
Limit targets for spells: 62797, 63545, 64543, 62476 and 62477
  • Loading branch information
xfurry committed Oct 1, 2013
1 parent a529af9 commit 801c2af
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/game/Spell.cpp
Expand Up @@ -7675,15 +7675,18 @@ void Spell::GetSpellRangeAndRadius(SpellEffectIndex effIndex, float& radius, uin
case 62301: // Cosmic Smash (Ulduar, Algalon)
case 62374: // Pursued (Ulduar, Flame Leviathan)
case 62488: // Activate Construct (Ulduar, Ignis)
case 62797: // Storm Cloud (Ulduar, Hodir)
case 63018: // Searing Light (Ulduar, XT-002)
case 63024: // Gravity Bomb (Ulduar, XT-002)
case 63387: // Rapid Burst
case 63545: // Icicle (Ulduar, Hodir)
case 63795: // Psychosis (Ulduar, Yogg-Saron)
case 63820: // Summon Scrap Bot Trigger (Ulduar, Mimiron) use for Scrap Bots, hits npc 33856
case 64218: // Overcharge (VoA, Emalon)
case 64234: // Gravity Bomb (h) (Ulduar, XT-002)
case 64425: // Summon Scrap Bot Trigger (Ulduar, Mimiron) use for Assault Bots, hits npc 33856
case 64531: // Rapid Burst (h)
case 64543: // Melt Ice (Ulduar, Hodir)
case 65121: // Searing Light (h) (Ulduar, XT-002)
case 65301: // Psychosis (Ulduar, Yogg-Saron)
case 65872: // Pursuing Spikes (ToCrusader, Anub'arak)
Expand Down Expand Up @@ -7728,6 +7731,7 @@ void Spell::GetSpellRangeAndRadius(SpellEffectIndex effIndex, float& radius, uin
break;
case 10258: // Awaken Vault Warder (Uldaman)
case 28542: // Life Drain (Naxx, Sapphiron)
case 62476: // Icicle (Ulduar, Hodir)
case 66013: // Penetrating Cold (10 man) (ToCrusader, Anub'arak)
case 67755: // Nerubian Burrower (Mode 1) (ToCrusader, Anub'arak)
case 67756: // Nerubian Burrower (Mode 2) (ToCrusader, Anub'arak)
Expand All @@ -7753,6 +7757,7 @@ void Spell::GetSpellRangeAndRadius(SpellEffectIndex effIndex, float& radius, uin
case 54522: // Summon Ghouls On Scarlet Crusade
case 60936: // Surge of Power (h) (Malygos)
case 61693: // Arcane Storm (Malygos)
case 62477: // Icicle (h) (Ulduar, Hodir)
case 63981: // StoneGrip (h) (Ulduar, Kologarn)
case 64598: // Cosmic Smash (h) (Ulduar, Algalon)
case 64620: // Summon Fire Bot Trigger (Ulduar, Mimiron) hits npc 33856
Expand Down
27 changes: 27 additions & 0 deletions src/game/SpellAuras.cpp
Expand Up @@ -8183,6 +8183,12 @@ void Aura::PeriodicDummyTick()
case 2: target->CastSpell(target, 55739, true); break;
}
return;
case 61968: // Flash Freeze
{
if (GetAuraTicks() == 1 && !target->HasAura(62464))
target->CastSpell(target, 61970, true, NULL, this);
return;
}

This comment has been minimized.

Copy link
@xfurry

xfurry Nov 25, 2013

Author Member

That's done in SD2.

case 62018: // Collapse
{
// lose 1% of health every second
Expand All @@ -8194,6 +8200,22 @@ void Aura::PeriodicDummyTick()
target->CastSpell(target, 62020, true, NULL, this);
return;
}
case 62038: // Biting Cold
{
if (target->GetTypeId() != TYPEID_PLAYER || target->HasAura(62821))
return;

if (((Player*)target)->isMoving())
target->RemoveAuraHolderFromStack(62039);
else
target->CastSpell(target, 62039, true, NULL, this);
return;
}
case 62039: // Biting Cold
{
target->CastSpell(target, 62188, true);
return;
}
case 62566: // Healthy Spore Summon Periodic
{
target->CastSpell(target, 62582, true);
Expand Down Expand Up @@ -8248,6 +8270,11 @@ void Aura::PeriodicDummyTick()
}
return;
}
case 65272: // Shatter Chest
{
target->CastSpell(target, 62501, true, NULL, this);
return;
}
case 66118: // Leeching Swarm
case 67630: // Leeching Swarm
case 68646: // Leeching Swarm
Expand Down
32 changes: 32 additions & 0 deletions src/game/SpellEffects.cpp
Expand Up @@ -2687,6 +2687,14 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
unitTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
return;
}
case 62797: // Storm Cloud
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;

m_caster->CastSpell(unitTarget, m_caster->GetMap()->IsRegularDifficulty() ? 65123 : 65133, true);
return;
}
case 62907: // Freya's Ward
{
if (!unitTarget)
Expand All @@ -2696,6 +2704,21 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
m_caster->CastSpell(unitTarget, m_spellInfo->CalculateSimpleValue(eff_idx), true);
return;
}
case 63499: // Dispel Magic
{
if (!unitTarget)
return;

unitTarget->RemoveAurasDueToSpell(m_spellInfo->CalculateSimpleValue(eff_idx));
return;
}
case 63545: // Icicle
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;

m_caster->CastSpell(unitTarget, m_spellInfo->CalculateSimpleValue(eff_idx), true);
}
case 63820: // Summon Scrap Bot Trigger (Ulduar - Mimiron) for Scrap Bots
case 64425: // Summon Scrap Bot Trigger (Ulduar - Mimiron) for Assault Bots
case 64620: // Summon Fire Bot Trigger (Ulduar - Mimiron) for Fire Bots
Expand Down Expand Up @@ -2726,6 +2749,15 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
m_caster->CastSpell(unitTarget, 64496, true);
return;
}
case 64543: // Melt Ice
{
if (!unitTarget)
return;

m_caster->CastSpell(unitTarget, m_spellInfo->CalculateSimpleValue(eff_idx), true);
m_caster->CastSpell(m_caster, 64540, true);
return;
}
case 64673: // Feral Rush (h)
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
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 "12559"
#define REVISION_NR "12560"
#endif // __REVISION_NR_H__

4 comments on commit 801c2af

@rsa
Copy link
Contributor

@rsa rsa commented on 801c2af Oct 2, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

62038 must have 3s period for stack and 1s for unstack. also code cannot be compiled without pch - need add
#include "TemporarySummon.h"
in begin of spell.cpp

@Schmoozerd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the TempSummon.h is included in the changeset where it is required - you confuse me

@xfurry
Copy link
Member Author

@xfurry xfurry commented on 801c2af Oct 2, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rsa 62038 is a little confusing. The sniff shows that it's cast at 1 sec, but in real game I noticed that it only triggers every 3s.
Maybe something like if (GetAuraTicks()%3) { // cast spell; } will do. I need to test if this works right.

@rsa
Copy link
Contributor

@rsa rsa commented on 801c2af Oct 2, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xfurry, 62038 casted every tick, STACKED every 3s (in misqvalue as i remember).
@Schmoozerd, this from preview commit, sorry. tested in clean cmangos - need include in spell.cpp

Please sign in to comment.