From c57dab359f3efb5916d300f45210ed4e934e3878 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Wed, 4 May 2022 15:30:24 -0300 Subject: [PATCH 01/17] Fix(DB/SAI): Falconwing Square scripted NPCs (#11619) * Fix(DB/SAI): Falconwing Square scripted NPCs * Update rev_1651687148755567176.sql --- .../rev_1651687148755567176.sql | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1651687148755567176.sql diff --git a/data/sql/updates/pending_db_world/rev_1651687148755567176.sql b/data/sql/updates/pending_db_world/rev_1651687148755567176.sql new file mode 100644 index 000000000..c42c658a3 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1651687148755567176.sql @@ -0,0 +1,113 @@ +-- Fix scripted npcs at Falconwing Square + +-- Novice Ranger scripting missing +-- Wretched Captive scripting incorrect +-- Sergeant Kan'ren scripting incorrect +-- Sleyin scripting incorrect +-- Kyrenna scripting incorrect + +-- Novice Ranger SAI +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=16923; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (16923) 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 +(16923,0,0,0,1,0,100,0,215000,225000,215000,225000,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Novice Ranger - OOC - Say text 0'); + +-- Wretched Captive SAI +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=16916; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (16916) 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 +(16916,0,0,0,1,0,100,0,18000,18000,18000,18000,0,5,20,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Wretched Captive - OOC - Play Emote 20 "Beg"'); + +-- Fix Wretched Captive text +UPDATE `creature_text` SET `Emote`=18, `Duration`=0 WHERE `CreatureID`=16916; + +-- Sergeant Kan'ren SAI +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=16924; +DELETE FROM `smart_scripts` WHERE `entryorguid`=16924 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=169240 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 +(16924,0,0,0,1,0,100,0,255000,255000,255000,255000,0,80,169240,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Sergeant Kan''ren - OOC - Run script'), +(169240,9,0,0,0,0,100,0,0,0,0,0,0,53,0,16924,0,0,0,0,1,0,0,0,0,0,0,0,0,'Sergeant Kan''ren - Script - Load path'), +(169240,9,1,0,0,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Sergeant Kan''ren - Script - Say text 0'), +(169240,9,2,0,0,0,100,0,4000,4000,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0,1.04719758,'Sergeant Kan''ren - Script - Set Orientation'), +(169240,9,3,0,0,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,19,16916,10,0,0,0,0,0,0,'Sergeant Kan''ren - Script - Wretched Captive Say text 0'), +(169240,9,4,0,0,0,100,0,6000,6000,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Sergeant Kan''ren - Script - Say text 1'); + +-- SAI Path for Kan'ren +DELETE FROM `waypoints` WHERE `entry`=16924; +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`point_comment`) VALUES +(16924,1,9513.46,-6840.1626,16.743443,0,0, 'Kan''ren'), +(16924,2,9514.46,-6839.1626,16.743443,0,0, 'Kan''ren'), +(16924,3,9514.46,-6837.6626,16.743443,0,0, 'Kan''ren'), +(16924,4,9513.21,-6836.9126,16.743443,0,0, 'Kan''ren'), +(16924,5,9512.21,-6837.6626,16.743443,0,0, 'Kan''ren'), +(16924,6,9511.96,-6839.1626,16.743443,0,0, 'Kan''ren'), +(16924,7,9512.21,-6840.1626,16.493443,0,0, 'Kan''ren'); + +-- Fix Kan'ren sheath +UPDATE `creature_addon` SET `bytes2`=1 WHERE `guid`=58702; + +-- Fix Kan'ren text +UPDATE `creature_text` SET `Emote`=0, `Duration`=0 WHERE `CreatureID`=16924; + +-- Sleyin SAI +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=18926; +DELETE FROM `smart_scripts` WHERE `entryorguid`=18926 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=189260 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 +(18926,0,0,0,1,0,100,0,102000,102000,204000,204000,0,80,189260,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Sleyin - OOC - Run script'), +(189260,9,0,0,0,0,100,0,0,0,0,0,0,59,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Sleyin - Script - Set run off'), +(189260,9,1,0,0,0,100,0,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,0,9486.051,-6807.0537,16.575666,0,'Sleyin - Script - Move to'), +(189260,9,2,0,0,0,100,0,2000,2000,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Sleyin - Script - Say text 0'), +(189260,9,3,0,0,0,100,0,6000,6000,0,0,0,69,0,0,0,0,0,0,8,0,0,0,0,9482.344,-6805.512,16.575666,0,'Sleyin - Script - Move to'), +(189260,9,4,0,0,0,100,0,2000,2000,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0.7504915595,'Sleyin - Script - Set Orientation'), +(189260,9,5,0,0,0,100,0,2000,2000,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Sleyin - Script - Say text 1'), +(189260,9,6,0,0,0,100,0,92000,92000,0,0,0,69,0,0,0,0,0,0,8,0,0,0,0,9486.051,-6807.0537,16.575666,0,'Sleyin - Script - Move to'), +(189260,9,7,0,0,0,100,0,2000,2000,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Sleyin - Script - Say text 0'), +(189260,9,8,0,0,0,100,0,6000,6000,0,0,0,69,0,0,0,0,0,0,8,0,0,0,0,9482.344,-6805.512,16.575666,0,'Sleyin - Script - Move to'), +(189260,9,9,0,0,0,100,0,2000,2000,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0.7504915595,'Sleyin - Script - Set Orientation'), +(189260,9,10,0,0,0,100,0,2000,2000,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Sleyin - Script - Say text 1'); + +-- Fix Sleyin text +UPDATE `creature_text` SET `Emote`=22 WHERE `CreatureID`=18926 AND `GroupID`=0; +UPDATE `creature_text` SET `Emote`=274 WHERE `CreatureID`=18926 AND `GroupID`=2; + +-- Remove Sleyin path +UPDATE `creature` SET `MovementType`=0 WHERE `guid` IN (67954); +UPDATE `creature_addon` SET `path_id`=0,`bytes2`=1 WHERE `guid` IN (67954); +DELETE FROM `waypoint_data` WHERE `id`=679540; +DELETE FROM `waypoint_scripts` WHERE `id`=160; + +-- Kyrenna SAI +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=18929; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (18929) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (189290) 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 +(18929,0,0,0,1,0,100,0,60000,60000,558000,558000,0,80,189290,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kyrenna - OOC - Run script'), +(189290,9,0,0,0,0,100,0,0,0,0,0,0,53,0,189290,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kyrenna - Script - Move path'), +(189290,9,1,0,0,0,100,0,7000,7000,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kyrenna - Script - Say text 0'), +(189290,9,2,0,0,0,100,0,8000,8000,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kyrenna - Script - Say text 1'), +(189290,9,3,0,0,0,100,0,8000,8000,0,0,0,53,0,189291,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kyrenna - Script - Move path'), +(189290,9,4,0,0,0,100,0,6000,6000,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0,2.51327419,'Kyrenna - Script - Set Orientation'), +(189290,9,5,0,0,0,100,0,204000,204000,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kyrenna - Script - Say text 2'), +(189290,9,6,0,0,0,100,0,7000,7000,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kyrenna - Script - Say text 3'), +(189290,9,7,0,0,0,100,0,201000,201000,0,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kyrenna - Script - Say text 4'), +(189290,9,8,0,0,0,100,0,7000,7000,0,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Kyrenna - Script - Say text 5'); + +-- SAI Path for Kyrenna +DELETE FROM `waypoints` WHERE `entry` IN (189290,189291); +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`point_comment`) VALUES +(189290,1,9548.289,-6828.249,16.763393,0,0, 'Kyrenna'), +(189290,2,9551.43,-6836.5903,16.611946,0,0, 'Kyrenna'), +(189291,1,9548.289,-6828.249,16.763393,0,0, 'Kyrenna'), +(189291,2,9552.018,-6825.113,16.513393,0,0, 'Kyrenna'); + +-- Fix text for Kyrenna +DELETE FROM `creature_text` WHERE `CreatureID`=18929; +INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(18929,0,0,'If only I had some wine to go with my cheese...',12,0,100,18,0,0,16093,0,'Kyrenna'), +(18929,1,0,'The hours would pass so much more sweetly.',12,0,100,0,0,0,16096,0,'Kyrenna'), +(18929,2,0,'Ooh what a dreadful job!',12,0,100,1,0,0,16094,0,'Kyrenna'), +(18929,3,0,'All day, surrounded by the stench of bad feet.',12,0,100,0,0,0,16095,0,'Kyrenna'), +(18929,4,0,'Why couldn''t mother have chosen something else to dedicate herself to?',12,0,100,1,0,0,16097,0,'Kyrenna'), +(18929,5,0,'Cakes, pastries, even bread - anything but cheese!',12,0,100,0,0,0,16098,0,'Kyrenna'); From c881d791c1cbd06ba5048a248d8a4db031f3ad48 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 4 May 2022 18:32:45 +0000 Subject: [PATCH 02/17] chore(DB): import pending files Referenced commit(s): c57dab359f3efb5916d300f45210ed4e934e3878 --- .../rev_1651687148755567176.sql => db_world/2022_05_04_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1651687148755567176.sql => db_world/2022_05_04_01.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1651687148755567176.sql b/data/sql/updates/db_world/2022_05_04_01.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1651687148755567176.sql rename to data/sql/updates/db_world/2022_05_04_01.sql index c42c658a3..6fee4d78e 100644 --- a/data/sql/updates/pending_db_world/rev_1651687148755567176.sql +++ b/data/sql/updates/db_world/2022_05_04_01.sql @@ -1,3 +1,4 @@ +-- DB update 2022_05_04_00 -> 2022_05_04_01 -- Fix scripted npcs at Falconwing Square -- Novice Ranger scripting missing From d686a7c573d7f914ccd6b1d5228d6fc8bdc494d9 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Wed, 4 May 2022 22:45:14 -0300 Subject: [PATCH 03/17] Fix(DB/Quest_Greeting) gender check (#11628) --- .../updates/pending_db_world/rev_1651708009830546980.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1651708009830546980.sql diff --git a/data/sql/updates/pending_db_world/rev_1651708009830546980.sql b/data/sql/updates/pending_db_world/rev_1651708009830546980.sql new file mode 100644 index 000000000..10652523e --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1651708009830546980.sql @@ -0,0 +1,6 @@ +UPDATE `quest_greeting` SET `Greeting`='Hello, citizen. You look like a $g man : woman; with a purpose - do you have business with the Stormwind Army?' WHERE `ID`=261; +UPDATE `quest_greeting` SET `Greeting`='Hello, hello! Welcome to my kitchen, $g sir : m''lady;! This is where all of the Scarlet Raven Tavern''s finest delicacies are made. Ah, just smell the wonderful aroma!' WHERE `ID`=272; +UPDATE `quest_greeting` SET `Greeting`='Hey $Gbuddy:ma''am;, do you think you could give me a hand with something? I''m really IN dire straits here...' WHERE `ID`=415; +UPDATE `quest_greeting` SET `Greeting`='You watch where you step around here, $Glad:lass;. You might not be a part of our outfit, but that doesn''t mean I won''t take a cane to you if you fall out of line!' WHERE `ID`=733; +UPDATE `quest_greeting` SET `Greeting`='Greetings, $G lad : lass;. I''m Grelin Whitebeard. I''m here to examine the threat posed by the growing numbers of trolls in Coldridge Valley. What have I found? It''s a bit troubling...' WHERE `ID`=786; +UPDATE `quest_greeting` SET `Greeting`='Good day, $glad:lass;! Perhaps you could help me with some things that need to be taken care of.' WHERE `ID`=3663; From 290f5fb776567597e1499d672caa61c960bbfbb2 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Thu, 5 May 2022 01:47:08 +0000 Subject: [PATCH 04/17] chore(DB): import pending files Referenced commit(s): d686a7c573d7f914ccd6b1d5228d6fc8bdc494d9 --- .../rev_1651708009830546980.sql => db_world/2022_05_05_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1651708009830546980.sql => db_world/2022_05_05_00.sql} (96%) diff --git a/data/sql/updates/pending_db_world/rev_1651708009830546980.sql b/data/sql/updates/db_world/2022_05_05_00.sql similarity index 96% rename from data/sql/updates/pending_db_world/rev_1651708009830546980.sql rename to data/sql/updates/db_world/2022_05_05_00.sql index 10652523e..407fddded 100644 --- a/data/sql/updates/pending_db_world/rev_1651708009830546980.sql +++ b/data/sql/updates/db_world/2022_05_05_00.sql @@ -1,3 +1,4 @@ +-- DB update 2022_05_04_01 -> 2022_05_05_00 UPDATE `quest_greeting` SET `Greeting`='Hello, citizen. You look like a $g man : woman; with a purpose - do you have business with the Stormwind Army?' WHERE `ID`=261; UPDATE `quest_greeting` SET `Greeting`='Hello, hello! Welcome to my kitchen, $g sir : m''lady;! This is where all of the Scarlet Raven Tavern''s finest delicacies are made. Ah, just smell the wonderful aroma!' WHERE `ID`=272; UPDATE `quest_greeting` SET `Greeting`='Hey $Gbuddy:ma''am;, do you think you could give me a hand with something? I''m really IN dire straits here...' WHERE `ID`=415; From 6a58d1ee69fdc9ac310c2d9de436289c132d1fef Mon Sep 17 00:00:00 2001 From: Charlton Lau Date: Thu, 5 May 2022 12:04:53 +0900 Subject: [PATCH 05/17] fix(Script/Quest): A Pawn on the Eternal Board freezing world (#11616) --- src/server/scripts/Kalimdor/zone_silithus.cpp | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp index e21f08dfd..609e3d7b1 100644 --- a/src/server/scripts/Kalimdor/zone_silithus.cpp +++ b/src/server/scripts/Kalimdor/zone_silithus.cpp @@ -532,21 +532,26 @@ public: break; case 51: { - uint32 entries[4] = { 15423, 15424, 15414, 15422 }; - for (uint8 i = 0; i < 4; ++i) + std::list constructList; + + me->GetCreatureListWithEntryInGrid(constructList, 15423, 100.0f); + me->GetCreatureListWithEntryInGrid(constructList, 15424, 100.0f); + me->GetCreatureListWithEntryInGrid(constructList, 15414, 100.0f); + me->GetCreatureListWithEntryInGrid(constructList, 15422, 100.0f); + + if (!constructList.empty()) { - Unit* mob = player->FindNearestCreature(entries[i], 50, me); - while (mob) + for (std::list::const_iterator itr = constructList.begin(); itr != constructList.end(); ++itr) { - mob->RemoveFromWorld(); - mob = player->FindNearestCreature(15423, 50, me); + (*itr)->RemoveFromWorld(); } } + break; } case 52: Fandral->GetMotionMaster()->MoveCharge(-8028.75f, 1538.795f, 2.61f, 4); - Fandral->AI()->Talk(ANACHRONOS_SAY_9, me); + Talk(ANACHRONOS_SAY_9); break; case 53: Fandral->AI()->Talk(FANDRAL_SAY_6); @@ -555,7 +560,8 @@ public: Talk(ANACHRONOS_EMOTE_2); break; case 55: - Fandral->SetVisible(false); + //Fandral should not dispear atm. + //Fandral->SetVisible(false); break; case 56: Talk(ANACHRONOS_EMOTE_3); From 40c7750a399e94795dcaa9ad201dc1eb72a2a838 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Thu, 5 May 2022 18:57:04 -0300 Subject: [PATCH 06/17] Fix (DB/Gossip/Conditions) Captured Arko'narin (#11622) --- .../pending_db_world/rev_1651694260487289884.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1651694260487289884.sql diff --git a/data/sql/updates/pending_db_world/rev_1651694260487289884.sql b/data/sql/updates/pending_db_world/rev_1651694260487289884.sql new file mode 100644 index 000000000..76162696b --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1651694260487289884.sql @@ -0,0 +1,11 @@ +-- Fix gossip for Captured Arko'narin +UPDATE `creature_template` SET `gossip_menu_id`=3129 WHERE `entry`=11016; +DELETE FROM `gossip_menu` WHERE `MenuID`=30229; +DELETE FROM `gossip_menu` WHERE `MenuID`=3129 AND `TextID`=4114; +INSERT INTO `gossip_menu` (`MenuID`,`TextID`) VALUES (3129,4114); + +-- Conditions for gosip text +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=3129; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14,3129,4113,0,0,8,0,5202,0,0,0,0,0,'','Captured Arko''narin - Show Gossip Menu Text 4113 if Quest 5202 is rewarded'), +(14,3129,4114,0,0,8,0,5203,0,0,0,0,0,'','Captured Arko''narin - Show Gossip Menu Text 4114 if Quest 5203 is rewarded'); From a3bf902c6d488b22cf295b0081223101acd78d57 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Thu, 5 May 2022 21:59:16 +0000 Subject: [PATCH 07/17] chore(DB): import pending files Referenced commit(s): 40c7750a399e94795dcaa9ad201dc1eb72a2a838 --- .../rev_1651694260487289884.sql => db_world/2022_05_05_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1651694260487289884.sql => db_world/2022_05_05_01.sql} (95%) diff --git a/data/sql/updates/pending_db_world/rev_1651694260487289884.sql b/data/sql/updates/db_world/2022_05_05_01.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1651694260487289884.sql rename to data/sql/updates/db_world/2022_05_05_01.sql index 76162696b..ea69d08d0 100644 --- a/data/sql/updates/pending_db_world/rev_1651694260487289884.sql +++ b/data/sql/updates/db_world/2022_05_05_01.sql @@ -1,3 +1,4 @@ +-- DB update 2022_05_05_00 -> 2022_05_05_01 -- Fix gossip for Captured Arko'narin UPDATE `creature_template` SET `gossip_menu_id`=3129 WHERE `entry`=11016; DELETE FROM `gossip_menu` WHERE `MenuID`=30229; From 7975bc63ca90b2754518502c2270f059a80c74d0 Mon Sep 17 00:00:00 2001 From: SilentCLD Date: Fri, 6 May 2022 04:33:18 +0100 Subject: [PATCH 08/17] fix(Core/Commands): Fix removing item from player account (#11041) The additem command would silently return when trying to remove an item from a player security level account --- src/server/scripts/Commands/cs_misc.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index fe4ea1266..d6b9bbd8e 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1658,20 +1658,22 @@ public: { // output that player don't have any items to destroy handler->PSendSysMessage(LANG_REMOVEITEM_FAILURE, handler->GetNameLink(playerTarget).c_str(), itemId); + handler->SetSentErrorMessage(true); + return false; } - else if (!playerTarget->HasItemCount(itemId, -count)) + + if (!playerTarget->HasItemCount(itemId, -count)) { // output that player don't have as many items that you want to destroy handler->PSendSysMessage(LANG_REMOVEITEM_ERROR, handler->GetNameLink(playerTarget).c_str(), itemId); + handler->SetSentErrorMessage(true); + return false; } } - else - { - // output successful amount of destroyed items - playerTarget->DestroyItemCount(itemId, -count, true, false); - handler->PSendSysMessage(LANG_REMOVEITEM, itemId, -count, handler->GetNameLink(playerTarget).c_str()); - } + // output successful amount of destroyed items + playerTarget->DestroyItemCount(itemId, -count, true, false); + handler->PSendSysMessage(LANG_REMOVEITEM, itemId, -count, handler->GetNameLink(playerTarget).c_str()); return true; } From 6cf82e3bd6cd481405be04ae67afa30d280a91bf Mon Sep 17 00:00:00 2001 From: Tralenor <76077537+Tralenor@users.noreply.github.com> Date: Fri, 6 May 2022 05:42:49 +0200 Subject: [PATCH 09/17] feat(Core/DB): Add Hooks On creature/game object save to db (#11246) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * implement OnCreatureSaveToDB and OnGameObjectSaveToDB Hooks * fix Whitespaces in ScriptMgr.h Co-authored-by: Timothée Moos --- src/server/game/Entities/Creature/Creature.cpp | 1 + .../game/Entities/GameObject/GameObject.cpp | 1 + .../ScriptDefines/AllCreatureScript.cpp | 10 ++++++++++ .../ScriptDefines/AllGameObjectScript.cpp | 10 ++++++++++ src/server/game/Scripting/ScriptMgr.h | 18 +++++++++++++++++- 5 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 6b5bc14e9..81caf4e77 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -1416,6 +1416,7 @@ void Creature::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask) trans->Append(stmt); WorldDatabase.CommitTransaction(trans); + sScriptMgr->OnCreatureSaveToDB(this); } void Creature::SelectLevel(bool changelevel) diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 249a2e82e..e3b9216bc 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -1061,6 +1061,7 @@ void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask, bool } WorldDatabase.CommitTransaction(trans); + sScriptMgr->OnGameObjectSaveToDB(this); } bool GameObject::LoadGameObjectFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap) diff --git a/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp b/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp index 8fa40dd2b..896191242 100644 --- a/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/AllCreatureScript.cpp @@ -38,6 +38,16 @@ void ScriptMgr::OnCreatureRemoveWorld(Creature* creature) }); } +void ScriptMgr::OnCreatureSaveToDB(Creature* creature) +{ + ASSERT(creature); + + ExecuteScript([&](AllCreatureScript* script) + { + script->OnCreatureSaveToDB(creature); + }); +} + void ScriptMgr::Creature_SelectLevel(const CreatureTemplate* cinfo, Creature* creature) { ExecuteScript([&](AllCreatureScript* script) diff --git a/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.cpp b/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.cpp index 39d4d62b2..933ef025f 100644 --- a/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.cpp +++ b/src/server/game/Scripting/ScriptDefines/AllGameObjectScript.cpp @@ -37,3 +37,13 @@ void ScriptMgr::OnGameObjectRemoveWorld(GameObject* go) script->OnGameObjectRemoveWorld(go); }); } + +void ScriptMgr::OnGameObjectSaveToDB(GameObject* go) +{ + ASSERT(go); + + ExecuteScript([&](AllGameObjectScript* script) + { + script->OnGameObjectSaveToDB(go); + }); +} diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index bf874c096..d5e480509 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -561,6 +561,13 @@ public: */ virtual void OnCreatureRemoveWorld(Creature* /*creature*/) { } + /** + * @brief This hook runs after creature has been saved to DB + * + * @param creature Contains information about the Creature + */ + virtual void OnCreatureSaveToDB(Creature* /*creature*/) { } + /** * @brief This hook called when a player opens a gossip dialog with the creature. * @@ -643,7 +650,12 @@ public: * @param go Contains information about the GameObject */ virtual void OnGameObjectAddWorld(GameObject* /*go*/) { } - + /** + * @brief This hook runs after the game object iis saved to the database + * + * @param go Contains information about the GameObject + */ + virtual void OnGameObjectSaveToDB(GameObject* /*go*/) { } /** * @brief This hook runs after remove game object in world * @@ -2392,6 +2404,10 @@ public: /* AllCreatureScript */ //listener function (OnAllCreatureUpdate) is called by OnCreatureUpdate //void OnAllCreatureUpdate(Creature* creature, uint32 diff); void Creature_SelectLevel(const CreatureTemplate* cinfo, Creature* creature); + void OnCreatureSaveToDB(Creature* creature); + +public: /* AllGameobjectScript */ + void OnGameObjectSaveToDB(GameObject* go); public: /* AllMapScript */ void OnBeforeCreateInstanceScript(InstanceMap* instanceMap, InstanceScript* instanceData, bool load, std::string data, uint32 completedEncounterMask); From 2e13ad75e22b5f70b2e45033ba05bd6349a1ea11 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Fri, 6 May 2022 05:43:27 +0200 Subject: [PATCH 10/17] refactor(Core/Spells): make DoCast functions use SpellCastResult (#11546) * refactor(Core/Spells): make DoCast use SpellCastResult * Update src/server/game/AI/CoreAI/UnitAI.cpp * Update UnitAI.cpp * Update UnitAI.cpp * Update src/server/game/AI/CoreAI/UnitAI.cpp * Update src/server/game/AI/CoreAI/UnitAI.cpp * Update src/server/game/AI/CoreAI/UnitAI.cpp * Update src/server/game/AI/CoreAI/UnitAI.cpp * Update src/server/game/AI/CoreAI/UnitAI.cpp * Update src/server/game/AI/CoreAI/UnitAI.cpp * Update src/server/game/AI/CoreAI/UnitAI.cpp * Update src/server/game/AI/CoreAI/UnitAI.cpp * Update src/server/game/AI/CoreAI/UnitAI.h --- src/server/game/AI/CoreAI/UnitAI.cpp | 90 +++++++++++++++++----------- src/server/game/AI/CoreAI/UnitAI.h | 16 ++--- 2 files changed, 63 insertions(+), 43 deletions(-) diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp index 42e9cbf46..446bec316 100644 --- a/src/server/game/AI/CoreAI/UnitAI.cpp +++ b/src/server/game/AI/CoreAI/UnitAI.cpp @@ -106,7 +106,7 @@ float UnitAI::DoGetSpellMaxRange(uint32 spellId, bool positive) return spellInfo ? spellInfo->GetMaxRange(positive) : 0; } -void UnitAI::DoAddAuraToAllHostilePlayers(uint32 spellid) +SpellCastResult UnitAI::DoAddAuraToAllHostilePlayers(uint32 spellid) { if (me->IsInCombat()) { @@ -114,13 +114,22 @@ void UnitAI::DoAddAuraToAllHostilePlayers(uint32 spellid) for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr) { if (Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid())) + { if (unit->GetTypeId() == TYPEID_PLAYER) + { me->AddAura(spellid, unit); + return SPELL_CAST_OK; + } + } + else + return SPELL_FAILED_BAD_TARGETS; } } + + return SPELL_FAILED_CUSTOM_ERROR; } -void UnitAI::DoCastToAllHostilePlayers(uint32 spellid, bool triggered) +SpellCastResult UnitAI::DoCastToAllHostilePlayers(uint32 spellid, bool triggered) { if (me->IsInCombat()) { @@ -128,13 +137,19 @@ void UnitAI::DoCastToAllHostilePlayers(uint32 spellid, bool triggered) for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr) { if (Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid())) + { if (unit->GetTypeId() == TYPEID_PLAYER) - me->CastSpell(unit, spellid, triggered); + return me->CastSpell(unit, spellid, triggered); + } + else + return SPELL_FAILED_BAD_TARGETS; } } + + return SPELL_FAILED_CUSTOM_ERROR; } -void UnitAI::DoCast(uint32 spellId) +SpellCastResult UnitAI::DoCast(uint32 spellId) { Unit* target = nullptr; @@ -149,10 +164,11 @@ void UnitAI::DoCast(uint32 spellId) break; case AITARGET_ENEMY: { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); - bool playerOnly = spellInfo->HasAttribute(SPELL_ATTR3_ONLY_ON_PLAYER); - //float range = GetSpellMaxRange(spellInfo, false); - target = SelectTarget(SelectTargetMethod::Random, 0, spellInfo->GetMaxRange(false), playerOnly); + if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId)) + { + bool playerOnly = spellInfo->HasAttribute(SPELL_ATTR3_ONLY_ON_PLAYER); + target = SelectTarget(SelectTargetMethod::Random, 0, spellInfo->GetMaxRange(false), playerOnly); + } break; } case AITARGET_ALLY: @@ -163,59 +179,63 @@ void UnitAI::DoCast(uint32 spellId) break; case AITARGET_DEBUFF: { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); - bool playerOnly = spellInfo->HasAttribute(SPELL_ATTR3_ONLY_ON_PLAYER); - float range = spellInfo->GetMaxRange(false); + if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId)) + { + bool playerOnly = spellInfo->HasAttribute(SPELL_ATTR3_ONLY_ON_PLAYER); + float range = spellInfo->GetMaxRange(false); - DefaultTargetSelector targetSelector(me, range, playerOnly, -(int32)spellId); - if (!(spellInfo->AuraInterruptFlags & AURA_INTERRUPT_FLAG_NOT_VICTIM) - && targetSelector(me->GetVictim())) - target = me->GetVictim(); - else - target = SelectTarget(SelectTargetMethod::Random, 0, targetSelector); + DefaultTargetSelector targetSelector(me, range, playerOnly, -(int32)spellId); + if (!(spellInfo->AuraInterruptFlags & AURA_INTERRUPT_FLAG_NOT_VICTIM) + && targetSelector(me->GetVictim())) + target = me->GetVictim(); + else + target = SelectTarget(SelectTargetMethod::Random, 0, targetSelector); + } break; } } if (target) me->CastSpell(target, spellId, false); + + return SPELL_FAILED_BAD_TARGETS; } -void UnitAI::DoCast(Unit* victim, uint32 spellId, bool triggered) +SpellCastResult UnitAI::DoCast(Unit* victim, uint32 spellId, bool triggered) { - if (!victim || (me->HasUnitState(UNIT_STATE_CASTING) && !triggered)) - return; + if (!victim) + return SPELL_FAILED_BAD_TARGETS; - me->CastSpell(victim, spellId, triggered); + if (me->HasUnitState(UNIT_STATE_CASTING) && !triggered) + return SPELL_FAILED_SPELL_IN_PROGRESS; + + return me->CastSpell(victim, spellId, triggered); } -void UnitAI::DoCastVictim(uint32 spellId, bool triggered) +SpellCastResult UnitAI::DoCastVictim(uint32 spellId, bool triggered) { - if (!me->GetVictim() || (me->HasUnitState(UNIT_STATE_CASTING) && !triggered)) - return; + if (Unit* victim = me->GetVictim()) + return DoCast(victim, spellId, triggered); - me->CastSpell(me->GetVictim(), spellId, triggered); + return SPELL_FAILED_BAD_TARGETS; } -void UnitAI::DoCastAOE(uint32 spellId, bool triggered) +SpellCastResult UnitAI::DoCastAOE(uint32 spellId, bool triggered) { if (!triggered && me->HasUnitState(UNIT_STATE_CASTING)) - return; + return SPELL_FAILED_SPELL_IN_PROGRESS; - me->CastSpell((Unit*)nullptr, spellId, triggered); + return me->CastSpell((Unit*)nullptr, spellId, triggered); } -void UnitAI::DoCastRandomTarget(uint32 spellId, uint32 threatTablePosition, float dist, bool playerOnly, bool triggered) +SpellCastResult UnitAI::DoCastRandomTarget(uint32 spellId, uint32 threatTablePosition, float dist, bool playerOnly, bool triggered) { - if (!triggered && me->HasUnitState(UNIT_STATE_CASTING)) - { - return; - } - if (Unit* target = SelectTarget(SelectTargetMethod::Random, threatTablePosition, dist, playerOnly)) { - me->CastSpell(target, spellId, triggered); + return DoCast(target, spellId, triggered); } + + return SPELL_FAILED_BAD_TARGETS; } #define UPDATE_TARGET(a) {if (AIInfo->targettarget=a;} diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h index af3caec97..d9531cc54 100644 --- a/src/server/game/AI/CoreAI/UnitAI.h +++ b/src/server/game/AI/CoreAI/UnitAI.h @@ -317,14 +317,14 @@ public: void AttackStartCaster(Unit* victim, float dist); - void DoAddAuraToAllHostilePlayers(uint32 spellid); - void DoCast(uint32 spellId); - void DoCast(Unit* victim, uint32 spellId, bool triggered = false); - inline void DoCastSelf(uint32 spellId, bool triggered = false) { DoCast(me, spellId, triggered); } - void DoCastToAllHostilePlayers(uint32 spellid, bool triggered = false); - void DoCastVictim(uint32 spellId, bool triggered = false); - void DoCastAOE(uint32 spellId, bool triggered = false); - void DoCastRandomTarget(uint32 spellId, uint32 threatTablePosition = 0, float dist = 0.0f, bool playerOnly = true, bool triggered = false); + SpellCastResult DoAddAuraToAllHostilePlayers(uint32 spellid); + SpellCastResult DoCast(uint32 spellId); + SpellCastResult DoCast(Unit* victim, uint32 spellId, bool triggered = false); + SpellCastResult DoCastSelf(uint32 spellId, bool triggered = false) { return DoCast(me, spellId, triggered); } + SpellCastResult DoCastToAllHostilePlayers(uint32 spellid, bool triggered = false); + SpellCastResult DoCastVictim(uint32 spellId, bool triggered = false); + SpellCastResult DoCastAOE(uint32 spellId, bool triggered = false); + SpellCastResult DoCastRandomTarget(uint32 spellId, uint32 threatTablePosition = 0, float dist = 0.0f, bool playerOnly = true, bool triggered = false); float DoGetSpellMaxRange(uint32 spellId, bool positive = false); From 56955f792b5a11c0449fe41e7e4dd9cf98e360b3 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Fri, 6 May 2022 16:21:14 +0300 Subject: [PATCH 11/17] refactor(Core/Creature): Move hardcoded text/gossips to DB - boss_general_vezax (#11649) --- .../Ulduar/Ulduar/boss_general_vezax.cpp | 75 ++++++++----------- 1 file changed, 31 insertions(+), 44 deletions(-) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp index e8d20373b..c49a488d8 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp @@ -73,17 +73,6 @@ enum VezaxGOs // GO_VEZAX_DOOR = 194750, }; -enum VezaxSounds -{ - SOUND_VEZAX_AGGRO = 15542, - SOUND_VEZAX_SLAIN_1 = 15543, - SOUND_VEZAX_SLAIN_2 = 15544, - SOUND_VEZAX_SURGE = 15545, - SOUND_VEZAX_DEATH = 15546, - SOUND_VEZAX_BERSERK = 15547, - SOUND_VEZAX_HARDMODE = 15548, -}; - enum VezaxEvents { EVENT_SPELL_VEZAX_SHADOW_CRASH = 1, @@ -99,13 +88,23 @@ enum VezaxEvents EVENT_RESTORE_TARGET = 11, }; -#define TEXT_VEZAX_AGGRO "Your destruction will herald a new age of suffering!" -#define TEXT_VEZAX_SLAIN_1 "You thought to stand before the legions of death... and survive?" -#define TEXT_VEZAX_SLAIN_2 "Defiance... a flaw of mortality." -#define TEXT_VEZAX_SURGE "The black blood of Yogg-Saron courses through me! I. AM. UNSTOPPABLE!" -#define TEXT_VEZAX_BERSERK "Your defeat was inevitable!" -#define TEXT_VEZAX_DEATH "Oh, what horrors await...." -#define TEXT_VEZAX_HARDMODE "Behold, now! Terror, absolute!" +enum VezaxText +{ + SAY_AGGRO = 0, + SAY_SLAY = 1, + SAY_SURGE_OF_DARKNESS = 2, + SAY_DEATH = 3, + SAY_BERSERK = 4, + SAY_HARDMODE = 5, + SAY_EMOTE_ANIMUS = 6, + SAY_EMOTE_BARRIER = 7, + SAY_EMOTE_SURGE_OF_DARKNESS = 8, +}; + +enum VaporsText +{ + SAY_EMOTE_VAPORS = 0, +}; class boss_vezax : public CreatureScript { @@ -165,8 +164,7 @@ public: events.RescheduleEvent(EVENT_SPELL_SUMMON_SARONITE_VAPORS, 30000); events.RescheduleEvent(EVENT_BERSERK, 600000); - me->Yell(TEXT_VEZAX_AGGRO, LANG_UNIVERSAL); - me->PlayDirectSound(SOUND_VEZAX_AGGRO, 0); + Talk(SAY_AGGRO); if (pInstance) pInstance->SetData(TYPE_VEZAX, IN_PROGRESS); @@ -226,8 +224,7 @@ public: case EVENT_BERSERK: berserk = true; me->CastSpell(me, SPELL_VEZAX_BERSERK, true); - me->Yell(TEXT_VEZAX_BERSERK, LANG_UNIVERSAL); - me->PlayDirectSound(SOUND_VEZAX_BERSERK, 0); + Talk(SAY_BERSERK); break; case EVENT_SPELL_VEZAX_SHADOW_CRASH: { @@ -261,8 +258,8 @@ public: events.RepeatEvent( me->GetMap()->Is25ManRaid() ? 8000 : 15000 ); break; case EVENT_SPELL_SURGE_OF_DARKNESS: - me->Yell(TEXT_VEZAX_SURGE, LANG_UNIVERSAL); - me->PlayDirectSound(SOUND_VEZAX_SURGE, 0); + Talk(SAY_SURGE_OF_DARKNESS); + Talk(SAY_EMOTE_SURGE_OF_DARKNESS); me->CastSpell(me, SPELL_SURGE_OF_DARKNESS, false); events.RepeatEvent(63000); events.DelayEvents(10000, 1); @@ -298,7 +295,6 @@ public: { vaporsCount++; me->CastSpell(me, SPELL_SUMMON_SARONITE_VAPORS, false); - me->TextEmote("A cloud of saronite vapors coalesces nearby!", nullptr, true); if( vaporsCount < 6 || !hardmodeAvailable ) events.RepeatEvent(30000); @@ -321,7 +317,7 @@ public: case EVENT_SARONITE_VAPORS_SWIRL: if (summons.size()) { - me->TextEmote("The saronite vapors mass and swirl violently, merging into a monstrous form!", nullptr, true); + Talk(SAY_EMOTE_ANIMUS); if( Creature* sv = ObjectAccessor::GetCreature(*me, *(summons.begin())) ) sv->CastSpell(sv, SPELL_SARONITE_ANIMUS_FORMATION_VISUAL, true); @@ -332,10 +328,8 @@ public: case EVENT_SPELL_SUMMON_SARONITE_ANIMUS: if (summons.size()) { - me->TextEmote("A saronite barrier appears around General Vezax!", nullptr, true); - me->Yell(TEXT_VEZAX_HARDMODE, LANG_UNIVERSAL); - me->PlayDirectSound(SOUND_VEZAX_HARDMODE, 0); - + Talk(SAY_HARDMODE); + Talk(SAY_EMOTE_BARRIER); me->CastSpell(me, SPELL_SARONITE_BARRIER, true); if( Creature* sv = ObjectAccessor::GetCreature(*me, *(summons.begin())) ) sv->CastSpell(sv, SPELL_SUMMON_SARONITE_ANIMUS, true); @@ -358,8 +352,7 @@ public: if (pInstance) pInstance->SetData(TYPE_VEZAX, DONE); - me->Yell(TEXT_VEZAX_DEATH, LANG_UNIVERSAL); - me->PlayDirectSound(SOUND_VEZAX_DEATH, 0); + Talk(SAY_DEATH); if( GameObject* door = me->FindNearestGameObject(GO_VEZAX_DOOR, 500.0f) ) if( door->GetGoState() != GO_STATE_ACTIVE ) @@ -372,18 +365,7 @@ public: void KilledUnit(Unit* who) override { if( who->GetTypeId() == TYPEID_PLAYER ) - { - if( urand(0, 1) ) - { - me->Yell(TEXT_VEZAX_SLAIN_1, LANG_UNIVERSAL); - me->PlayDirectSound(SOUND_VEZAX_SLAIN_1, 0); - } - else - { - me->Yell(TEXT_VEZAX_SLAIN_2, LANG_UNIVERSAL); - me->PlayDirectSound(SOUND_VEZAX_SLAIN_2, 0); - } - } + Talk(SAY_SLAY); } void MoveInLineOfSight(Unit* /*who*/) override {} @@ -429,6 +411,11 @@ public: if( Creature* vezax = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(TYPE_VEZAX)) ) vezax->AI()->DoAction(1); } + + void IsSummonedBy(Unit* /*summoner*/) override + { + Talk(SAY_EMOTE_VAPORS); + } }; }; From 588e80ec24dc286ce9f66e72e6d94428b91d9dba Mon Sep 17 00:00:00 2001 From: Asthalor <87535580+Asthalor@users.noreply.github.com> Date: Fri, 6 May 2022 15:31:17 +0200 Subject: [PATCH 12/17] fix(DB/SAI): Regression with Gravis Slipknot (#11638) * There was some regression with this creature. Ive updated the SQL with the new id1. Closes Azerothcore issue 11309 * Invisible sql fixed too --- .../rev_1651749295988575900.sql | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1651749295988575900.sql diff --git a/data/sql/updates/pending_db_world/rev_1651749295988575900.sql b/data/sql/updates/pending_db_world/rev_1651749295988575900.sql new file mode 100644 index 000000000..34c98c04e --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1651749295988575900.sql @@ -0,0 +1,39 @@ +-- Gravis Slipknot + +-- Waypoint and equipment taken from cmangos/tbc-db@ea2fab0 cmangos/tbc-db@381c515 +UPDATE `creature_model_info` SET `DisplayID_Other_Gender` = 0 WHERE `DisplayID` = 2582; +UPDATE `creature_equip_template` SET `ItemID1` = 4560, `VerifiedBuild` = 0 WHERE `CreatureID` = 14221 AND `ID` = 1; +UPDATE `creature` SET `position_x` = 717.6572, `position_y` = -846.4034, `position_z` = 160.7536, `orientation` = 3.351032 WHERE `id1` = 14221; +UPDATE `creature_template` SET `speed_walk` = 1 WHERE (`entry` = 14221); + +SET @NPC := 86756; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `wander_distance`= 0, `MovementType`= 2 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); + +DELETE FROM `waypoint_data` WHERE `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH,1,710.176,-847.23,158.978,0,0), +(@PATH,2,700.134,-853.063,158.516,0,0), +(@PATH,3,684.42,-847.68,158.498,0,0), +(@PATH,4,666.937,-858.739,158.498,0,0), +(@PATH,5,663.885,-866.644,158.499,0,0), +(@PATH,6,662.637,-879.389,158.291,0,0), +(@PATH,7,659.842,-884.845,158.617,0,0), +(@PATH,8,666.729,-899.79,164.624,0,0), +(@PATH,9,669.022,-904.201,164.414,0,0), +(@PATH,10,667.229,-921.961,164.414,0,0), +(@PATH,11,666.778,-939.546,164.85,0,0), +(@PATH,12,673.587,-950.274,164.35,0,0), +(@PATH,13,684.347,-959.261,164.35,0,0), +(@PATH,14,698.708,-966.321,164.653,0,0), +(@PATH,15,708.321,-976.576,165.562,0,30000), +(@PATH,16,700.121,-957.096,164.68,0,0), +(@PATH,17,715.224,-933.369,164.344,0,0), +(@PATH,18,716.543,-899.917,166.366,0,0), +(@PATH,19,715.204,-866.595,161.66,0,0), +(@PATH,20,717.657,-846.403,160.754,0,0), +(@PATH,21,717.657,-846.403,160.754,3.35103,30000); + From 16a18afba416824e89aeb66e163b18698a9add1e Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 6 May 2022 13:33:31 +0000 Subject: [PATCH 13/17] chore(DB): import pending files Referenced commit(s): 588e80ec24dc286ce9f66e72e6d94428b91d9dba --- .../rev_1651749295988575900.sql => db_world/2022_05_06_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1651749295988575900.sql => db_world/2022_05_06_00.sql} (97%) diff --git a/data/sql/updates/pending_db_world/rev_1651749295988575900.sql b/data/sql/updates/db_world/2022_05_06_00.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1651749295988575900.sql rename to data/sql/updates/db_world/2022_05_06_00.sql index 34c98c04e..1a3d9bdb5 100644 --- a/data/sql/updates/pending_db_world/rev_1651749295988575900.sql +++ b/data/sql/updates/db_world/2022_05_06_00.sql @@ -1,3 +1,4 @@ +-- DB update 2022_05_05_01 -> 2022_05_06_00 -- Gravis Slipknot -- Waypoint and equipment taken from cmangos/tbc-db@ea2fab0 cmangos/tbc-db@381c515 From 467bb807af8117e8a30fd106c065af4ac58f3e96 Mon Sep 17 00:00:00 2001 From: Asthalor <87535580+Asthalor@users.noreply.github.com> Date: Fri, 6 May 2022 21:47:08 +0200 Subject: [PATCH 14/17] fix(DB/Loot): Removed Cache of Zanzil from Grand Foreman Puzik Gallywix (#11640) --- .../sql/updates/pending_db_world/rev_1651752894543472300.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1651752894543472300.sql diff --git a/data/sql/updates/pending_db_world/rev_1651752894543472300.sql b/data/sql/updates/pending_db_world/rev_1651752894543472300.sql new file mode 100644 index 000000000..6b042e3db --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1651752894543472300.sql @@ -0,0 +1,5 @@ +-- +-- Remove the item Cache of Zanzil's Altered Mixture (8073) from Grand Foreman Puzik Gallywix (7288) + +DELETE FROM `creature_loot_template` WHERE `Entry` = 7288 AND `Item` = 8073; + From b3bd3f5a45fa8eb1c03797eee1c6c15a469a361d Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 6 May 2022 19:49:06 +0000 Subject: [PATCH 15/17] chore(DB): import pending files Referenced commit(s): 467bb807af8117e8a30fd106c065af4ac58f3e96 --- .../rev_1651752894543472300.sql => db_world/2022_05_06_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1651752894543472300.sql => db_world/2022_05_06_01.sql} (80%) diff --git a/data/sql/updates/pending_db_world/rev_1651752894543472300.sql b/data/sql/updates/db_world/2022_05_06_01.sql similarity index 80% rename from data/sql/updates/pending_db_world/rev_1651752894543472300.sql rename to data/sql/updates/db_world/2022_05_06_01.sql index 6b042e3db..c6bb56761 100644 --- a/data/sql/updates/pending_db_world/rev_1651752894543472300.sql +++ b/data/sql/updates/db_world/2022_05_06_01.sql @@ -1,3 +1,4 @@ +-- DB update 2022_05_06_00 -> 2022_05_06_01 -- -- Remove the item Cache of Zanzil's Altered Mixture (8073) from Grand Foreman Puzik Gallywix (7288) From bea3a323f0ad8d29ee974401a0c2ae1777826454 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Fri, 6 May 2022 17:01:35 -0300 Subject: [PATCH 16/17] Fix(DB/SAI) Rhapsody's Kalimdor Kocktail quest script (#11654) --- .../rev_1651862669936324646.sql | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1651862669936324646.sql diff --git a/data/sql/updates/pending_db_world/rev_1651862669936324646.sql b/data/sql/updates/pending_db_world/rev_1651862669936324646.sql new file mode 100644 index 000000000..36507ca43 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1651862669936324646.sql @@ -0,0 +1,35 @@ +-- Quest 1452 "Rhapsody's Kalimdor Kocktail" turn in script + +-- Rhapsody Shindigger SAI +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=5634; +DELETE FROM `smart_scripts` WHERE `entryorguid`=5634 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=56340 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 +(5634,0,0,0,1,0,100,0,180000,210000,180000,210000,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - OOC - Say text 3'), +(5634,0,1,0,1,0,100,0,160000,220000,160000,220000,0,5,92,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - OOC - Emote Drink'), +(5634,0,2,0,20,0,100,0,1452,0,0,0,0,80,56340,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - On Quest Reward - Run Script'), +(56340,9,0,0,0,0,100,0,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - Script - Remove questgiver flag'), +(56340,9,1,0,0,0,100,0,1000,1000,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - Script - Say text 0'), +(56340,9,2,0,0,0,100,0,0,0,0,0,0,59,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - Script - Set run off'), +(56340,9,3,0,0,0,100,0,4000,4000,0,0,0,69,0,0,0,0,0,0,8,0,0,0,0,219.01102,-2614.0579,160.5317,0,'Rhapsody Shindigger - Script - Move to'), +(56340,9,4,0,0,0,100,0,2000,2000,0,0,0,17,133,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - Script - Set emotestate'), +(56340,9,5,0,0,0,100,0,6000,6000,0,0,0,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - Script - Set emotestate'), +(56340,9,6,0,0,0,100,0,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,0,221.79509,-2613.766,160.41942,0,'Rhapsody Shindigger - Script - Move to'), +(56340,9,7,0,0,0,100,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - Script - Say text 1'), +(56340,9,8,0,0,0,100,0,2000,2000,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - Script - Say text 2'), +(56340,9,9,0,0,0,100,0,4000,4000,0,0,0,69,0,0,0,0,0,0,8,0,0,0,0,223.71512,-2609.9314,160.19234,0,'Rhapsody Shindigger - Script - Move to'), +(56340,9,10,0,0,0,100,0,0,0,0,0,0,17,93,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - Script - Set emotestate'), +(56340,9,11,0,0,0,100,0,3000,3000,0,0,0,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - Script - Set emotestate'), +(56340,9,12,0,0,0,100,0,0,0,0,0,0,90,7,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - Script - Set standstate'), +(56340,9,13,0,0,0,100,0,0,0,0,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - Script - Say text 4'), +(56340,9,14,0,0,0,100,0,5000,5000,0,0,0,17,93,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - Script - Set emotestate'), +(56340,9,15,0,0,0,100,0,0,0,0,0,0,91,7,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - Script - Set standstate'), +(56340,9,16,0,0,0,100,0,1000,1000,0,0,0,69,0,0,0,0,0,0,8,0,0,0,0,219.59831,-2612.208,160.44882,0,'Rhapsody Shindigger - Script - Move to'), +(56340,9,17,0,0,0,100,0,4000,4000,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0,1.151917,'Rhapsody Shindigger - Script - Set Orientation'), +(56340,9,18,0,0,0,100,0,1000,1000,0,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - Script - Say text 5'), +(56340,9,19,0,0,0,100,0,3000,3000,0,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - Script - Add questgiver flag'), +(56340,9,20,0,0,0,100,0,1000,1000,0,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Rhapsody Shindigger - Script - Say text 6'); + +-- Fix emotes in Rhapsody Shindigger creature text +UPDATE `creature_text` SET `Emote`=0 WHERE `CreatureID`=5634 AND `GroupID` IN (0,3,4,6); +UPDATE `creature_text` SET `Emote`=92 WHERE `CreatureID`=5634 AND `GroupID` IN (5); From 8f6785f996fe3f71ff7b8c73028e26fb064d8a76 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 6 May 2022 20:03:30 +0000 Subject: [PATCH 17/17] chore(DB): import pending files Referenced commit(s): bea3a323f0ad8d29ee974401a0c2ae1777826454 --- .../rev_1651862669936324646.sql => db_world/2022_05_06_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1651862669936324646.sql => db_world/2022_05_06_02.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1651862669936324646.sql b/data/sql/updates/db_world/2022_05_06_02.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1651862669936324646.sql rename to data/sql/updates/db_world/2022_05_06_02.sql index 36507ca43..09f132985 100644 --- a/data/sql/updates/pending_db_world/rev_1651862669936324646.sql +++ b/data/sql/updates/db_world/2022_05_06_02.sql @@ -1,3 +1,4 @@ +-- DB update 2022_05_06_01 -> 2022_05_06_02 -- Quest 1452 "Rhapsody's Kalimdor Kocktail" turn in script -- Rhapsody Shindigger SAI