aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2013_08_28_06_world_sai.sql35
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp85
2 files changed, 120 insertions, 0 deletions
diff --git a/sql/updates/world/2013_08_28_06_world_sai.sql b/sql/updates/world/2013_08_28_06_world_sai.sql
new file mode 100644
index 00000000000..7cb970fa485
--- /dev/null
+++ b/sql/updates/world/2013_08_28_06_world_sai.sql
@@ -0,0 +1,35 @@
+-- Fuel for the Fire (12690)
+-- http://www.youtube.com/watch?v=3rC1yU1ytl8
+SET @CREDIT :=52590; -- Credit to Master
+SET @CREDIT_MASTER :=52587; -- Assign Kill Credit to Master
+SET @TEXPLOSION :=52565; -- Troll Explosion
+SET @FFTF_EXPL :=52575; -- Fuel for the Fire:Troll Explosion
+SET @MEAT_EXPL :=52578; -- Explode Troll:Meat
+SET @BMEAT_EXPL :=52580; -- Explode Troll:Bloody Meat
+SET @SUICIDE_NL :=51744; -- Suicide (No Log)
+SET @DSC :=28844; -- Drakkari Skullcrusher
+SET @B_ABOM :=28843; -- Bloated Abomination
+
+DELETE FROM `spell_script_names` WHERE `spell_id`=52510;
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(52510, 'spell_q12690_burst_at_the_seams');
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@B_ABOM;
+DELETE FROM `smart_scripts` WHERE entryorguid =@B_ABOM;
+
+DELETE FROM `conditions` WHERE `SourceEntry`IN (52510);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 2, 52510, 0, 0, 31, 0, 3, 28844, 0, 0, 0, 0, '', 'Spell Burst at the Seams targets Drakkari Skullcrusher');
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@DSC;
+DELETE FROM `smart_scripts` WHERE `source_type`IN (0,9) AND `entryorguid`IN (@DSC,@DSC*100);
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@DSC,0,0,0,8,0,100,0,52510,0,0,0,80,@DSC*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Drakkari Skullcrusher - On Spellhit - Start Timed Action Script'),
+(@DSC*100,9,0,0,0,0,100,0,0,0,0,0,11,@TEXPLOSION,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakkari Skullcrusher - On Script - Cast Troll Explosion'),
+(@DSC*100,9,1,0,0,0,100,0,0,0,0,0,11,@MEAT_EXPL,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakkari Skullcrusher - On Script - Cast Meat Explosion'),
+(@DSC*100,9,2,0,0,0,100,0,0,0,0,0,11,@SUICIDE_NL,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakkari Skullcrusher - On Script - Cast Suicide');
+
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger`IN (@TEXPLOSION,@MEAT_EXPL);
+INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
+(@TEXPLOSION,@FFTF_EXPL,1,'Trigger Troll Explosion with FFTF explosion'),
+(@MEAT_EXPL,@BMEAT_EXPL,1,'Trigger Meat Explosion with Bloody Meat Explosion');
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index ca94f871d03..46a39828afd 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -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();
}