[7734] Implement spell 58204 and 58205 used in DK introduction quest.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Fog 2009-04-29 22:55:30 +04:00 committed by VladimirMangos
parent 6192fcbd0c
commit 30992d0ac3
2 changed files with 80 additions and 48 deletions

View file

@ -2176,65 +2176,97 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
{ {
case SPELLFAMILY_GENERIC: case SPELLFAMILY_GENERIC:
{ {
// Unstable Power switch(GetId())
if( GetId()==24658 )
{ {
uint32 spellId = 24659; // Unstable Power
if (apply && caster) case 24658:
{ {
const SpellEntry *spell = sSpellStore.LookupEntry(spellId); uint32 spellId = 24659;
if (!spell) if (apply && caster)
return; {
const SpellEntry *spell = sSpellStore.LookupEntry(spellId);
if (!spell)
return;
for (int i=0; i < spell->StackAmount; ++i) for (int i=0; i < spell->StackAmount; ++i)
caster->CastSpell(m_target, spell->Id, true, NULL, NULL, GetCasterGUID()); caster->CastSpell(m_target, spell->Id, true, NULL, NULL, GetCasterGUID());
return;
}
m_target->RemoveAurasDueToSpell(spellId);
return; return;
} }
m_target->RemoveAurasDueToSpell(spellId); // Restless Strength
return; case 24661:
}
// Restless Strength
if( GetId()==24661 )
{
uint32 spellId = 24662;
if (apply && caster)
{ {
const SpellEntry *spell = sSpellStore.LookupEntry(spellId); uint32 spellId = 24662;
if (!spell) if (apply && caster)
{
const SpellEntry *spell = sSpellStore.LookupEntry(spellId);
if (!spell)
return;
for (int i=0; i < spell->StackAmount; ++i)
caster->CastSpell(m_target, spell->Id, true, NULL, NULL, GetCasterGUID());
return; return;
for (int i=0; i < spell->StackAmount; ++i) }
caster->CastSpell(m_target, spell->Id, true, NULL, NULL, GetCasterGUID()); m_target->RemoveAurasDueToSpell(spellId);
return; return;
} }
m_target->RemoveAurasDueToSpell(spellId); //Summon Fire Elemental
return; case 40133:
}
//Summon Fire Elemental
if (GetId() == 40133 && caster)
{
Unit *owner = caster->GetOwner();
if (owner && owner->GetTypeId() == TYPEID_PLAYER)
{ {
if(apply) if (!caster)
owner->CastSpell(owner,8985,true); return;
else
((Player*)owner)->RemovePet(NULL, PET_SAVE_NOT_IN_SLOT, true);
}
return;
}
//Summon Earth Elemental Unit *owner = caster->GetOwner();
if (GetId() == 40132 && caster) if (owner && owner->GetTypeId() == TYPEID_PLAYER)
{ {
Unit *owner = caster->GetOwner(); if(apply)
if (owner && owner->GetTypeId() == TYPEID_PLAYER) owner->CastSpell(owner,8985,true);
{ else
if(apply) ((Player*)owner)->RemovePet(NULL, PET_SAVE_NOT_IN_SLOT, true);
owner->CastSpell(owner,19704,true); }
else return;
((Player*)owner)->RemovePet(NULL, PET_SAVE_NOT_IN_SLOT, true);
} }
return; //Summon Earth Elemental
case 40132 :
{
if (!caster)
return;
Unit *owner = caster->GetOwner();
if (owner && owner->GetTypeId() == TYPEID_PLAYER)
{
if(apply)
owner->CastSpell(owner,19704,true);
else
((Player*)owner)->RemovePet(NULL, PET_SAVE_NOT_IN_SLOT, true);
}
return;
}
// LK Intro VO (1)
case 58204:
if(m_target->GetTypeId() == TYPEID_PLAYER)
{
// Play part 1
if(apply)
m_target->PlayDirectSound(14970, (Player *)m_target);
// continue in 58205
else
m_target->CastSpell(m_target, 58205, true);
}
return;
// LK Intro VO (2)
case 58205:
if(m_target->GetTypeId() == TYPEID_PLAYER)
{
// Play part 2
if(apply)
m_target->PlayDirectSound(14971, (Player *)m_target);
// Play part 3
else
m_target->PlayDirectSound(14972, (Player *)m_target);
}
return;
} }
break; break;
} }

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7733" #define REVISION_NR "7734"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__