aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/3.3.5/2022_03_01_00_world.sql26
-rw-r--r--src/server/scripts/Northrend/zone_storm_peaks.cpp56
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp47
3 files changed, 82 insertions, 47 deletions
diff --git a/sql/updates/world/3.3.5/2022_03_01_00_world.sql b/sql/updates/world/3.3.5/2022_03_01_00_world.sql
new file mode 100644
index 00000000000..23bf6ddaad8
--- /dev/null
+++ b/sql/updates/world/3.3.5/2022_03_01_00_world.sql
@@ -0,0 +1,26 @@
+--
+UPDATE `spell_script_names` SET `ScriptName` = 'spell_bear_flank_master' WHERE `ScriptName` = 'spell_q13011_bear_flank_master';
+
+DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_bear_flank_fail';
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(56569,'spell_bear_flank_fail');
+
+DELETE FROM `creature_text` WHERE `CreatureID` = 30292;
+UPDATE `smart_scripts` SET `action_param2` = 0 WHERE `entryorguid` = 30292 AND `source_type` = 0 AND `id` = 0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 30292 AND `source_type` = 0 AND `id` = 2;
+
+--
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 30366 AND `source_type` = 0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 3036600 AND `source_type` = 9;
+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`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(30366,0,0,0,11,0,100,0,0,0,0,0,0,80,3036600,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Lure Jormuttar Bunny - On Spawn - Run Script"),
+
+(3036600,9,0,0,0,0,100,0,0,0,0,0,0,11,56577,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Lure Jormuttar Bunny - On Script - Cast 'Summon Flank'"),
+(3036600,9,1,0,0,0,100,0,5000,5000,0,0,0,12,30340,4,120000,0,0,0,8,0,0,0,0,7312.9766,-2048.7727,761.4259,2.775073528289794921,"Lure Jormuttar Bunny - On Script - Summon Creature 'Jormuttar'"),
+(3036600,9,2,0,0,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Lure Jormuttar Bunny - On Script - Despawn");
+
+--
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 30340 AND `source_type` = 0;
+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`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(30340,0,0,0,0,0,100,0,0,0,3000,5000,0,11,61597,64,0,0,0,0,2,0,0,0,0,0,0,0,0,"Jormuttar - In Combat CMC - Cast 'Acid Spit'"),
+(30340,0,1,0,0,0,100,0,5000,10000,10000,15000,0,11,61598,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Jormuttar - In Combat - Cast 'Sweep'");
diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp
index b973b685dcb..a1ea0efddcf 100644
--- a/src/server/scripts/Northrend/zone_storm_peaks.cpp
+++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp
@@ -1359,6 +1359,60 @@ class spell_read_pronouncement : public AuraScript
}
};
+/*######
+## Quest 13011: Jormuttar is Soo Fat...
+######*/
+
+enum JormuttarIsSooFat
+{
+ SPELL_CREATE_BEAR_FLANK = 56566,
+ SPELL_BEAR_FLANK_FAIL = 56569,
+ TEXT_CARVE_FAIL = 30986
+};
+
+// 56565 - Bear Flank Master
+class spell_bear_flank_master : public SpellScript
+{
+ PrepareSpellScript(spell_bear_flank_master);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_CREATE_BEAR_FLANK, SPELL_BEAR_FLANK_FAIL });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetHitUnit()->CastSpell(GetHitUnit(), roll_chance_i(20) ? SPELL_CREATE_BEAR_FLANK : SPELL_BEAR_FLANK_FAIL);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_bear_flank_master::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 56569 - Bear Flank Fail
+class spell_bear_flank_fail : public AuraScript
+{
+ PrepareAuraScript(spell_bear_flank_fail);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return sObjectMgr->GetBroadcastText(TEXT_CARVE_FAIL);
+ }
+
+ void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Player* target = GetTarget()->ToPlayer())
+ target->Unit::Whisper(TEXT_CARVE_FAIL, target, true);
+ }
+
+ void Register() override
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_bear_flank_fail::AfterApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+};
+
void AddSC_storm_peaks()
{
new npc_roxi_ramrocket();
@@ -1383,4 +1437,6 @@ void AddSC_storm_peaks()
new spell_player_mount_wyrm();
RegisterSpellScript(spell_q12823_remove_collapsing_cave_aura);
RegisterSpellScript(spell_read_pronouncement);
+ RegisterSpellScript(spell_bear_flank_master);
+ RegisterSpellScript(spell_bear_flank_fail);
}
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index fdbe614d123..71eeaeab518 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -1301,52 +1301,6 @@ class spell_q12847_summon_soul_moveto_bunny : public SpellScript
}
};
-enum BearFlankMaster
-{
- SPELL_CREATE_BEAR_FLANK = 56566,
- SPELL_BEAR_FLANK_FAIL = 56569
-};
-
-// 56565 - Bear Flank Master
-class spell_q13011_bear_flank_master : public SpellScript
-{
- PrepareSpellScript(spell_q13011_bear_flank_master);
-
- bool Validate(SpellInfo const* /*spellInfo*/) override
- {
- return ValidateSpellInfo(
- {
- SPELL_CREATE_BEAR_FLANK,
- SPELL_BEAR_FLANK_FAIL
- });
- }
-
- bool Load() override
- {
- return GetCaster()->GetTypeId() == TYPEID_UNIT;
- }
-
- void HandleScript(SpellEffIndex /*effIndex*/)
- {
- if (Player* player = GetHitPlayer())
- {
- if (roll_chance_i(50))
- {
- Creature* creature = GetCaster()->ToCreature();
- player->CastSpell(creature, SPELL_BEAR_FLANK_FAIL);
- creature->AI()->Talk(0, player);
- }
- else
- player->CastSpell(player, SPELL_CREATE_BEAR_FLANK);
- }
- }
-
- void Register() override
- {
- OnEffectHitTarget += SpellEffectFn(spell_q13011_bear_flank_master::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
- }
-};
-
// 57385 - Argent Cannon
// 57412 - Reckoning Bomb
class spell_q13086_cannons_target : public SpellScript
@@ -2280,7 +2234,6 @@ void AddSC_quest_spell_scripts()
RegisterSpellScript(spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy);
RegisterSpellScript(spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon);
RegisterSpellScript(spell_q12847_summon_soul_moveto_bunny);
- RegisterSpellScript(spell_q13011_bear_flank_master);
RegisterSpellScript(spell_q13086_cannons_target);
RegisterSpellScript(spell_q13264_q13276_q13288_q13289_burst_at_the_seams_59576);
RegisterSpellScript(spell_q13264_q13276_q13288_q13289_burst_at_the_seams_59579);