Core/Quests: Fuel for the Fire (12690)
This commit is contained in:
1 parent
a917461762
commit
48783b8606
2 files changed
+120
No files matched your search
@@ -1876,6 +1876,90 @@ class spell_q13086_cannons_target : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
enum BurstAtTheSeams
|
||||
{
|
||||
BURST_AT_THE_SEAMS = 52510, //Burst at the Seams
|
||||
BURST_AT_THE_SEAMS_DMG = 52508, //Damage spell
|
||||
BURST_AT_THE_SEAMS_DMG_2 = 59580, //Abomination self damage spell
|
||||
BURST_AT_THE_SEAMS_BONE = 52516, //Burst at the Seams:Bone
|
||||
BURST_AT_THE_SEAMS_MEAT = 52520, //Explode Abomination:Meat
|
||||
BURST_AT_THE_SEAMS_BMEAT = 52523, //Explode Abomination:Bloody Meat
|
||||
DRAKKARI_SKULLCRUSHER_CREDIT = 52590, //Credit for Drakkari Skullcrusher
|
||||
SUMMON_DRAKKARI_CHIEFTAIN = 52616, //Summon Drakkari Chieftain
|
||||
DRAKKARI_CHIEFTAINK_KILL_CREDIT = 52620, //Drakkari Chieftain Kill Credit
|
||||
};
|
||||
|
||||
class spell_q12690_burst_at_the_seams : public SpellScriptLoader
|
||||
{
|
||||
|
||||
public:
|
||||
spell_q12690_burst_at_the_seams() : SpellScriptLoader("spell_q12690_burst_at_the_seams") { }
|
||||
class spell_q12690_burst_at_the_seams_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q12690_burst_at_the_seams_SpellScript);
|
||||
|
||||
bool Validate(SpellInfo const* spellInfo) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(BURST_AT_THE_SEAMS) || !sSpellMgr->GetSpellInfo(BURST_AT_THE_SEAMS_DMG) || !sSpellMgr->GetSpellInfo(BURST_AT_THE_SEAMS_DMG_2) || !sSpellMgr->GetSpellInfo(BURST_AT_THE_SEAMS_BONE) || !sSpellMgr->GetSpellInfo(BURST_AT_THE_SEAMS_MEAT) || !sSpellMgr->GetSpellInfo(BURST_AT_THE_SEAMS_BMEAT))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load() OVERRIDE
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
}
|
||||
|
||||
void HandleKnockBack(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* abomination = GetCaster())
|
||||
{
|
||||
if (Unit* creature = GetHitCreature())
|
||||
{
|
||||
if(Unit* charmer = abomination->GetCharmerOrOwner())
|
||||
{
|
||||
if (Player* player = charmer->ToPlayer())
|
||||
{
|
||||
if (player->GetQuestStatus(12690) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
player->CastSpell(player, DRAKKARI_SKULLCRUSHER_CREDIT, true);
|
||||
creature->CastSpell(creature,BURST_AT_THE_SEAMS_BONE);
|
||||
creature->CastSpell(creature,BURST_AT_THE_SEAMS_MEAT);
|
||||
creature->CastSpell(creature,BURST_AT_THE_SEAMS_BMEAT);
|
||||
creature->CastSpell(creature,BURST_AT_THE_SEAMS_DMG);
|
||||
creature->CastSpell(creature,BURST_AT_THE_SEAMS_DMG_2);
|
||||
player->CastSpell(player, DRAKKARI_SKULLCRUSHER_CREDIT, true);
|
||||
uint16 count = player->GetReqKillOrCastCurrentCount(12690 /*questid*/, 29099 /*creditid*/);
|
||||
if (count % 20 == 0)
|
||||
player->CastSpell(player, SUMMON_DRAKKARI_CHIEFTAIN, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* abomination = GetCaster())
|
||||
if(abomination->IsAlive())
|
||||
abomination->ToCreature()->DespawnOrUnsummon(2*IN_MILLISECONDS);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_q12690_burst_at_the_seams_SpellScript::HandleKnockBack, EFFECT_1, SPELL_EFFECT_KNOCK_BACK);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_q12690_burst_at_the_seams_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const OVERRIDE
|
||||
{
|
||||
return new spell_q12690_burst_at_the_seams_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_quest_spell_scripts()
|
||||
{
|
||||
new spell_q55_sacred_cleansing();
|
||||
@@ -1922,4 +2006,5 @@ void AddSC_quest_spell_scripts()
|
||||
new spell_q12847_summon_soul_moveto_bunny();
|
||||
new spell_q13011_bear_flank_master();
|
||||
new spell_q13086_cannons_target();
|
||||
new spell_q12690_burst_at_the_seams();
|
||||
}
|
||||
Reference in new issue
Block a user