From 8c82c075cc32451d62d32bd0cfb51d60168ea8c5 Mon Sep 17 00:00:00 2001 From: Trista Date: Mon, 24 Dec 2012 00:48:41 +0200 Subject: Scripts/Quest: Defending Wyrmrest Temple * insert complete db sniff support, appart from missing spawns * remove achievement from disables (supported by core - timed one) * insert core support for spells and the defender itself, since SAI makes it act weird (maybe in future when SAI get integrated someone will convert it) Closes #1861 on 90% (except spawns (there are enough, but a lot more needed and minnor stuff that are core side connected with vehicles spellcastresults) --- src/server/scripts/Northrend/dragonblight.cpp | 92 +++++++++++++++++++++++++-- src/server/scripts/Spells/spell_quest.cpp | 32 ++++++++++ 2 files changed, 119 insertions(+), 5 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Northrend/dragonblight.cpp b/src/server/scripts/Northrend/dragonblight.cpp index 13a8370690e..71836a81687 100644 --- a/src/server/scripts/Northrend/dragonblight.cpp +++ b/src/server/scripts/Northrend/dragonblight.cpp @@ -33,6 +33,8 @@ EndContentData */ #include "SpellScript.h" #include "SpellAuraEffects.h" #include "ScriptedEscortAI.h" +#include "Vehicle.h" +#include "CombatAI.h" #include "Player.h" enum eEnums @@ -172,15 +174,27 @@ public: }; /*###### -## wyrmrest_defender +## Quest: Defending Wyrmrest Temple ID: 12372 ######*/ enum WyrmDefenderEnum { - QUEST_DEFENDING_WYRMREST_TEMPLE = 12372, - GOSSIP_TEXTID_DEF1 = 12899, - GOSSIP_TEXTID_DEF2 = 12900, - SPELL_CHARACTER_SCRIPT = 49213 + // Quest data + QUEST_DEFENDING_WYRMREST_TEMPLE = 12372, + GOSSIP_TEXTID_DEF1 = 12899, + + // Gossip data + GOSSIP_TEXTID_DEF2 = 12900, + + // Spells data + SPELL_CHARACTER_SCRIPT = 49213, + SPELL_DEFENDER_ON_LOW_HEALTH_EMOTE = 52421, // ID - 52421 Wyrmrest Defender: On Low Health Boss Emote to Controller - Random /self/ + SPELL_RENEW = 49263, // casted to heal drakes + SPELL_WYRMREST_DEFENDER_MOUNT = 49256, + + // Texts data + WHISPER_MOUNTED = 0, + BOSS_EMOTE_ON_LOW_HEALTH = 2 }; #define GOSSIP_ITEM_1 "We need to get into the fight. Are you ready?" @@ -211,10 +225,78 @@ class npc_wyrmrest_defender : public CreatureScript player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEF2, creature->GetGUID()); // Makes player cast trigger spell for 49207 on self player->CastSpell(player, SPELL_CHARACTER_SCRIPT, true); + // The gossip should not auto close } return true; } + + struct npc_wyrmrest_defenderAI : public VehicleAI + { + npc_wyrmrest_defenderAI(Creature* creature) : VehicleAI(creature) { } + + bool hpWarningReady; + bool renewRecoveryCanCheck; + + uint32 RenewRecoveryChecker; + + void Reset() + { + hpWarningReady = true; + renewRecoveryCanCheck = false; + + RenewRecoveryChecker = 0; + } + + void UpdateAI(uint32 const diff) + { + // Check system for Health Warning should happen first time whenever get under 30%, + // after it should be able to happen only after recovery of last renew is fully done (20 sec), + // next one used won't interfere + if (hpWarningReady && me->GetHealthPct() <= 30.0f) + { + me->CastSpell(me, SPELL_DEFENDER_ON_LOW_HEALTH_EMOTE); + hpWarningReady = false; + } + + if (renewRecoveryCanCheck) + { + if (RenewRecoveryChecker <= diff) + { + renewRecoveryCanCheck = false; + hpWarningReady = true; + } + else RenewRecoveryChecker -= diff; + } + } + + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) + { + switch (spell->Id) + { + // This is what happens on retail + case SPELL_WYRMREST_DEFENDER_MOUNT: + Talk(WHISPER_MOUNTED, me->GetCharmerOrOwnerGUID()); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + break; + // Both below are for checking low hp warning + case SPELL_DEFENDER_ON_LOW_HEALTH_EMOTE: + Talk(BOSS_EMOTE_ON_LOW_HEALTH, me->GetCharmerOrOwnerGUID()); + break; + case SPELL_RENEW: + if (!hpWarningReady && RenewRecoveryChecker <= 100) + RenewRecoveryChecker = 20000; + renewRecoveryCanCheck = true; + break; + } + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_wyrmrest_defenderAI(creature); + } }; void AddSC_dragonblight() diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 58b6fca8a81..b6497c048c8 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -1284,7 +1284,10 @@ class spell_q12372_cast_from_gossip_trigger : public SpellScriptLoader // 49370 - Wyrmrest Defender: Destabilize Azure Dragonshrine Effect enum Quest12372Data { + // NPCs NPC_WYRMREST_TEMPLE_CREDIT = 27698, + // Spells + WHISPER_ON_HIT_BY_FORCE_WHISPER = 1 }; class spell_q12372_destabilize_azure_dragonshrine_dummy : public SpellScriptLoader @@ -1318,6 +1321,34 @@ class spell_q12372_destabilize_azure_dragonshrine_dummy : public SpellScriptLoad } }; +// ID - 50287 Azure Dragon: On Death Force Cast Wyrmrest Defender to Whisper to Controller - Random (casted from Azure Dragons and Azure Drakes on death) +class spell_q12372_azure_on_death_force_whisper : public SpellScriptLoader +{ + public: + spell_q12372_azure_on_death_force_whisper() : SpellScriptLoader("spell_q12372_azure_on_death_force_whisper") { } + + class spell_q12372_azure_on_death_force_whisper_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q12372_azure_on_death_force_whisper_SpellScript); + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Creature* defender = GetHitCreature()) + defender->AI()->Talk(WHISPER_ON_HIT_BY_FORCE_WHISPER, defender->GetCharmerOrOwnerGUID()); + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_q12372_azure_on_death_force_whisper_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_q12372_azure_on_death_force_whisper_SpellScript(); + } +}; + // "Bombing Run" and "Bomb Them Again!" enum Quest11010_11102_11023Data { @@ -1522,4 +1553,5 @@ void AddSC_quest_spell_scripts() new spell_q11010_q11102_q11023_aggro_burst(); new spell_q11010_q11102_q11023_choose_loc(); new spell_q11010_q11102_q11023_q11008_check_fly_mount(); + new spell_q12372_azure_on_death_force_whisper(); } -- cgit v1.2.3 From fb3245d12533cde3fb0765b114a6132dde836119 Mon Sep 17 00:00:00 2001 From: Trista Date: Mon, 24 Dec 2012 01:35:55 +0200 Subject: Scripts/Quest: Gambling Debt and Words of Power * Quest support for Gambling Debt. Closes: #3122 * Fix bugging script for Words of Power: Closes: #7349 * Fix codestyle that vs broke from: 8c82c075cc32451d62d32bd0cfb51d60168ea8c5 --- sql/updates/world/2012_12_24_01_sai.sql | 42 ++++++++++++++++++ sql/updates/world/2012_12_24_02_sai.sql | 64 +++++++++++++++++++++++++++ src/server/scripts/Northrend/dragonblight.cpp | 27 +++++------ 3 files changed, 120 insertions(+), 13 deletions(-) create mode 100644 sql/updates/world/2012_12_24_01_sai.sql create mode 100644 sql/updates/world/2012_12_24_02_sai.sql (limited to 'src/server/scripts') diff --git a/sql/updates/world/2012_12_24_01_sai.sql b/sql/updates/world/2012_12_24_01_sai.sql new file mode 100644 index 00000000000..d151ee4aa2c --- /dev/null +++ b/sql/updates/world/2012_12_24_01_sai.sql @@ -0,0 +1,42 @@ +-- Fix quest: "Words of Power" - http://www.wowhead.com/item=35354 +-- Indexes +SET @TALETKHA := 26073; +SET @SCRIPT := @TALETKHA * 100; + +-- Fix the previous SAIs for High Priest Talet-Kha +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@TALETKHA,-85118,-85098,-85176,-85175) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT 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`,`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 +(@TALETKHA,0,0,1,1,0,100,1,0,0,0,0,70,0,0,0,0,0,0,10,85098,25422,0,0,0,0,0, 'High Priest Talet-Kha - On OOC (1 time per reset/respawn) - Respawn Mystical Webbing'), +(@TALETKHA,0,1,2,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,10,85098,25422,0,0,0,0,0, 'High Priest Talet-Kha - Linked with previous event - Set data 0 1 to Mystical Webbing'), +(@TALETKHA,0,2,3,61,0,100,0,0,0,0,0,70,0,0,0,0,0,0,10,85118,25422,0,0,0,0,0, 'High Priest Talet-Kha - Linked with previous event - Respawn Mystical Webbing'), +(@TALETKHA,0,3,4,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,10,85118,25422,0,0,0,0,0, 'High Priest Talet-Kha - Linked with previous event - Set data 0 1 to Mystical Webbing'), +(@TALETKHA,0,4,5,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,10,85175,23033,0,0,0,0,0, 'High Priest Talet-Kha - Linked with previous event - Set data 0 1 to Invisible Stalker'), +(@TALETKHA,0,5,6,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,10,85176,23033,0,0,0,0,0, 'High Priest Talet-Kha - Linked with previous event - Set data 0 1 to Invisible Stalker'), +(@TALETKHA,0,6,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Talet-Kha - Linked with previous event - Set phase 1'), +(@TALETKHA,0,7,0,38,0,100,0,0,1,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Talet-Kha - On data set 0 1 - Increment phase by 1'), +(@TALETKHA,0,8,0,23,4,100,1,45497,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Talet-Kha - On Aura missing - Run Script'), +(@TALETKHA,0,9,0,2,8,100,0,1,45,0,0,11,11640,1,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Talet-Kha - Health 45% - Cast Renew on self'), +(@TALETKHA,0,10,0,0,8,100,0,4000,6000,5000,8000,11,15587,0,0,0,0,0,2,0,0,0,0,0,0,0, 'High Priest Talet-Kha - IC - Cast Mind Blast on victim'), +(@TALETKHA,0,11,12,25,8,100,0,0,0,0,0,18,33555200,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Talet-Kha - On reset - Restore unit flags'), +(@TALETKHA,0,12,0,61,8,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Talet-Kha - Linked with previous event - Set phase back to 0'), +(@SCRIPT,9,0,0,0,0,100,0,3000,3000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Talet-Kha - script - Text 0'), +(@SCRIPT,9,1,0,0,0,100,0,500,500,0,0,69,0,0,0,0,0,0,8,0,0,0,3788.44,3418.25,85.0562,0, 'High Priest Talet-Kha - script - Move to point'), +(@SCRIPT,9,2,0,0,0,100,0,500,500,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,1.1672, 'High Priest Talet-Kha - script - Set Orientation'), +(@SCRIPT,9,3,0,0,0,100,0,1500,1500,0,0,91,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Talet-Kha - script - Bytes1 set to 0'), +(@SCRIPT,9,4,0,0,0,100,0,100,100,0,0,19,33555200,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Talet-Kha - script - Remove unitflags'), +(@SCRIPT,9,5,0,0,0,100,0,100,100,0,0,11,45492,1,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Talet-Kha - script - Aura self'), +(@SCRIPT,9,6,0,0,0,100,0,0,0,0,0,22,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Talet-Kha - script - Set phase 4'), +(@SCRIPT,9,7,0,0,0,100,0,0,0,0,0,49,0,0,0,0,0,0,21,40,0,0,0,0,0,0, 'High Priest Talet-Kha - script - Start attack on closest player in 40 yards'), +(-85118,0,0,1,38,0,100,0,0,1,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mystical Webbing - On data set 0 1 - Set React State passive'), +(-85118,0,1,0,61,0,100,0,0,0,0,0,11,45497,2,0,0,0,0,11,26073,40,0,0,0,0,0,'Mystical Webbing - Linked with previous event - Web Beam'), +(-85118,0,2,3,6,0,100,0,0,0,0,0,45,0,2,0,0,0,0,10,85175,23033,0,0,0,0,0,'Mystical Webbing - On death - set data 0 2 Invisible Stalker'), +(-85118,0,3,0,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,11,26073,40,0,0,0,0,0,'Mystical Webbing - Linked with previous event - Set data 0 1 on Talet-Kha'), +(-85098,0,0,1,38,0,100,0,0,1,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Mystical Webbing - On data set 0 1 - Set React State passive'), +(-85098,0,1,0,61,0,100,0,0,0,0,0,11,45497,2,0,0,0,0,11,26073,40,0,0,0,0,0,'Mystical Webbing - Linked with previous event - Web Beam'), +(-85098,0,2,3,6,0,100,0,0,0,0,0,45,0,2,0,0,0,0,10,85176,23033,0,0,0,0,0,'Mystical Webbing - On death - set data 0 2 Invisible Stalker'), +(-85098,0,3,0,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,11,26073,40,0,0,0,0,0,'Mystical Webbing - Linked with previous event - Set data 0 1 on Talet-Kha'), +(-85175,0,0,0,38,0,100,0,0,1,0,0,11,45497,2,0,0,0,0,11,26073,40,0,0,0,0,0, 'Invisible Stalker (Floating) - On data set 0 1 - Cast Web Beam on target'), +(-85175,0,1,0,38,0,100,0,0,2,0,0,92,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Invisible Stalker (Floating) - On data set 0 2 - Stop casting'), +(-85176,0,0,0,38,0,100,0,0,1,0,0,11,45497,2,0,0,0,0,11,26073,40,0,0,0,0,0, 'Invisible Stalker (Floating) - On data set 0 1 - Cast Web Beam on target'), +(-85176,0,1,0,38,0,100,0,0,2,0,0,92,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Invisible Stalker (Floating) - On data set 0 2 - Stop casting'); diff --git a/sql/updates/world/2012_12_24_02_sai.sql b/sql/updates/world/2012_12_24_02_sai.sql new file mode 100644 index 00000000000..03d0a9ef5c6 --- /dev/null +++ b/sql/updates/world/2012_12_24_02_sai.sql @@ -0,0 +1,64 @@ +-- [Q] Gambling Debt - http://www.wowhead.com/quest=11464 +-- Discover's work, thanks to Vincent-Michael for helping with gossips and Pitcrawler for advices +-- Indexes +SET @ENTRY := 24539; +SET @SCRIPT := @ENTRY * 100; +SET @SCRIPT1 := (@ENTRY * 100) + 1; +SET @GOSSIP_1 := 9010; +SET @GOSSIP_2 := 9011; +SET @QUEST := 11464; +SET @SPELL_SCORCH := 50183; +SET @SPELL_BLAST_WAVE := 15091; + +-- SAI support - "Silvermoon" Harry +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@SCRIPT,@SCRIPT1) 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`,`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 +(@ENTRY,0,0,1,62,0,100,0,@GOSSIP_1,0,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Silvermoon Hary - On Gossip Select option 2 - Set Faction Aggressive'), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Silvermoon Hary - On Gossip Select - Close Gossip'), +(@ENTRY,0,2,3,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Silvermoon Hary - Linked with previous event - Say Line 0'), +(@ENTRY,0,3,0,61,0,100,0,0,0,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Silvermoon Hary - Linked with previous event - Set faction aggressive'), +(@ENTRY,0,4,0,2,0,100,1,1,50,60000,60000,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Silvermoon Hary - On hp % between 1/50 - Start acitonlist'), +(@ENTRY,0,5,0,64,1,100,0,0,0,0,0,98,@GOSSIP_2,12175,0,0,0,0,7,0,0,0,0,0,0,0, 'Silvermoon Hary - On gossip hello in phase 1 - Send gossip menu 2'), +(@ENTRY,0,6,0,62,1,100,0,@GOSSIP_2,0,0,0,80,@SCRIPT1,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Silvermoon Hary - On gossip select - Start actionlist 1'), +(@ENTRY,0,7,0,0,0,100,0,3000,6000,15000,22000,11,@SPELL_BLAST_WAVE,1,0,0,0,0,1,0,0,0,0,0,0,0, 'Silvermoon Hary - IC - Cast Blast Wave'), +(@ENTRY,0,8,0,0,0,100,0,2500,4000,4000,5000,11,@SPELL_SCORCH,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Silvermoon Hary - IC - Cast Scorch'), +(@SCRIPT,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Silvermoon Hary (script 0) - Action 0 - Say line 1'), +(@SCRIPT,9,1,0,0,0,100,0,0,0,0,0,102,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Silvermoon Hary (script 0) - Action 1 - Set hp reg disabled'), +(@SCRIPT,9,2,0,0,0,100,0,0,0,0,0,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Silvermoon Hary (script 0) - Action 2 - Set home position'), +(@SCRIPT,9,3,0,0,0,100,0,0,0,0,0,2,1080,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Silvermoon Hary (script 0) - Action 3 - Change faction to friendly'), +(@SCRIPT,9,4,0,0,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Silvermoon Hary (script 0) - Action 4 - Evade (to stop attack)'), +(@SCRIPT,9,5,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Silvermoon Hary (script 0) - Action 6 - Set event phase 1'), +(@SCRIPT1,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Silvermoon Hary (script 1) - Action 0 - Close gossip window'), +(@SCRIPT1,9,1,0,0,0,100,0,0,0,0,0,56,34115,1,0,0,0,0,7,0,0,0,0,0,0,0, 'Silvermoon Hary (script 1) - Action 1 - Give item to invoker'), +(@SCRIPT1,9,2,0,0,0,100,0,0,0,0,0,102,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Silvermoon Hary (script 1) - Action 2 - Set hp reg enabled'), +(@SCRIPT1,9,3,0,0,0,100,0,0,0,0,0,41,10000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Silvermoon Hary (script 1) - Action 3 - Despawn in 10 sec'), +(@SCRIPT1,9,4,0,0,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Silvermoon Hary (script 1) - Action 4 - Set event phase 0'); + +-- Texts +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,'Do not test me, scurvy dog! I''m trained in the way of Blood Knights!',12,0,100,0,0,0, 'Silvermoon Hary - start to fight'), +(@ENTRY,1,0,"I'll pay! I'll pay! Eeeek! Please don't hurt me!",12,0,100,0,0,0, 'Silvermoon Hary - second gossip'); + +-- Gossip menu +DELETE FROM `gossip_menu` WHERE `entry` IN (@GOSSIP_1,@GOSSIP_2); +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(@GOSSIP_1,12174), +(@GOSSIP_2,12175); + +-- Gossip option menu +DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP_1; +DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP_2; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_id`,`npc_option_npcflag`,`option_icon`,`option_text`,`box_coded`,`box_money`,`box_text`) VALUES +(@GOSSIP_1,0,1,1,0, 'Taruk sent me to collect what you owe.',0,0, ''), +(@GOSSIP_1,1,3,128,1, 'Do you sell any of this stuff?',0,0, ''), +(@GOSSIP_2,0,1,1,0, 'Pay up, Harry!',0,0, ''), +(@GOSSIP_2,1,3,128,1, 'Do you sell any of this stuff?',0,0, ''); + +-- Condition +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (@GOSSIP_1,@GOSSIP_2); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,@GOSSIP_1,0,0,9,0,@QUEST,0,0,0,'','Only show first gossip (option 0) if player is on quest Gambling Debt'), +(15,@GOSSIP_2,0,0,9,0,@QUEST,0,0,0,'','Only show second gossip (option 0) if player is on quest Gambling Debt'); diff --git a/src/server/scripts/Northrend/dragonblight.cpp b/src/server/scripts/Northrend/dragonblight.cpp index 71836a81687..698daba99e3 100644 --- a/src/server/scripts/Northrend/dragonblight.cpp +++ b/src/server/scripts/Northrend/dragonblight.cpp @@ -274,21 +274,22 @@ class npc_wyrmrest_defender : public CreatureScript { switch (spell->Id) { - // This is what happens on retail - case SPELL_WYRMREST_DEFENDER_MOUNT: - Talk(WHISPER_MOUNTED, me->GetCharmerOrOwnerGUID()); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); - break; + case SPELL_WYRMREST_DEFENDER_MOUNT: + Talk(WHISPER_MOUNTED, me->GetCharmerOrOwnerGUID()); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + break; // Both below are for checking low hp warning - case SPELL_DEFENDER_ON_LOW_HEALTH_EMOTE: - Talk(BOSS_EMOTE_ON_LOW_HEALTH, me->GetCharmerOrOwnerGUID()); - break; - case SPELL_RENEW: - if (!hpWarningReady && RenewRecoveryChecker <= 100) - RenewRecoveryChecker = 20000; + case SPELL_DEFENDER_ON_LOW_HEALTH_EMOTE: + Talk(BOSS_EMOTE_ON_LOW_HEALTH, me->GetCharmerOrOwnerGUID()); + break; + case SPELL_RENEW: + if (!hpWarningReady && RenewRecoveryChecker <= 100) + { + RenewRecoveryChecker = 20000; + } renewRecoveryCanCheck = true; - break; + break; } } }; -- cgit v1.2.3