aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-09-24 22:21:44 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-09-24 22:21:44 +0200
commitc3805aa5123a58c5c5778652d80b119c2cbc630c (patch)
treea9f1f1a33ddf219126f57ba649ab7dd6304c9d92
parentb949521a52532e6c44f79d3a5858e833ad0e9598 (diff)
Misc/Events:
- Fix Quest "There and Back Again" (only Horde-side) - Fix Quest "Now This is Ram Racing... Almost." (only Horde-side) - Fix more spell mechanics for racing ram To/Do: Fix gossips and some optimize
-rw-r--r--sql/updates/world/2014_09_24_01_world.sql43
-rw-r--r--src/server/scripts/Spells/spell_holiday.cpp59
2 files changed, 102 insertions, 0 deletions
diff --git a/sql/updates/world/2014_09_24_01_world.sql b/sql/updates/world/2014_09_24_01_world.sql
new file mode 100644
index 00000000000..e94e17d08df
--- /dev/null
+++ b/sql/updates/world/2014_09_24_01_world.sql
@@ -0,0 +1,43 @@
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (24497,24527,24510);
+UPDATE `creature_template` SET `unit_flags`=512 WHERE `entry`=24527;
+UPDATE `creature_template` SET `unit_flags`=768 WHERE `entry`=24510;
+
+
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=24497;
+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
+(24497, 0, 0, 0, 19, 0, 100, 0, 11409, 0, 0, 0, 11, 42149, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ram Master Ray <Ram Racing Master> - On Quest ''Now This is Ram Racing... Almost.'' Taken - Cast ''Rental Racing Ram'''),
+(24497, 0, 1, 0, 20, 0, 100, 0, 11409, 0, 0, 0, 11, 44358, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ram Master Ray <Ram Racing Master> - On Quest ''Now This is Ram Racing... Almost.'' Taken - Cast ''Rental Racing Ram'''),
+(24497, 0, 2, 0, 19, 0, 100, 0, 11412, 0, 0, 0, 11, 42149, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ram Master Ray <Ram Racing Master> - On Quest ''There and Back Again'' Taken - Cast ''Rental Racing Ram'''),
+(24497, 0, 3, 0, 20, 0, 100, 0, 11412, 0, 0, 0, 11, 44358, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ram Master Ray <Ram Racing Master> - On Quest ''There and Back Again'' Taken - Cast ''Rental Racing Ram''');
+
+
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=24527;
+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
+(24527, 0, 0, 0, 10, 0, 100, 0, 1, 25, 1000, 1000, 11, 43660, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Bok Dropcertain - Within 0-50 Range - Cast ''Brewfest - Throw Keg - DND''');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=24527;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(22, 1, 24527, 0, 0, 1, 0, 43883, 0, 0, 0, 0, 0, '', ''),
+(22, 1, 24527, 0, 0, 2, 0, 33797, 1, 0, 1, 0, 0, '', '');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=43662;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 43662, 0, 0, 31, 0, 3, 24510, 0, 0, 0, 0, '', '');
+
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=24510;
+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
+(24510, 0, 0, 0, 10, 0, 100, 0, 1, 25, 1000, 1000, 11, 43714, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Driz Tumblequick <Ram Racing Apprentice> - Within 0-50 Range - Cast ''Brewfest - Throw Keg - DND'''),
+(24510, 0, 1, 0, 8, 0, 100, 0, 43662, 0, 0, 0, 85, 44601, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Driz Tumblequick <Ram Racing Apprentice> - On SpellHit - Cast ''Brewfest - Relay Race - Intro - Assign Kill Credit''');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=24510;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(22, 1, 24510, 0, 0, 1, 0, 43883, 0, 0, 0, 0, 0, '', ''),
+(22, 1, 24510, 0, 0, 2, 0, 33797, 1, 0, 0, 0, 0, '', '');
+
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (
+43714,
+43876
+);
+INSERT INTO `spell_script_names` (`spell_id` ,`ScriptName`) VALUES
+(43714, 'spell_brewfest_relay_race_intro_force_player_to_throw'),
+(43876, 'spell_brewfest_dismount_ram');
diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp
index fdf069dd18d..41ffbaf9cf8 100644
--- a/src/server/scripts/Spells/spell_holiday.cpp
+++ b/src/server/scripts/Spells/spell_holiday.cpp
@@ -682,6 +682,63 @@ class spell_brewfest_exhausted_ram : public SpellScriptLoader
}
};
+// 43714 - Brewfest - Relay Race - Intro - Force - Player to throw- DND
+class spell_brewfest_relay_race_intro_force_player_to_throw : public SpellScriptLoader
+{
+ public:
+ spell_brewfest_relay_race_intro_force_player_to_throw() : SpellScriptLoader("spell_brewfest_relay_race_intro_force_player_to_throw") { }
+
+ class spell_brewfest_relay_race_intro_force_player_to_throw_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_brewfest_relay_race_intro_force_player_to_throw_SpellScript);
+
+ void HandleForceCast(SpellEffIndex effIndex)
+ {
+ PreventHitDefaultEffect(effIndex);
+ // All this spells trigger a spell that requires reagents; if the
+ // triggered spell is cast as "triggered", reagents are not consumed
+ GetHitUnit()->CastSpell((Unit*)NULL, GetSpellInfo()->Effects[effIndex].TriggerSpell, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST));
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_brewfest_relay_race_intro_force_player_to_throw_SpellScript::HandleForceCast, EFFECT_0, SPELL_EFFECT_FORCE_CAST);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_brewfest_relay_race_intro_force_player_to_throw_SpellScript();
+ }
+};
+
+// 43876 - Dismount Ram
+class spell_brewfest_dismount_ram : public SpellScriptLoader
+{
+ public:
+ spell_brewfest_dismount_ram() : SpellScriptLoader("spell_brewfest_dismount_ram") { }
+
+ class spell_brewfest_relay_race_intro_force_player_to_throw_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_brewfest_relay_race_intro_force_player_to_throw_SpellScript);
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->RemoveAura(SPELL_RENTAL_RACING_RAM);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_brewfest_relay_race_intro_force_player_to_throw_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_brewfest_relay_race_intro_force_player_to_throw_SpellScript();
+ }
+};
+
void AddSC_holiday_spell_scripts()
{
// Love is in the Air
@@ -705,4 +762,6 @@ void AddSC_holiday_spell_scripts()
new spell_brewfest_ram_fatigue();
new spell_brewfest_apple_trap();
new spell_brewfest_exhausted_ram();
+ new spell_brewfest_relay_race_intro_force_player_to_throw();
+ new spell_brewfest_dismount_ram();
}