Skip to content

Commit

Permalink
[10330] Add dummy aura effect of spell 10255 and dummy effect of 10254
Browse files Browse the repository at this point in the history
Signed-off-by: NoFantasy <nofantasy@nf.no>
  • Loading branch information
NoFantasy committed Aug 8, 2010
1 parent e28d065 commit b64a317
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
24 changes: 24 additions & 0 deletions src/game/SpellAuras.cpp
Expand Up @@ -1948,6 +1948,18 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
m_modifier.periodictime = 30*IN_MILLISECONDS;
m_periodicTimer = m_modifier.periodictime;
return;
case 10255: // Stoned
{
if (Unit* caster = GetCaster())
{
if (caster->GetTypeId() != TYPEID_UNIT)
return;

caster->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
caster->addUnitState(UNIT_STAT_ROOT);
}
return;
}
case 31606: // Stormcrow Amulet
{
CreatureInfo const * cInfo = ObjectMgr::GetCreatureTemplate(17970);
Expand Down Expand Up @@ -2147,6 +2159,18 @@ void Aura::HandleAuraDummy(bool apply, bool Real)

switch(GetId())
{
case 10255: // Stoned
{
if (Unit* caster = GetCaster())
{
if (caster->GetTypeId() != TYPEID_UNIT)
return;

// see dummy effect of spell 10254 for removal of flags etc
caster->CastSpell(caster, 10254, true);
}
return;
}
case 12479: // Hex of Jammal'an
target->CastSpell(target, 12480, true, NULL, this);
return;
Expand Down
10 changes: 10 additions & 0 deletions src/game/SpellEffects.cpp
Expand Up @@ -821,6 +821,16 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
((Creature*)unitTarget)->setDeathState(JUST_ALIVED);
return;
}
case 10254: // Stone Dwarf Awaken Visual
{
if (m_caster->GetTypeId() != TYPEID_UNIT)
return;

// see spell 10255 (aura dummy)
m_caster->clearUnitState(UNIT_STAT_ROOT);
m_caster->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
return;
}
case 13120: // net-o-matic
{
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 "10329"
#define REVISION_NR "10330"
#endif // __REVISION_NR_H__

0 comments on commit b64a317

Please sign in to comment.