aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-09-27 01:19:20 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-09-27 01:19:20 +0200
commita6a23a73af92f02531aa28256536daeabb439766 (patch)
treedcabe0206a897168db3e1e601346213fc5920b3c
parent0af6d3a16d0272607aecd9729701ff6eccacb1f6 (diff)
Misc/Brewfest: Fix Quest "11407 - Bark for Drohn''s Distillery!" / "11408 -Bark for T''chali''s Voodoo Brewery!"
-rw-r--r--sql/updates/world/2014_09_27_00_world.sql60
-rw-r--r--src/server/scripts/Spells/spell_holiday.cpp65
2 files changed, 125 insertions, 0 deletions
diff --git a/sql/updates/world/2014_09_27_00_world.sql b/sql/updates/world/2014_09_27_00_world.sql
new file mode 100644
index 00000000000..26eb32a1ac6
--- /dev/null
+++ b/sql/updates/world/2014_09_27_00_world.sql
@@ -0,0 +1,60 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (
+43259,
+43260,
+43261,
+43262
+);
+INSERT INTO `spell_script_names` (`spell_id` ,`ScriptName`) VALUES
+(43259, 'spell_brewfest_barker_bunny'),
+(43260, 'spell_brewfest_barker_bunny'),
+(43261, 'spell_brewfest_barker_bunny'),
+(43262, 'spell_brewfest_barker_bunny');
+
+DELETE FROM `areatrigger_scripts` WHERE `entry` IN (4801,4802,4803,4804);
+INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
+(4801, 'SmartTrigger'),
+(4802, 'SmartTrigger'),
+(4803, 'SmartTrigger'),
+(4804, 'SmartTrigger');
+
+DELETE FROM `smart_scripts` WHERE `source_type`=2 AND `entryorguid`=4801;
+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
+(4801, 2, 0, 0, 46, 0, 100, 0, 4801, 0, 0, 0, 85, 43259, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Cast ''Brewfest - Barker Bunny 1''');
+
+DELETE FROM `smart_scripts` WHERE `source_type`=2 AND `entryorguid`=4802;
+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
+(4802, 2, 0, 0, 46, 0, 100, 0, 4802, 0, 0, 0, 85, 43260, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Cast ''Brewfest - Barker Bunny 2''');
+
+DELETE FROM `smart_scripts` WHERE `source_type`=2 AND `entryorguid`=4803;
+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
+(4803, 2, 0, 0, 46, 0, 100, 0, 4803, 0, 0, 0, 85, 43261, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Cast ''Brewfest - Barker Bunny 3''');
+
+DELETE FROM `smart_scripts` WHERE `source_type`=2 AND `entryorguid`=4804;
+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
+(4804, 2, 0, 0, 46, 0, 100, 0, 4804, 0, 0, 0, 85, 43262, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Cast ''Brewfest - Barker Bunny 4''');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry` IN (4801,4802,4803,4804);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(22, 1, 4801, 2, 0, 1, 0, 43883, 0, 0, 0, 0, 0, '', 'SAI triggers only if player does not have Aura "Rental Racing Ram"'),
+(22, 1, 4801, 2, 0, 9, 0, 11407, 0, 0, 0, 0, 0, '', 'SAI triggers only if player not have "Bark for Drohn''s Distillery!" taken'),
+(22, 1, 4801, 2, 1, 9, 0, 11408, 0, 0, 0, 0, 0, '', 'SAI triggers only if player not have "Bark for T''chali''s Voodoo Brewery!" taken'),
+(22, 1, 4801, 2, 0, 28, 0, 11412, 0, 0, 1, 0, 0, '', 'SAI triggers only if player does not have "Bark for Drohn''s Distillery!" taken'),
+(22, 1, 4801, 2, 1, 28, 0, 11412, 0, 0, 1, 0, 0, '', 'SAI triggers only if player does not have "Bark for T''chali''s Voodoo Brewery!" taken'),
+
+(22, 1, 4802, 2, 0, 1, 0, 43883, 0, 0, 0, 0, 0, '', 'SAI triggers only only if player does not have Aura "Rental Racing Ram"'),
+(22, 1, 4802, 2, 0, 9, 0, 11407, 0, 0, 0, 0, 0, '', 'SAI triggers only if player not have "Bark for Drohn''s Distillery!" taken'),
+(22, 1, 4802, 2, 1, 9, 0, 11408, 0, 0, 0, 0, 0, '', 'SAI triggers only if player not have "Bark for T''chali''s Voodoo Brewery!" taken'),
+(22, 1, 4802, 2, 0, 28, 0, 11407, 0, 0, 1, 0, 0, '', 'SAI triggers only if player does not have "Bark for Drohn''s Distillery!" taken'),
+(22, 1, 4802, 2, 1, 28, 0, 11408, 0, 0, 1, 0, 0, '', 'SAI triggers only if player does not have "Bark for T''chali''s Voodoo Brewery!" taken'),
+
+(22, 1, 4803, 2, 0, 1, 0, 43883, 0, 0, 0, 0, 0, '', 'SAI triggers only only if player does not have Aura "Rental Racing Ram"'),
+(22, 1, 4803, 2, 0, 9, 0, 11407, 0, 0, 0, 0, 0, '', 'SAI triggers only if player not have "Bark for Drohn''s Distillery!" taken'),
+(22, 1, 4803, 2, 1, 9, 0, 11408, 0, 0, 0, 0, 0, '', 'SAI triggers only if player not have "Bark for T''chali''s Voodoo Brewery!" taken'),
+(22, 1, 4803, 2, 0, 28, 0, 11412, 0, 0, 1, 0, 0, '', 'SAI triggers only if player does not have "Bark for Drohn''s Distillery!" taken'),
+(22, 1, 4803, 2, 1, 28, 0, 11412, 0, 0, 1, 0, 0, '', 'SAI triggers only if player does not have "Bark for T''chali''s Voodoo Brewery!" taken'),
+
+(22, 1, 4804, 2, 0, 1, 0, 43883, 0, 0, 0, 0, 0, '', 'SAI triggers only only if player does not have Aura "Rental Racing Ram"'),
+(22, 1, 4804, 2, 0, 9, 0, 11407, 0, 0, 0, 0, 0, '', 'SAI triggers only if player not have "Bark for Drohn''s Distillery!" taken'),
+(22, 1, 4804, 2, 1, 9, 0, 11408, 0, 0, 0, 0, 0, '', 'SAI triggers only if player not have "Bark for T''chali''s Voodoo Brewery!" taken'),
+(22, 1, 4804, 2, 0, 28, 0, 11407, 0, 0, 1, 0, 0, '', 'SAI triggers only if player does not have "Bark for Drohn''s Distillery!" taken'),
+(22, 1, 4804, 2, 1, 28, 0, 11408, 0, 0, 1, 0, 0, '', 'SAI triggers only if player does not have "Bark for T''chali''s Voodoo Brewery!" taken');
diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp
index 4e8d47381e7..2d993e771db 100644
--- a/src/server/scripts/Spells/spell_holiday.cpp
+++ b/src/server/scripts/Spells/spell_holiday.cpp
@@ -736,6 +736,70 @@ class spell_brewfest_dismount_ram : public SpellScriptLoader
}
};
+enum RamBlub
+{
+ QUEST_BARK_FOR_DROHNS_DISTILLERY = 11407,
+ QUEST_BARK_FOR_TCHALIS_VOODOO_BREWERY = 11408,
+
+ SAY_DROHN_DISTILLERY_1 = 23520,
+ SAY_DROHN_DISTILLERY_2 = 23521,
+ SAY_DROHN_DISTILLERY_3 = 23522,
+ SAY_DROHN_DISTILLERY_4 = 23523,
+
+ SAY_TCHALIS_VOODOO_1 = 23524,
+ SAY_TCHALIS_VOODOO_2 = 23525,
+ SAY_TCHALIS_VOODOO_3 = 23526,
+ SAY_TCHALIS_VOODOO_4 = 23527
+};
+
+// 43259 Brewfest - Barker Bunny 1
+// 43260 Brewfest - Barker Bunny 2
+// 43261 Brewfest - Barker Bunny 3
+// 43262 Brewfest - Barker Bunny 4
+class spell_brewfest_barker_bunny : public SpellScriptLoader
+{
+ public:
+ spell_brewfest_barker_bunny() : SpellScriptLoader("spell_brewfest_barker_bunny") { }
+
+ class spell_brewfest_barker_bunny_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_brewfest_barker_bunny_AuraScript);
+
+ bool Load() override
+ {
+ return GetUnitOwner()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Player* target = GetTarget()->ToPlayer();
+
+ uint32 BroadcastTextId = 0;
+
+ if (target->GetQuestStatus(QUEST_BARK_FOR_DROHNS_DISTILLERY) == QUEST_STATUS_INCOMPLETE ||
+ target->GetQuestStatus(QUEST_BARK_FOR_DROHNS_DISTILLERY) == QUEST_STATUS_COMPLETE)
+ BroadcastTextId = RAND(SAY_DROHN_DISTILLERY_1, SAY_DROHN_DISTILLERY_2, SAY_DROHN_DISTILLERY_3, SAY_DROHN_DISTILLERY_4);
+
+ if (target->GetQuestStatus(QUEST_BARK_FOR_TCHALIS_VOODOO_BREWERY) == QUEST_STATUS_INCOMPLETE ||
+ target->GetQuestStatus(QUEST_BARK_FOR_TCHALIS_VOODOO_BREWERY) == QUEST_STATUS_COMPLETE)
+ BroadcastTextId = RAND(SAY_TCHALIS_VOODOO_1, SAY_TCHALIS_VOODOO_2, SAY_TCHALIS_VOODOO_3, SAY_TCHALIS_VOODOO_4);
+
+ if (BroadcastTextId)
+ target->Talk(BroadcastTextId, CHAT_MSG_SAY, sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_SAY), target);
+ }
+
+ void Register() override
+ {
+ OnEffectApply += AuraEffectApplyFn(spell_brewfest_barker_bunny_AuraScript::OnApply, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_brewfest_barker_bunny_AuraScript();
+ }
+};
+
void AddSC_holiday_spell_scripts()
{
// Love is in the Air
@@ -761,4 +825,5 @@ void AddSC_holiday_spell_scripts()
new spell_brewfest_exhausted_ram();
new spell_brewfest_relay_race_intro_force_player_to_throw();
new spell_brewfest_dismount_ram();
+ new spell_brewfest_barker_bunny();
}