mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[8666] Sorted switch for dummy effect spell generic part by spell id.
Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
ec10a5bf3c
commit
df3cc2ce00
2 changed files with 34 additions and 34 deletions
|
|
@ -1043,6 +1043,31 @@ void Spell::EffectDummy(uint32 i)
|
|||
m_caster->CastSpell(m_caster, spell_id, true, NULL);
|
||||
return;
|
||||
}
|
||||
case 34665: //Administer Antidote
|
||||
{
|
||||
if (!unitTarget || m_caster->GetTypeId() != TYPEID_PLAYER )
|
||||
return;
|
||||
// Spell has scriptable target but for sure.
|
||||
if (unitTarget->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
uint32 health = unitTarget->GetHealth();
|
||||
float x, y, z, o;
|
||||
|
||||
unitTarget->GetPosition(x, y, z);
|
||||
o = unitTarget->GetOrientation();
|
||||
((Creature*)unitTarget)->ForcedDespawn();
|
||||
|
||||
if (Creature* summon = m_caster->SummonCreature(16992, x, y, z, o,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,180000))
|
||||
{
|
||||
summon->SetHealth(health);
|
||||
((Player*)m_caster)->RewardPlayerAndGroupAtEvent(16992, summon);
|
||||
|
||||
if (summon->AI())
|
||||
summon->AI()->AttackStart(m_caster);
|
||||
}
|
||||
return;
|
||||
}
|
||||
case 35745: // Socrethar's Stone
|
||||
{
|
||||
uint32 spell_id;
|
||||
|
|
@ -1122,31 +1147,6 @@ void Spell::EffectDummy(uint32 i)
|
|||
m_caster->CastSpell(m_caster, 42337, true, NULL);
|
||||
return;
|
||||
}
|
||||
case 34665: //Administer Antidote
|
||||
{
|
||||
if (!unitTarget || m_caster->GetTypeId() != TYPEID_PLAYER )
|
||||
return;
|
||||
// Spell has scriptable target but for sure.
|
||||
if (unitTarget->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
uint32 health = unitTarget->GetHealth();
|
||||
float x, y, z, o;
|
||||
|
||||
unitTarget->GetPosition(x, y, z);
|
||||
o = unitTarget->GetOrientation();
|
||||
((Creature*)unitTarget)->ForcedDespawn();
|
||||
|
||||
if (Creature* summon = m_caster->SummonCreature(16992, x, y, z, o,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,180000))
|
||||
{
|
||||
summon->SetHealth(health);
|
||||
((Player*)m_caster)->RewardPlayerAndGroupAtEvent(16992, summon);
|
||||
|
||||
if (summon->AI())
|
||||
summon->AI()->AttackStart(m_caster);
|
||||
}
|
||||
return;
|
||||
}
|
||||
case 44997: // Converting Sentry
|
||||
{
|
||||
//Converted Sentry Credit
|
||||
|
|
@ -1159,14 +1159,6 @@ void Spell::EffectDummy(uint32 i)
|
|||
m_caster->CastSpell(m_caster, 45088, true);
|
||||
return;
|
||||
}
|
||||
case 55004: // Nitro Boosts
|
||||
if (!m_CastItem)
|
||||
return;
|
||||
if (roll_chance_i(95)) // Nitro Boosts - success
|
||||
m_caster->CastSpell(m_caster, 54861, true, m_CastItem);
|
||||
else // Knocked Up - backfire 5%
|
||||
m_caster->CastSpell(m_caster, 46014, true, m_CastItem);
|
||||
return;
|
||||
case 50243: // Teach Language
|
||||
{
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
|
|
@ -1240,6 +1232,14 @@ void Spell::EffectDummy(uint32 i)
|
|||
m_caster->CastSpell(m_caster, 54586, true);
|
||||
return;
|
||||
}
|
||||
case 55004: // Nitro Boosts
|
||||
if (!m_CastItem)
|
||||
return;
|
||||
if (roll_chance_i(95)) // Nitro Boosts - success
|
||||
m_caster->CastSpell(m_caster, 54861, true, m_CastItem);
|
||||
else // Knocked Up - backfire 5%
|
||||
m_caster->CastSpell(m_caster, 46014, true, m_CastItem);
|
||||
return;
|
||||
case 58418: // Portal to Orgrimmar
|
||||
case 58420: // Portal to Stormwind
|
||||
return; // implemented in EffectScript[0]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8665"
|
||||
#define REVISION_NR "8666"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue