Skip to content

Commit

Permalink
[10845] Add dummy effect of spell 49634 and dummy aura of spell 56511
Browse files Browse the repository at this point in the history
note* spell will need data in spell_script_target to work properly.
note* the effect of 56511 does not work, see comment in code for details (code added in any case, to not forget the problem)

Signed-off-by: NoFantasy <nofantasy@nf.no>
  • Loading branch information
NoFantasy committed Dec 9, 2010
1 parent 3c78c72 commit cbae5c2
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/game/SpellAuras.cpp
Expand Up @@ -2301,6 +2301,14 @@ void Aura::HandleAuraDummy(bool apply, bool Real)

return;
}
case 56511: // Towers of Certain Doom: Tower Bunny Smoke Flare Effect
{
// Towers of Certain Doom: Skorn Cannonfire
if (m_removeMode == AURA_REMOVE_BY_DEFAULT)
target->CastSpell(target, 43069, true);

return;
}
case 58600: // Restricted Flight Area
{
AreaTableEntry const* area = GetAreaEntryByAreaID(target->GetAreaId());
Expand Down
37 changes: 37 additions & 0 deletions src/game/SpellEffects.cpp
Expand Up @@ -1202,6 +1202,12 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
unitTarget->CastSpell(unitTarget, 43059, true);
return;
}
case 43069: // Towers of Certain Doom: Skorn Cannonfire
{
// Towers of Certain Doom: Tower Caster Instakill
m_caster->CastSpell(m_caster, 43072, true);
return;
}
// Demon Broiled Surprise
/* FIX ME: Required for correct work implementing implicit target 7 (in pair (22,7))
case 43723:
Expand Down Expand Up @@ -1435,6 +1441,37 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
}
return;
}
case 49634: // Sergeant's Flare
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
return;

// Towers of Certain Doom: Tower Bunny Smoke Flare Effect
// TODO: MaNGOS::DynamicObjectUpdater::VisitHelper prevent aura to be applied to dummy creature (see HandleAuraDummy for effect of aura)
m_caster->CastSpell(unitTarget, 56511, true);

static uint32 const spellCredit[4] =
{
43077, // E Kill Credit
43067, // NW Kill Credit
43087, // SE Kill Credit
43086, // SW Kill Credit
};

// for sizeof(spellCredit)
for (int i = 0; i < 4; ++i)
{
const SpellEntry *pSpell = sSpellStore.LookupEntry(spellCredit[i]);

if (pSpell->EffectMiscValue[EFFECT_INDEX_0] == unitTarget->GetEntry())
{
m_caster->CastSpell(m_caster, spellCredit[i], true);
break;
}
}

return;
}
case 50133: // Scourging Crystal Controller
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
Expand Down
1 change: 1 addition & 0 deletions src/game/SpellMgr.cpp
Expand Up @@ -637,6 +637,7 @@ bool IsPositiveEffect(uint32 spellId, SpellEffectIndex effIndex)
{
case 28441: // AB Effect 000
return false;
case 49634: // Sergeant's Flare
case 54530: // Opening
return true;
default:
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 "10844"
#define REVISION_NR "10845"
#endif // __REVISION_NR_H__

0 comments on commit cbae5c2

Please sign in to comment.