From 95c877c2f4790130982b3bdf4207460970a715d6 Mon Sep 17 00:00:00 2001 From: neifion-00000000 <91289495+neifion-00000000@users.noreply.github.com> Date: Fri, 30 Dec 2022 06:44:04 -0600 Subject: [PATCH 01/66] fix(DB/Loot): Improve Kil'sorrow gold drops (#14418) --- data/sql/updates/pending_db_world/rev_1672338781776631800.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1672338781776631800.sql diff --git a/data/sql/updates/pending_db_world/rev_1672338781776631800.sql b/data/sql/updates/pending_db_world/rev_1672338781776631800.sql new file mode 100644 index 000000000..581f0a173 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672338781776631800.sql @@ -0,0 +1,4 @@ +-- +UPDATE `creature_template` SET `mingold`=276, `maxgold`=1836 WHERE `entry`=17148; +UPDATE `creature_template` SET `mingold`=352, `maxgold`=1788 WHERE `entry`=17147; +UPDATE `creature_template` SET `mingold`=303, `maxgold`=1924 WHERE `entry`=17146; From 80061d582ebf20cdaecc014f23ed643589b5c6c1 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 30 Dec 2022 12:46:14 +0000 Subject: [PATCH 02/66] chore(DB): import pending files Referenced commit(s): 95c877c2f4790130982b3bdf4207460970a715d6 --- .../rev_1672338781776631800.sql => db_world/2022_12_30_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1672338781776631800.sql => db_world/2022_12_30_00.sql} (84%) diff --git a/data/sql/updates/pending_db_world/rev_1672338781776631800.sql b/data/sql/updates/db_world/2022_12_30_00.sql similarity index 84% rename from data/sql/updates/pending_db_world/rev_1672338781776631800.sql rename to data/sql/updates/db_world/2022_12_30_00.sql index 581f0a173..843e53893 100644 --- a/data/sql/updates/pending_db_world/rev_1672338781776631800.sql +++ b/data/sql/updates/db_world/2022_12_30_00.sql @@ -1,3 +1,4 @@ +-- DB update 2022_12_29_11 -> 2022_12_30_00 -- UPDATE `creature_template` SET `mingold`=276, `maxgold`=1836 WHERE `entry`=17148; UPDATE `creature_template` SET `mingold`=352, `maxgold`=1788 WHERE `entry`=17147; From 0eb85c0bfa664cd1064e42f30dac5a4b92201994 Mon Sep 17 00:00:00 2001 From: Samsequel <20357406+Samsequel@users.noreply.github.com> Date: Fri, 30 Dec 2022 21:57:16 +0100 Subject: [PATCH 03/66] fix(DB/Creature): Remove Neophyte Guardian spawn (#14409) * fix(DB/Creature): Remove Neophyte Guardian spawn * Update neophyteguardianbegone.sql --- data/sql/updates/pending_db_world/neophyteguardianbegone.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 data/sql/updates/pending_db_world/neophyteguardianbegone.sql diff --git a/data/sql/updates/pending_db_world/neophyteguardianbegone.sql b/data/sql/updates/pending_db_world/neophyteguardianbegone.sql new file mode 100644 index 000000000..62547e0d1 --- /dev/null +++ b/data/sql/updates/pending_db_world/neophyteguardianbegone.sql @@ -0,0 +1 @@ +DELETE FROM `creature` WHERE `id1` = 21312 AND `GUID` = 85563 ; From 9613587ec431de962ac23b15819ca3dcfc71c1b7 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 30 Dec 2022 21:02:01 +0000 Subject: [PATCH 04/66] chore(DB): import pending files Referenced commit(s): 0eb85c0bfa664cd1064e42f30dac5a4b92201994 --- .../neophyteguardianbegone.sql => db_world/2022_12_30_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/neophyteguardianbegone.sql => db_world/2022_12_30_01.sql} (59%) diff --git a/data/sql/updates/pending_db_world/neophyteguardianbegone.sql b/data/sql/updates/db_world/2022_12_30_01.sql similarity index 59% rename from data/sql/updates/pending_db_world/neophyteguardianbegone.sql rename to data/sql/updates/db_world/2022_12_30_01.sql index 62547e0d1..083e5f79c 100644 --- a/data/sql/updates/pending_db_world/neophyteguardianbegone.sql +++ b/data/sql/updates/db_world/2022_12_30_01.sql @@ -1 +1,2 @@ +-- DB update 2022_12_30_00 -> 2022_12_30_01 DELETE FROM `creature` WHERE `id1` = 21312 AND `GUID` = 85563 ; From 718454fd485bf1fa1cedc9c5a673459c3e5edc54 Mon Sep 17 00:00:00 2001 From: 55Honey <71938210+55Honey@users.noreply.github.com> Date: Fri, 30 Dec 2022 22:29:19 +0100 Subject: [PATCH 05/66] feat(Core/scripts): expose Halaa slider value and owner setter --- src/server/game/OutdoorPvP/OutdoorPvP.h | 10 ++++++++++ src/server/scripts/OutdoorPvP/OutdoorPvPNA.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h index 75998c7e3..531605ada 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvP.h +++ b/src/server/game/OutdoorPvP/OutdoorPvP.h @@ -138,6 +138,16 @@ public: bool SetCapturePointData(uint32 entry, uint32 map, float x, float y, float z, float o = 0, float rotation0 = 0, float rotation1 = 0, float rotation2 = 0, float rotation3 = 0); + void SetSlider(float slider) + { + m_value = std::clamp(slider, -m_maxValue, m_maxValue); + } + + float GetSlider() + { + return m_value; + } + protected: bool AddObject(uint32 type, uint32 entry, uint32 map, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3); diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h index 0068934fd..0491867a1 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h @@ -324,6 +324,8 @@ public: void HandleKillImpl(Player* player, Unit* killed) override; + OPvPCapturePointNA* GetCapturePoint() { return m_obj; } + private: OPvPCapturePointNA* m_obj; }; From 7729684bf012cec613a852251ee5d24140f86c31 Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Fri, 30 Dec 2022 16:51:26 -0500 Subject: [PATCH 06/66] fix(DB/creature): Remove Bonelashers inside of a wall. (#14379) * GET OUT OF MY WALLS * MY WALLS ARE NOT FOR BIRDS * Add a little more specificity to the delete. * Adhere to the newly proposed SQL standard. --- data/sql/updates/pending_db_world/bonelasher-oob.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 data/sql/updates/pending_db_world/bonelasher-oob.sql diff --git a/data/sql/updates/pending_db_world/bonelasher-oob.sql b/data/sql/updates/pending_db_world/bonelasher-oob.sql new file mode 100644 index 000000000..5f84529dd --- /dev/null +++ b/data/sql/updates/pending_db_world/bonelasher-oob.sql @@ -0,0 +1 @@ +DELETE FROM `creature` WHERE `guid` IN (66458, 66459) AND `id1` = 18470; From c0fa1421f3d0f5771038ccb1122c8978f47408a7 Mon Sep 17 00:00:00 2001 From: Samsequel <20357406+Samsequel@users.noreply.github.com> Date: Fri, 30 Dec 2022 22:51:54 +0100 Subject: [PATCH 07/66] fix(DB/Loot): Naga claws should drop 100% (#14405) * fix(DB/Loot): Naga claws should drop 100% * Update nagaclaws.sql --- data/sql/updates/pending_db_world/nagaclaws.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/nagaclaws.sql diff --git a/data/sql/updates/pending_db_world/nagaclaws.sql b/data/sql/updates/pending_db_world/nagaclaws.sql new file mode 100644 index 000000000..044b1d1d6 --- /dev/null +++ b/data/sql/updates/pending_db_world/nagaclaws.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_loot_template` SET `Chance` = 100 WHERE `Entry` IN (18088, 18340, 18044, 18046, 18086, 18087, 18089, 19946, 19947, 20089, 20088) AND `Item` = 24280; From 870c69264e8c830c40600e3c01f2d7018f44bb17 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Fri, 30 Dec 2022 18:52:28 -0300 Subject: [PATCH 08/66] fix(DB/Gossip): Remove empty data from Archmage Leryda gossip (#14327) Create rev_1671665943141414400.sql Authored by: @Saben65 --- data/sql/updates/pending_db_world/rev_1671665943141414400.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1671665943141414400.sql diff --git a/data/sql/updates/pending_db_world/rev_1671665943141414400.sql b/data/sql/updates/pending_db_world/rev_1671665943141414400.sql new file mode 100644 index 000000000..3369a5d40 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1671665943141414400.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `npc_text` WHERE `ID` = 10884; +DELETE FROM `gossip_menu` WHERE `MenuID`=8441 AND `TextID`=10884; From ebf233d037707f5fc441a66eb67ef542369c9a4d Mon Sep 17 00:00:00 2001 From: Eddy Vega <61223313+Si1ker@users.noreply.github.com> Date: Fri, 30 Dec 2022 15:54:19 -0600 Subject: [PATCH 09/66] fix(DB/HallsOfStone): Triggers in Tribunal of Ages (#14130) * fix(DB/Creature): some commit description here fixes trigger aggro fixes trigger model * update * oops --- data/sql/updates/pending_db_world/update.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/sql/updates/pending_db_world/update.sql diff --git a/data/sql/updates/pending_db_world/update.sql b/data/sql/updates/pending_db_world/update.sql new file mode 100644 index 000000000..964abe38e --- /dev/null +++ b/data/sql/updates/pending_db_world/update.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|130 WHERE `entry`=31874; + From 902ce907245e52ed4070438e9cd0dae95f8aa0ad Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 30 Dec 2022 21:56:31 +0000 Subject: [PATCH 10/66] chore(DB): import pending files Referenced commit(s): ebf233d037707f5fc441a66eb67ef542369c9a4d --- .../bonelasher-oob.sql => db_world/2022_12_30_02.sql} | 1 + .../nagaclaws.sql => db_world/2022_12_30_03.sql} | 1 + .../rev_1671665943141414400.sql => db_world/2022_12_30_04.sql} | 1 + .../{pending_db_world/update.sql => db_world/2022_12_30_05.sql} | 1 + 4 files changed, 4 insertions(+) rename data/sql/updates/{pending_db_world/bonelasher-oob.sql => db_world/2022_12_30_02.sql} (62%) rename data/sql/updates/{pending_db_world/nagaclaws.sql => db_world/2022_12_30_03.sql} (79%) rename data/sql/updates/{pending_db_world/rev_1671665943141414400.sql => db_world/2022_12_30_04.sql} (71%) rename data/sql/updates/{pending_db_world/update.sql => db_world/2022_12_30_05.sql} (66%) diff --git a/data/sql/updates/pending_db_world/bonelasher-oob.sql b/data/sql/updates/db_world/2022_12_30_02.sql similarity index 62% rename from data/sql/updates/pending_db_world/bonelasher-oob.sql rename to data/sql/updates/db_world/2022_12_30_02.sql index 5f84529dd..04361ee5a 100644 --- a/data/sql/updates/pending_db_world/bonelasher-oob.sql +++ b/data/sql/updates/db_world/2022_12_30_02.sql @@ -1 +1,2 @@ +-- DB update 2022_12_30_01 -> 2022_12_30_02 DELETE FROM `creature` WHERE `guid` IN (66458, 66459) AND `id1` = 18470; diff --git a/data/sql/updates/pending_db_world/nagaclaws.sql b/data/sql/updates/db_world/2022_12_30_03.sql similarity index 79% rename from data/sql/updates/pending_db_world/nagaclaws.sql rename to data/sql/updates/db_world/2022_12_30_03.sql index 044b1d1d6..598551d08 100644 --- a/data/sql/updates/pending_db_world/nagaclaws.sql +++ b/data/sql/updates/db_world/2022_12_30_03.sql @@ -1,2 +1,3 @@ +-- DB update 2022_12_30_02 -> 2022_12_30_03 -- UPDATE `creature_loot_template` SET `Chance` = 100 WHERE `Entry` IN (18088, 18340, 18044, 18046, 18086, 18087, 18089, 19946, 19947, 20089, 20088) AND `Item` = 24280; diff --git a/data/sql/updates/pending_db_world/rev_1671665943141414400.sql b/data/sql/updates/db_world/2022_12_30_04.sql similarity index 71% rename from data/sql/updates/pending_db_world/rev_1671665943141414400.sql rename to data/sql/updates/db_world/2022_12_30_04.sql index 3369a5d40..35103be99 100644 --- a/data/sql/updates/pending_db_world/rev_1671665943141414400.sql +++ b/data/sql/updates/db_world/2022_12_30_04.sql @@ -1,3 +1,4 @@ +-- DB update 2022_12_30_03 -> 2022_12_30_04 -- DELETE FROM `npc_text` WHERE `ID` = 10884; DELETE FROM `gossip_menu` WHERE `MenuID`=8441 AND `TextID`=10884; diff --git a/data/sql/updates/pending_db_world/update.sql b/data/sql/updates/db_world/2022_12_30_05.sql similarity index 66% rename from data/sql/updates/pending_db_world/update.sql rename to data/sql/updates/db_world/2022_12_30_05.sql index 964abe38e..653907929 100644 --- a/data/sql/updates/pending_db_world/update.sql +++ b/data/sql/updates/db_world/2022_12_30_05.sql @@ -1,3 +1,4 @@ +-- DB update 2022_12_30_04 -> 2022_12_30_05 -- UPDATE `creature_template` SET `flags_extra`=`flags_extra`|130 WHERE `entry`=31874; From ae80d310dd3c4297dc27bfcee8a5953e9c18d04c Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Fri, 30 Dec 2022 22:58:45 +0100 Subject: [PATCH 11/66] fix(DB/Loot): Fixed Koralon the Flame Watcher loot for alliance players. (#14109) * fix(DB/Loot): Fixed Koralon the Flame Watcher loot for alliance players. Fixes #14019 * Update. --- .../rev_1670670001173273000.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1670670001173273000.sql diff --git a/data/sql/updates/pending_db_world/rev_1670670001173273000.sql b/data/sql/updates/pending_db_world/rev_1670670001173273000.sql new file mode 100644 index 000000000..da19c4e04 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1670670001173273000.sql @@ -0,0 +1,18 @@ +-- +UPDATE `creature_loot_template` SET `GroupId`=1, `MinCount`=1, `MaxCount`=2 WHERE `entry`=35360 AND `Item`=1; +DELETE FROM `creature_loot_template` WHERE `entry`=35360 AND `item` IN (3,4); +INSERT INTO `creature_loot_template` VALUES +(35360,3,34205,100,0,1,2,1,2,'Koralon the Flame Watcher (1) - (ReferenceTable)'), +(35360,4,34205,100,0,1,3,1,2,'Koralon the Flame Watcher (1) - (ReferenceTable)'); + +UPDATE `reference_loot_template` SET `GroupId`=3 WHERE `entry`=34205 AND `item` IN (48658,48625,47770,47772,48623,48593,47803,47805,48591,48556,48064,48066, +48554,48499,48094,48096,48497,48464,48150,48152,48462,48394,48180,48182,48193,48195,48392,48364,48362,48334,48239,48241,48332,48303,48271,48273,48301,48660); + +UPDATE `creature_loot_template` SET `GroupId`=1, `MinCount`=1, `MaxCount`=1 WHERE `entry`=35013 AND `Item`=1; +DELETE FROM `creature_loot_template` WHERE `entry`=35013 AND `item` IN (2,3); +INSERT INTO `creature_loot_template` VALUES +(35013,2,34204,100,0,1,2,1,1,'Koralon the Flame Watcher - (ReferenceTable)'), +(35013,3,34204,100,0,1,3,1,1,'Koralon the Flame Watcher - (ReferenceTable)'); + +UPDATE `reference_loot_template` SET `GroupId`=3 WHERE `entry`=34204 AND `item` IN (48653,48630,47773,47775,48628,48598,47800,47802,48596,48561,48067,48069, +48559,48504,48097,48099,48502,48459,48153,48155,48457,48389,48183,48185,48190,48192,48387,48369,48367,48339,48244,48246,48337,48298,48276,48278,48296,48655); From dfd43d02153522914ed9037a59492730a4aa8d02 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 30 Dec 2022 22:00:52 +0000 Subject: [PATCH 12/66] chore(DB): import pending files Referenced commit(s): ae80d310dd3c4297dc27bfcee8a5953e9c18d04c --- .../rev_1670670001173273000.sql => db_world/2022_12_30_06.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1670670001173273000.sql => db_world/2022_12_30_06.sql} (96%) diff --git a/data/sql/updates/pending_db_world/rev_1670670001173273000.sql b/data/sql/updates/db_world/2022_12_30_06.sql similarity index 96% rename from data/sql/updates/pending_db_world/rev_1670670001173273000.sql rename to data/sql/updates/db_world/2022_12_30_06.sql index da19c4e04..23aeccf6f 100644 --- a/data/sql/updates/pending_db_world/rev_1670670001173273000.sql +++ b/data/sql/updates/db_world/2022_12_30_06.sql @@ -1,3 +1,4 @@ +-- DB update 2022_12_30_05 -> 2022_12_30_06 -- UPDATE `creature_loot_template` SET `GroupId`=1, `MinCount`=1, `MaxCount`=2 WHERE `entry`=35360 AND `Item`=1; DELETE FROM `creature_loot_template` WHERE `entry`=35360 AND `item` IN (3,4); From 304ac8fa839b68c684d954332768264bfdbfd7c3 Mon Sep 17 00:00:00 2001 From: neifion-00000000 <91289495+neifion-00000000@users.noreply.github.com> Date: Fri, 30 Dec 2022 16:07:05 -0600 Subject: [PATCH 13/66] fix(DB/loot): Deathknell unique drops rate improvements (#14088) * fix(DB/loot): Deathknell unique drops rate improvements ALL unique drops in Deathknell have been looked at. Improvements made based on a mix of available data and research. * Update rev_1670381120624981200.sql * Update data/sql/updates/pending_db_world/rev_1670381120624981200.sql Co-authored-by: Gultask <100873791+Gultask@users.noreply.github.com> Co-authored-by: Gultask <100873791+Gultask@users.noreply.github.com> --- .../updates/pending_db_world/rev_1670381120624981200.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1670381120624981200.sql diff --git a/data/sql/updates/pending_db_world/rev_1670381120624981200.sql b/data/sql/updates/pending_db_world/rev_1670381120624981200.sql new file mode 100644 index 000000000..b780bbfef --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1670381120624981200.sql @@ -0,0 +1,8 @@ +-- +-- Deathknell Zone Drops +UPDATE `creature_loot_template` SET `Chance`=80, `Comment`='Night Web Matriarch - Webbed Cloak' WHERE `Entry`=1688 AND `Item`=3261 AND `Reference`=0 AND `GroupId`=0; +UPDATE `creature_loot_template` SET `Chance`=1, `Comment`='Night Web Spider - Webbed Pants' WHERE `Entry`=1505 AND `Item`=3263 AND `Reference`=0 AND `GroupId`=0; +UPDATE `creature_loot_template` SET `Chance`=1.5 WHERE `Entry`=1917 AND `Item`=3293 AND `Reference`=0 AND `GroupId`=0; +UPDATE `creature_loot_template` SET `Chance`=0.9 WHERE `Entry`=1919 AND `Item`=3295 AND `Reference`=0 AND `GroupId`=0; +UPDATE `creature_loot_template` SET `Chance`=1.25 WHERE `Entry`=1506 AND `Item`=2754 AND `Reference`=0 AND `GroupId`=0; +UPDATE `creature_loot_template` SET `Chance`=1.25 WHERE `Entry`=1507 AND `Item`=3260 AND `Reference`=0 AND `GroupId`=0; From 3c317c1076d88e9b40375bddb840a231072a2a5f Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 30 Dec 2022 22:09:06 +0000 Subject: [PATCH 14/66] chore(DB): import pending files Referenced commit(s): 304ac8fa839b68c684d954332768264bfdbfd7c3 --- .../rev_1670381120624981200.sql => db_world/2022_12_30_07.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1670381120624981200.sql => db_world/2022_12_30_07.sql} (94%) diff --git a/data/sql/updates/pending_db_world/rev_1670381120624981200.sql b/data/sql/updates/db_world/2022_12_30_07.sql similarity index 94% rename from data/sql/updates/pending_db_world/rev_1670381120624981200.sql rename to data/sql/updates/db_world/2022_12_30_07.sql index b780bbfef..fb963a098 100644 --- a/data/sql/updates/pending_db_world/rev_1670381120624981200.sql +++ b/data/sql/updates/db_world/2022_12_30_07.sql @@ -1,3 +1,4 @@ +-- DB update 2022_12_30_06 -> 2022_12_30_07 -- -- Deathknell Zone Drops UPDATE `creature_loot_template` SET `Chance`=80, `Comment`='Night Web Matriarch - Webbed Cloak' WHERE `Entry`=1688 AND `Item`=3261 AND `Reference`=0 AND `GroupId`=0; From c9c61137054bab3d9a4408ba1dc3363048846215 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sat, 31 Dec 2022 12:36:39 -0300 Subject: [PATCH 15/66] fix(DB/creature): Hellfire Channelers shouldn't be pulled by distance (#14417) Create rev_1672337646756506500.sql --- data/sql/updates/pending_db_world/rev_1672337646756506500.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1672337646756506500.sql diff --git a/data/sql/updates/pending_db_world/rev_1672337646756506500.sql b/data/sql/updates/pending_db_world/rev_1672337646756506500.sql new file mode 100644 index 000000000..875597208 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672337646756506500.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `detection_range` = 0 WHERE (`entry` = 17256); From 5d84832cb37678c394242bf59832c3e76d2c7f47 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sat, 31 Dec 2022 12:37:00 -0300 Subject: [PATCH 16/66] fix(DB/creature): Auchenai Monk speed (#14416) Create rev_1672337356285395000.sql Co-Authored-By: neifion-00000000 <91289495+neifion-00000000@users.noreply.github.com> Co-authored-by: neifion-00000000 <91289495+neifion-00000000@users.noreply.github.com> --- data/sql/updates/pending_db_world/rev_1672337356285395000.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1672337356285395000.sql diff --git a/data/sql/updates/pending_db_world/rev_1672337356285395000.sql b/data/sql/updates/pending_db_world/rev_1672337356285395000.sql new file mode 100644 index 000000000..2dd4d2f3d --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672337356285395000.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `speed_walk` = 1.6, `speed_run` = 1.71429 WHERE (`entry` IN (18497, 20299)); From 43b42b1b9cd8e966c009a8a9e03fb9a589562412 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sat, 31 Dec 2022 12:37:17 -0300 Subject: [PATCH 17/66] fix(DB/creature): Port some Boulderfist Ogre spawns from Mangos (#14414) Create rev_1672323484155845500.sql --- .../rev_1672323484155845500.sql | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1672323484155845500.sql diff --git a/data/sql/updates/pending_db_world/rev_1672323484155845500.sql b/data/sql/updates/pending_db_world/rev_1672323484155845500.sql new file mode 100644 index 000000000..e9b3ed610 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672323484155845500.sql @@ -0,0 +1,115 @@ +-- +SET @CGUID := 106855; + +DELETE FROM `creature` WHERE `id1` IN (17136, 17137) AND `guid` BETWEEN @CGUID AND @CGUID+16; +INSERT INTO `creature` (`guid`, `id1`, `id2`, `map`, `ZoneId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `MovementType`) VALUES +(@CGUID+0 , 17136, 0, 530, 3518, 1, 1, 1, -974.234, 8135.97, -93.81, 4.29258, 300, 2, 0, 1), +(@CGUID+1 , 17137, 17136, 530, 3518, 1, 1, 0, -974.078, 8119.22, -94.8147, 2.59298, 300, 2, 0, 1), +(@CGUID+2 , 17137, 0, 530, 3518, 1, 1, 0, -2056.91, 7421.17, -102.47, 2.84402, 300, 2, 0, 1), +(@CGUID+3 , 17137, 0, 530, 3518, 1, 1, 0, -2018.49, 7403.44, -99.2611, 0.649453, 300, 2, 0, 1), +(@CGUID+4 , 17137, 17136, 530, 3518, 1, 1, 0, -2085.16, 7390.4, -102.58, 4.28967, 300, 2, 0, 1), +(@CGUID+5 , 17137, 0, 530, 3518, 1, 1, 0, -2059.47, 7441.14, -102.75, 3.82674, 300, 2, 0, 1), +(@CGUID+6 , 17137, 17136, 530, 3518, 1, 1, 0, -2045.9, 7495.22, -97.1416, 0.271099, 300, 2, 0, 1), +(@CGUID+7 , 17137, 0, 530, 3518, 1, 1, 0, -2040.04, 7543.13, -92.6899, 3.39641, 300, 0, 0, 2), +(@CGUID+8 , 17136, 0, 530, 3518, 1, 1, 1, -2011.03, 7460.33, -96.6701, 1.10335, 300, 2, 0, 1), +(@CGUID+9 , 17136, 0, 530, 3518, 1, 1, 1, -1183.69, 8056.32, -84.4118, 3.67504, 300, 10, 0, 1), +(@CGUID+10, 17136, 17137, 530, 3518, 1, 1, 0, -1260.41, 8031.68, -94.6711, 0.016614, 300, 0, 0, 2), +(@CGUID+11, 17137, 0, 530, 3518, 1, 1, 0, -1213.36, 8018.38, -92.0055, 0.016614, 300, 10, 0, 1), +(@CGUID+12, 17136, 17137, 530, 3518, 1, 1, 0, -1037.62, 8149.93, -89.8631, 2.50901, 300, 2, 0, 1), +(@CGUID+13, 17136, 17137, 530, 3518, 1, 1, 0, -976.023, 8127.27, -94.3549, 3.93982, 300, 0, 0, 2), +(@CGUID+14, 17137, 0, 530, 3518, 1, 1, 0, -985.144, 8106.61, -93.1579, 4.45378, 300, 2, 0, 1), +(@CGUID+15, 17137, 0, 530, 3518, 1, 1, 0, -1065.72, 8074.14, -92.045, 1.84403, 300, 2, 0, 1), +(@CGUID+16, 17137, 17136, 530, 3518, 1, 1, 0, -1053.72, 8145.69, -85.7171, 6.24828, 300, 2, 0, 1); + +DELETE FROM `creature_addon` WHERE (`guid` IN (@CGUID+7,@CGUID+10,@CGUID+13)); +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(@CGUID+7 , (@CGUID+7 )*10, 0, 0, 1, 0, 0, NULL), +(@CGUID+10, (@CGUID+10)*10, 0, 0, 1, 0, 0, NULL), +(@CGUID+13, (@CGUID+13)*10, 0, 0, 1, 0, 0, NULL); + +DELETE FROM `waypoint_data` WHERE `id` IN ((@CGUID+7 )*10,(@CGUID+10)*10,(@CGUID+13)*10); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`) VALUES +((@CGUID+7)*10, 1, -2053.4, 7516.41, -94.9784, NULL), +((@CGUID+7)*10, 2, -2035.25, 7542.94, -92.5134, NULL), +((@CGUID+7)*10, 3, -2053.4, 7516.41, -94.9784, NULL), +((@CGUID+7)*10, 4, -2044.9, 7492.29, -97.5175, NULL), +((@CGUID+7)*10, 5, -2027.51, 7484.81, -96.6091, NULL), +((@CGUID+7)*10, 6, -2010.77, 7482.36, -95.57, NULL), +((@CGUID+7)*10, 7, -2006.57, 7464.63, -97.3194, NULL), +((@CGUID+7)*10, 8, -2023.68, 7451.59, -97.9712, NULL), +((@CGUID+7)*10, 9, -2042.39, 7440.87, -99.7601, NULL), +((@CGUID+7)*10, 10, -2053.05, 7446.88, -101.793, NULL), +((@CGUID+7)*10, 11, -2063.38, 7441.16, -103.192, NULL), +((@CGUID+7)*10, 12, -2078.53, 7454.27, -101.297, NULL), +((@CGUID+7)*10, 13, -2063.38, 7441.16, -103.192, NULL), +((@CGUID+7)*10, 14, -2053.05, 7446.88, -101.793, NULL), +((@CGUID+7)*10, 15, -2042.39, 7440.87, -99.7601, NULL), +((@CGUID+7)*10, 16, -2023.68, 7451.59, -97.9712, NULL), +((@CGUID+7)*10, 17, -2006.57, 7464.63, -97.3194, NULL), +((@CGUID+7)*10, 18, -2010.77, 7482.36, -95.57, NULL), +((@CGUID+7)*10, 19, -2027.51, 7484.81, -96.6091, NULL), +((@CGUID+7)*10, 20, -2044.81, 7492.25, -97.5099, NULL), +((@CGUID+10)*10, 1, -1223.14, 8032.31, -94.0895, NULL), +((@CGUID+10)*10, 2, -1261.04, 8033.37, -94.8073, NULL), +((@CGUID+10)*10, 3, -1223.14, 8032.31, -94.0895, NULL), +((@CGUID+10)*10, 4, -1196.31, 8023.01, -93.1621, NULL), +((@CGUID+10)*10, 5, -1164.77, 8035.22, -88.9933, NULL), +((@CGUID+10)*10, 6, -1132.22, 8043.07, -83.1275, NULL), +((@CGUID+10)*10, 7, -1105.09, 8045.48, -83.741, NULL), +((@CGUID+10)*10, 8, -1095.76, 8062.18, -87.7675, NULL), +((@CGUID+10)*10, 9, -1090.44, 8080.19, -87.5407, NULL), +((@CGUID+10)*10, 10, -1102.06, 8100.92, -86.4522, NULL), +((@CGUID+10)*10, 11, -1099.04, 8115.66, -88.042, NULL), +((@CGUID+10)*10, 12, -1082.51, 8127.64, -85.1038, NULL), +((@CGUID+10)*10, 13, -1056.68, 8141.52, -85.8042, NULL), +((@CGUID+10)*10, 14, -1082.51, 8127.64, -85.1038, NULL), +((@CGUID+10)*10, 15, -1099.04, 8115.66, -88.042, NULL), +((@CGUID+10)*10, 16, -1102.06, 8100.92, -86.4522, NULL), +((@CGUID+10)*10, 17, -1090.44, 8080.19, -87.5407, NULL), +((@CGUID+10)*10, 18, -1095.76, 8062.18, -87.7675, NULL), +((@CGUID+10)*10, 19, -1105.03, 8045.6, -83.7405, NULL), +((@CGUID+10)*10, 20, -1132.29, 8042.71, -83.1981, NULL), +((@CGUID+10)*10, 21, -1164.77, 8035.22, -88.9933, NULL), +((@CGUID+10)*10, 22, -1196.31, 8023.01, -93.1621, NULL), +((@CGUID+13)*10, 1, -985.19, 8117.87, -95.3366, NULL), +((@CGUID+13)*10, 2, -1014.17, 8114.15, -94.2114, NULL), +((@CGUID+13)*10, 3, -1029.32, 8107.33, -92.9342, NULL), +((@CGUID+13)*10, 4, -1054.72, 8109.32, -89.3298, NULL), +((@CGUID+13)*10, 5, -1087.89, 8115.93, -88.1823, NULL), +((@CGUID+13)*10, 6, -1055.29, 8108.18, -89.3098, NULL), +((@CGUID+13)*10, 7, -1051.73, 8094.7, -92.1133, NULL), +((@CGUID+13)*10, 8, -1063.12, 8084.99, -91.6227, NULL), +((@CGUID+13)*10, 9, -1065.03, 8072.45, -91.927, NULL), +((@CGUID+13)*10, 10, -1079.59, 8071.37, -91.3225, NULL), +((@CGUID+13)*10, 11, -1082.86, 8086.32, -87.871, NULL), +((@CGUID+13)*10, 12, -1079.23, 8070.58, -91.3279, NULL), +((@CGUID+13)*10, 13, -1062.19, 8072.82, -92.0268, NULL), +((@CGUID+13)*10, 14, -1038.22, 8071.44, -92.23, NULL), +((@CGUID+13)*10, 15, -1038.75, 8090.18, -93.8027, NULL), +((@CGUID+13)*10, 16, -1026.98, 8105.88, -93.0572, NULL), +((@CGUID+13)*10, 17, -1014.28, 8114.67, -94.2634, NULL), +((@CGUID+13)*10, 18, -981.17, 8118.54, -95.2409, NULL), +((@CGUID+13)*10, 19, -978.033, 8113.03, -95.1399, NULL), +((@CGUID+13)*10, 20, -987.852, 8105.98, -93.5555, NULL), +((@CGUID+13)*10, 21, -971.812, 8106.55, -91.5738, NULL), +((@CGUID+13)*10, 22, -987.852, 8105.98, -93.5555, NULL), +((@CGUID+13)*10, 23, -978.068, 8112.96, -95.1362, NULL), +((@CGUID+13)*10, 24, -981.17, 8118.54, -95.2409, NULL), +((@CGUID+13)*10, 25, -1014.28, 8114.67, -94.2634, NULL), +((@CGUID+13)*10, 26, -1026.88, 8106.02, -93.0833, NULL), +((@CGUID+13)*10, 27, -1038.75, 8090.29, -93.7862, NULL), +((@CGUID+13)*10, 28, -1038.22, 8071.44, -92.23, NULL), +((@CGUID+13)*10, 29, -1062.19, 8072.82, -92.0268, NULL), +((@CGUID+13)*10, 30, -1079.23, 8070.58, -91.3279, NULL), +((@CGUID+13)*10, 31, -1082.86, 8086.32, -87.871, NULL), +((@CGUID+13)*10, 32, -1079.59, 8071.37, -91.3225, NULL), +((@CGUID+13)*10, 33, -1065.03, 8072.45, -91.927, NULL), +((@CGUID+13)*10, 34, -1063.12, 8084.99, -91.6227, NULL), +((@CGUID+13)*10, 35, -1051.73, 8094.7, -92.1133, NULL), +((@CGUID+13)*10, 36, -1055.03, 8108.12, -89.3764, NULL), +((@CGUID+13)*10, 37, -1087.89, 8115.93, -88.1823, NULL), +((@CGUID+13)*10, 38, -1054.72, 8109.32, -89.3298, NULL), +((@CGUID+13)*10, 39, -1029.32, 8107.33, -92.9342, NULL), +((@CGUID+13)*10, 40, -1014.17, 8114.15, -94.2114, NULL), +((@CGUID+13)*10, 41, -985.19, 8117.87, -95.3366, NULL), +((@CGUID+13)*10, 42, -976.729, 8127.52, -94.4946, NULL); From 089ce9eb41098ad1c705d229b7751326053c0a7d Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sat, 31 Dec 2022 15:39:29 +0000 Subject: [PATCH 18/66] chore(DB): import pending files Referenced commit(s): 43b42b1b9cd8e966c009a8a9e03fb9a589562412 --- .../rev_1672323484155845500.sql => db_world/2022_12_31_00.sql} | 1 + .../rev_1672337356285395000.sql => db_world/2022_12_31_01.sql} | 1 + .../rev_1672337646756506500.sql => db_world/2022_12_31_02.sql} | 1 + 3 files changed, 3 insertions(+) rename data/sql/updates/{pending_db_world/rev_1672323484155845500.sql => db_world/2022_12_31_00.sql} (99%) rename data/sql/updates/{pending_db_world/rev_1672337356285395000.sql => db_world/2022_12_31_01.sql} (71%) rename data/sql/updates/{pending_db_world/rev_1672337646756506500.sql => db_world/2022_12_31_02.sql} (64%) diff --git a/data/sql/updates/pending_db_world/rev_1672323484155845500.sql b/data/sql/updates/db_world/2022_12_31_00.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1672323484155845500.sql rename to data/sql/updates/db_world/2022_12_31_00.sql index e9b3ed610..70463e1b7 100644 --- a/data/sql/updates/pending_db_world/rev_1672323484155845500.sql +++ b/data/sql/updates/db_world/2022_12_31_00.sql @@ -1,3 +1,4 @@ +-- DB update 2022_12_30_07 -> 2022_12_31_00 -- SET @CGUID := 106855; diff --git a/data/sql/updates/pending_db_world/rev_1672337356285395000.sql b/data/sql/updates/db_world/2022_12_31_01.sql similarity index 71% rename from data/sql/updates/pending_db_world/rev_1672337356285395000.sql rename to data/sql/updates/db_world/2022_12_31_01.sql index 2dd4d2f3d..99e2389c9 100644 --- a/data/sql/updates/pending_db_world/rev_1672337356285395000.sql +++ b/data/sql/updates/db_world/2022_12_31_01.sql @@ -1,2 +1,3 @@ +-- DB update 2022_12_31_00 -> 2022_12_31_01 -- UPDATE `creature_template` SET `speed_walk` = 1.6, `speed_run` = 1.71429 WHERE (`entry` IN (18497, 20299)); diff --git a/data/sql/updates/pending_db_world/rev_1672337646756506500.sql b/data/sql/updates/db_world/2022_12_31_02.sql similarity index 64% rename from data/sql/updates/pending_db_world/rev_1672337646756506500.sql rename to data/sql/updates/db_world/2022_12_31_02.sql index 875597208..cca30c28c 100644 --- a/data/sql/updates/pending_db_world/rev_1672337646756506500.sql +++ b/data/sql/updates/db_world/2022_12_31_02.sql @@ -1,2 +1,3 @@ +-- DB update 2022_12_31_01 -> 2022_12_31_02 -- UPDATE `creature_template` SET `detection_range` = 0 WHERE (`entry` = 17256); From 4870b14b1f7dc90f08e35f17bc6199a994d61a98 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sat, 31 Dec 2022 17:39:23 +0100 Subject: [PATCH 19/66] refactor(Core/Object): getLevel() -> GetLevel() (#14122) * refactor(Core/Object): getLevel() -> GetLevel() * fix build and sneak some doxygen in * codeSTLE * codestyle --- src/common/Configuration/Config.cpp | 8 +- .../game/Achievements/AchievementMgr.cpp | 4 +- src/server/game/Battlefield/Battlefield.cpp | 2 +- src/server/game/Battlegrounds/ArenaTeam.cpp | 2 +- .../game/Battlegrounds/Battleground.cpp | 2 +- src/server/game/Battlegrounds/Battleground.h | 2 +- .../game/Battlegrounds/BattlegroundMgr.cpp | 6 +- src/server/game/Cache/WhoListCacheMgr.cpp | 2 +- src/server/game/Calendar/CalendarMgr.cpp | 4 +- src/server/game/Conditions/ConditionMgr.cpp | 2 +- src/server/game/DungeonFinding/LFGMgr.cpp | 7 +- .../game/Entities/Creature/Creature.cpp | 6 +- src/server/game/Entities/Creature/Creature.h | 2 +- .../game/Entities/Creature/GossipDef.cpp | 14 +- .../Entities/Creature/TemporarySummon.cpp | 6 +- .../game/Entities/GameObject/GameObject.cpp | 6 +- src/server/game/Entities/Object/Object.cpp | 2 +- src/server/game/Entities/Pet/Pet.cpp | 48 +++---- .../game/Entities/Player/KillRewarder.cpp | 12 +- src/server/game/Entities/Player/Player.cpp | 125 +++++++++--------- src/server/game/Entities/Player/Player.h | 4 +- .../game/Entities/Player/PlayerGossip.cpp | 4 +- .../game/Entities/Player/PlayerQuest.cpp | 22 +-- .../game/Entities/Player/PlayerStorage.cpp | 12 +- .../game/Entities/Player/PlayerUpdates.cpp | 4 +- src/server/game/Entities/Player/SocialMgr.cpp | 2 +- src/server/game/Entities/Totem/Totem.cpp | 2 +- src/server/game/Entities/Unit/StatSystem.cpp | 10 +- src/server/game/Entities/Unit/Unit.cpp | 36 ++--- src/server/game/Entities/Unit/Unit.h | 8 +- src/server/game/Globals/ObjectMgr.cpp | 3 +- src/server/game/Groups/Group.cpp | 6 +- src/server/game/Guilds/Guild.cpp | 6 +- src/server/game/Handlers/ArenaTeamHandler.cpp | 2 +- .../game/Handlers/AuctionHouseHandler.cpp | 2 +- .../game/Handlers/BattleGroundHandler.cpp | 12 +- src/server/game/Handlers/CharacterHandler.cpp | 4 +- src/server/game/Handlers/ChatHandler.cpp | 6 +- src/server/game/Handlers/GroupHandler.cpp | 6 +- src/server/game/Handlers/LFGHandler.cpp | 10 +- src/server/game/Handlers/MailHandler.cpp | 2 +- src/server/game/Handlers/PetitionsHandler.cpp | 6 +- .../game/Handlers/ReferAFriendHandler.cpp | 6 +- src/server/game/Handlers/SpellHandler.cpp | 2 +- src/server/game/Handlers/TicketHandler.cpp | 2 +- src/server/game/Handlers/TradeHandler.cpp | 4 +- src/server/game/Miscellaneous/Formulas.cpp | 2 +- src/server/game/Server/WorldSession.cpp | 2 +- .../game/Spells/Auras/SpellAuraEffects.cpp | 2 +- src/server/game/Spells/Auras/SpellAuras.cpp | 6 +- src/server/game/Spells/Spell.cpp | 18 +-- src/server/game/Spells/SpellEffects.cpp | 30 ++--- src/server/game/Spells/SpellInfo.cpp | 10 +- src/server/game/World/World.cpp | 2 +- src/server/scripts/Commands/cs_cache.cpp | 2 +- src/server/scripts/Commands/cs_character.cpp | 4 +- src/server/scripts/Commands/cs_misc.cpp | 2 +- src/server/scripts/Commands/cs_npc.cpp | 2 +- .../scripts/Commands/cs_player_settings.cpp | 2 +- src/server/scripts/Commands/cs_quest.cpp | 2 +- src/server/scripts/Commands/cs_reset.cpp | 2 +- .../instance_blackrock_spire.cpp | 4 +- .../EasternKingdoms/ZulAman/boss_hexlord.cpp | 7 +- .../scripts/Northrend/zone_howling_fjord.cpp | 2 +- .../scripts/Northrend/zone_wintergrasp.cpp | 4 +- .../scripts/OutdoorPvP/OutdoorPvPSI.cpp | 4 +- src/server/scripts/Pet/pet_dk.cpp | 4 +- src/server/scripts/Pet/pet_hunter.cpp | 4 +- src/server/scripts/Pet/pet_priest.cpp | 2 +- src/server/scripts/Spells/spell_dk.cpp | 6 +- src/server/scripts/Spells/spell_generic.cpp | 22 +-- src/server/scripts/Spells/spell_hunter.cpp | 2 +- src/server/scripts/Spells/spell_item.cpp | 20 +-- src/server/scripts/Spells/spell_paladin.cpp | 2 +- src/server/scripts/Spells/spell_priest.cpp | 2 +- src/server/scripts/World/item_scripts.cpp | 4 +- src/server/scripts/World/npc_professions.cpp | 16 +-- src/server/scripts/World/player_scripts.cpp | 2 +- 78 files changed, 326 insertions(+), 314 deletions(-) diff --git a/src/common/Configuration/Config.cpp b/src/common/Configuration/Config.cpp index cfdf523ac..29eb390f4 100644 --- a/src/common/Configuration/Config.cpp +++ b/src/common/Configuration/Config.cpp @@ -469,25 +469,25 @@ bool ConfigMgr::LoadModulesConfigs(bool isReload /*= false*/, bool isNeedPrintIn return true; } -// @deprecated DO NOT USE - use GetOption instead. +/// @deprecated DO NOT USE - use GetOption instead. std::string ConfigMgr::GetStringDefault(std::string const& name, const std::string& def, bool showLogs /*= true*/) { return GetOption(name, def, showLogs); } -// @deprecated DO NOT USE - use GetOption instead. +/// @deprecated DO NOT USE - use GetOption instead. bool ConfigMgr::GetBoolDefault(std::string const& name, bool def, bool showLogs /*= true*/) { return GetOption(name, def, showLogs); } -// @deprecated DO NOT USE - use GetOption instead. +/// @deprecated DO NOT USE - use GetOption instead. int ConfigMgr::GetIntDefault(std::string const& name, int def, bool showLogs /*= true*/) { return GetOption(name, def, showLogs); } -// @deprecated DO NOT USE - use GetOption instead. +/// @deprecated DO NOT USE - use GetOption instead. float ConfigMgr::GetFloatDefault(std::string const& name, float def, bool showLogs /*= true*/) { return GetOption(name, def, showLogs); diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index d2d9b0b5a..640002d1d 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -348,7 +348,7 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL: if (!target) return false; - return target->getLevel() >= level.minlevel; + return target->GetLevel() >= level.minlevel; case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER: if (!target) return false; @@ -986,7 +986,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui if (AchievementCriteriaDataSet const* data = sAchievementMgr->GetCriteriaDataSet(achievementCriteria)) if (!data->Meets(GetPlayer(), unit)) continue; - SetCriteriaProgress(achievementCriteria, GetPlayer()->getLevel()); + SetCriteriaProgress(achievementCriteria, GetPlayer()->GetLevel()); break; case ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL: // update at loading or specific skill update diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp index 83dc7ccc9..042e7bf08 100644 --- a/src/server/game/Battlefield/Battlefield.cpp +++ b/src/server/game/Battlefield/Battlefield.cpp @@ -284,7 +284,7 @@ void Battlefield::InvitePlayerToWar(Player* player) } // If the player does not match minimal level requirements for the battlefield, kick him - if (player->getLevel() < m_MinLevel) + if (player->GetLevel() < m_MinLevel) { if (m_PlayersWillBeKick[player->GetTeamId()].count(player->GetGUID()) == 0) m_PlayersWillBeKick[player->GetTeamId()][player->GetGUID()] = GameTime::GetGameTime().count() + 10; diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp index 7b67b68f8..15d0e9418 100644 --- a/src/server/game/Battlegrounds/ArenaTeam.cpp +++ b/src/server/game/Battlegrounds/ArenaTeam.cpp @@ -455,7 +455,7 @@ void ArenaTeam::Roster(WorldSession* session) sCharacterCache->GetCharacterNameByGuid(itr->Guid, tempName); data << tempName; // member name data << uint32((itr->Guid == GetCaptain() ? 0 : 1));// captain flag 0 captain 1 member - data << uint8((player ? player->getLevel() : 0)); // unknown, level? + data << uint8((player ? player->GetLevel() : 0)); // unknown, level? data << uint8(itr->Class); // class data << uint32(itr->WeekGames); // played this week data << uint32(itr->WeekWins); // wins this week diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index e38057f43..2ed25b07f 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -862,7 +862,7 @@ void Battleground::EndBattleground(PvPTeamId winnerTeamId) UpdatePlayerScore(player, SCORE_BONUS_HONOR, GetBonusHonorFromKill(winner_kills)); // Xinef: check player level and not bracket level if (CanAwardArenaPoints()) - if (player->getLevel() >= BG_AWARD_ARENA_POINTS_MIN_LEVEL) + if (player->GetLevel() >= BG_AWARD_ARENA_POINTS_MIN_LEVEL) player->ModifyArenaPoints(winner_arena); if (!player->GetRandomWinner()) diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index a6a10145c..b91332b3b 100644 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -454,7 +454,7 @@ public: void EndBattleground(PvPTeamId winnerTeamId); - // deprecated, need delete + /// @deprecated need delete virtual void EndBattleground(TeamId winnerTeamId) { EndBattleground(GetPvPTeamId(winnerTeamId)); diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index 7104fd72b..2fb065df7 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -575,8 +575,8 @@ void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, ObjectGuid uint32 winner_arena = player->GetRandomWinner() ? sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_ARENA_LAST) : sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_ARENA_FIRST); uint32 loser_kills = player->GetRandomWinner() ? sWorld->getIntConfig(CONFIG_BG_REWARD_LOSER_HONOR_LAST) : sWorld->getIntConfig(CONFIG_BG_REWARD_LOSER_HONOR_FIRST); - winner_kills = Acore::Honor::hk_honor_at_level(player->getLevel(), float(winner_kills)); - loser_kills = Acore::Honor::hk_honor_at_level(player->getLevel(), float(loser_kills)); + winner_kills = Acore::Honor::hk_honor_at_level(player->GetLevel(), float(winner_kills)); + loser_kills = Acore::Honor::hk_honor_at_level(player->GetLevel(), float(loser_kills)); data->Initialize(SMSG_BATTLEFIELD_LIST); *data << guid; // battlemaster guid @@ -614,7 +614,7 @@ void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, ObjectGuid if (it != bgDataStore.end()) { // expected bracket entry - if (PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(it->second._Battlegrounds.begin()->second->GetMapId(), player->getLevel())) + if (PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(it->second._Battlegrounds.begin()->second->GetMapId(), player->GetLevel())) { uint32 count = 0; BattlegroundBracketId bracketId = bracketEntry->GetBracketId(); diff --git a/src/server/game/Cache/WhoListCacheMgr.cpp b/src/server/game/Cache/WhoListCacheMgr.cpp index ec48a7e8e..8225627f6 100644 --- a/src/server/game/Cache/WhoListCacheMgr.cpp +++ b/src/server/game/Cache/WhoListCacheMgr.cpp @@ -53,7 +53,7 @@ void WhoListCacheMgr::Update() wstrToLower(wideGuildName); - _whoListStorage.emplace_back(player->GetGUID(), player->GetTeamId(), player->GetSession()->GetSecurity(), player->getLevel(), + _whoListStorage.emplace_back(player->GetGUID(), player->GetTeamId(), player->GetSession()->GetSecurity(), player->GetLevel(), player->getClass(), player->getRace(), (player->IsSpectator() ? 4395 /*Dalaran*/ : player->GetZoneId()), player->getGender(), player->IsVisible(), widePlayerName, wideGuildName, playerName, guildName); diff --git a/src/server/game/Calendar/CalendarMgr.cpp b/src/server/game/Calendar/CalendarMgr.cpp index 07cd8497e..b59515570 100644 --- a/src/server/game/Calendar/CalendarMgr.cpp +++ b/src/server/game/Calendar/CalendarMgr.cpp @@ -485,7 +485,7 @@ void CalendarMgr::SendCalendarEventInvite(CalendarInvite const& invite) ObjectGuid invitee = invite.GetInviteeGUID(); Player* player = ObjectAccessor::FindConnectedPlayer(invitee); - uint8 level = player ? player->getLevel() : sCharacterCache->GetCharacterLevelByGuid(invitee); + uint8 level = player ? player->GetLevel() : sCharacterCache->GetCharacterLevelByGuid(invitee); WorldPacket data(SMSG_CALENDAR_EVENT_INVITE, 8 + 8 + 8 + 1 + 1 + 1 + (statusTime ? 4 : 0) + 1); data << invitee.WriteAsPacked(); @@ -630,7 +630,7 @@ void CalendarMgr::SendCalendarEvent(ObjectGuid guid, CalendarEvent const& calend ObjectGuid inviteeGuid = calendarInvite->GetInviteeGUID(); Player* invitee = ObjectAccessor::FindConnectedPlayer(inviteeGuid); - uint8 inviteeLevel = invitee ? invitee->getLevel() : sCharacterCache->GetCharacterLevelByGuid(inviteeGuid); + uint8 inviteeLevel = invitee ? invitee->GetLevel() : sCharacterCache->GetCharacterLevelByGuid(inviteeGuid); uint32 inviteeGuildId = invitee ? invitee->GetGuildId() : sCharacterCache->GetCharacterGuildIdByGuid(inviteeGuid); data << inviteeGuid.WriteAsPacked(); diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index e246d2a30..079a36e27 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -268,7 +268,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) case CONDITION_LEVEL: { if (Unit* unit = object->ToUnit()) - condMeets = CompareValues(static_cast(ConditionValue2), static_cast(unit->getLevel()), ConditionValue1); + condMeets = CompareValues(static_cast(ConditionValue2), static_cast(unit->GetLevel()), ConditionValue1); break; } case CONDITION_DRUNKENSTATE: diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 2977570f7..5e9306abc 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -391,7 +391,8 @@ namespace lfg void LFGMgr::InitializeLockedDungeons(Player* player, Group const* group) { ObjectGuid guid = player->GetGUID(); - uint8 level = player->getLevel(); + + uint8 level = player->GetLevel(); uint8 expansion = player->GetSession()->Expansion(); LfgDungeonSet const& dungeons = GetDungeonsByRandom(0); LfgLockMap lock; @@ -1062,7 +1063,7 @@ namespace lfg maxPower = (p->getPowerType() == POWER_RAGE || p->getPowerType() == POWER_RUNIC_POWER) ? p->GetMaxPower(p->getPowerType()) / 10 : p->GetMaxPower(p->getPowerType()); currInternalInfoMap[sitr->first] = RBInternalInfo(guid, sitr->second.comment, !groupGuid.IsEmpty(), groupGuid, sitr->second.roles, encounterMask, instanceGuid, - 1, p->getLevel(), p->getClass(), p->getRace(), p->GetAverageItemLevel(), + 1, p->GetLevel(), p->getClass(), p->getRace(), p->GetAverageItemLevel(), talents, p->GetAreaId(), p->GetArmor(), (uint32)std::max(0, spellDamage), (uint32)std::max(0, spellHeal), p->GetUInt32Value(PLAYER_FIELD_COMBAT_RATING_1 + static_cast(CR_CRIT_MELEE)), p->GetUInt32Value(PLAYER_FIELD_COMBAT_RATING_1 + static_cast(CR_CRIT_RANGED)), p->GetUInt32Value(PLAYER_FIELD_COMBAT_RATING_1 + static_cast(CR_CRIT_SPELL)), std::max(0.0f, mp5), std::max(0.0f, mp5combat), std::max(baseAP, rangedAP), (uint32)p->GetStat(STAT_AGILITY), p->GetMaxHealth(), maxPower, p->GetDefenseSkillValue(), @@ -2266,7 +2267,7 @@ namespace lfg if (uint8 count = GetRandomPlayersCount(player->GetGUID())) player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_USE_LFD_TO_GROUP_WITH_PLAYERS, count); - LfgReward const* reward = GetRandomDungeonReward(rDungeonId, player->getLevel()); + LfgReward const* reward = GetRandomDungeonReward(rDungeonId, player->GetLevel()); if (!reward) continue; diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 70ccb628a..cf1663a8b 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -546,7 +546,7 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele } SetMeleeDamageSchool(SpellSchools(cInfo->dmgschool)); - CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(getLevel(), cInfo->unit_class); + CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(GetLevel(), cInfo->unit_class); float armor = (float)stats->GenerateArmor(cInfo); // TODO: Why is this treated as uint32 when it's a float? SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, armor); SetModifierValue(UNIT_MOD_RESISTANCE_HOLY, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_HOLY])); @@ -1213,7 +1213,7 @@ bool Creature::isCanInteractWithBattleMaster(Player* player, bool msg) const bool Creature::isCanTrainingAndResetTalentsOf(Player* player) const { - return player->getLevel() >= 10 + return player->GetLevel() >= 10 && GetCreatureTemplate()->trainer_type == TRAINER_TYPE_CLASS && player->getClass() == GetCreatureTemplate()->trainer_class; } @@ -2898,7 +2898,7 @@ uint8 Creature::getLevelForTarget(WorldObject const* target) const if (!isWorldBoss() || !target->ToUnit()) return Unit::getLevelForTarget(target); - uint16 level = target->ToUnit()->getLevel() + sWorld->getIntConfig(CONFIG_WORLD_BOSS_LEVEL_DIFF); + uint16 level = target->ToUnit()->GetLevel() + sWorld->getIntConfig(CONFIG_WORLD_BOSS_LEVEL_DIFF); if (level < 1) return 1; if (level > 255) diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index d56dd88e4..3303002ac 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -152,7 +152,7 @@ public: [[nodiscard]] uint32 GetShieldBlockValue() const override { - return (getLevel() / 2 + uint32(GetStat(STAT_STRENGTH) / 20)); + return (GetLevel() / 2 + uint32(GetStat(STAT_STRENGTH) / 20)); } [[nodiscard]] SpellSchoolMask GetMeleeDamageSchoolMask(WeaponAttackType /*attackType*/ = BASE_ATTACK, uint8 /*damageIndex*/ = 0) const override { return m_meleeDamageSchoolMask; } diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp index 4ac35d9af..102cd4d50 100644 --- a/src/server/game/Entities/Creature/GossipDef.cpp +++ b/src/server/game/Entities/Creature/GossipDef.cpp @@ -452,12 +452,12 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const* quest, ObjectGuid npcGU uint32 moneyRew = 0; Player* player = _session->GetPlayer(); - uint8 playerLevel = player ? player->getLevel() : 0; + uint8 playerLevel = player ? player->GetLevel() : 0; if (player && (player->getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) || sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(player))) { moneyRew = quest->GetRewMoneyMaxLevel(); } - moneyRew += quest->GetRewOrReqMoney(player ? player->getLevel() : 0); // reward money (below max lvl) + moneyRew += quest->GetRewOrReqMoney(player ? player->GetLevel() : 0); // reward money (below max lvl) data << moneyRew; uint32 questXp; if (player && !sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(player)) @@ -553,11 +553,11 @@ void PlayerMenu::SendQuestQueryResponse(Quest const* quest) const { uint32 moneyRew = 0; Player* player = _session->GetPlayer(); - if (player && (player->getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) || sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(player))) + if (player && (player->GetLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) || sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(player))) { moneyRew = quest->GetRewMoneyMaxLevel(); } - moneyRew += quest->GetRewOrReqMoney(player ? player->getLevel() : 0); // reward money (below max lvl) + moneyRew += quest->GetRewOrReqMoney(player ? player->GetLevel() : 0); // reward money (below max lvl) data << moneyRew; } @@ -705,12 +705,12 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* quest, ObjectGuid npcGUI uint32 moneyRew = 0; Player* player = _session->GetPlayer(); - uint8 playerLevel = player ? player->getLevel() : 0; - if (player && (player->getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) || sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(player))) + uint8 playerLevel = player ? player->GetLevel() : 0; + if (player && (player->GetLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) || sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(player))) { moneyRew = quest->GetRewMoneyMaxLevel(); } - moneyRew += quest->GetRewOrReqMoney(player ? player->getLevel() : 0); // reward money (below max lvl) + moneyRew += quest->GetRewOrReqMoney(player ? player->GetLevel() : 0); // reward money (below max lvl) data << moneyRew; uint32 questXp; if (player && !sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(player)) diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp index a76ea477f..a741d9638 100644 --- a/src/server/game/Entities/Creature/TemporarySummon.cpp +++ b/src/server/game/Entities/Creature/TemporarySummon.cpp @@ -216,7 +216,7 @@ void TempSummon::InitStats(uint32 duration) if (IsTrigger() && m_spells[0]) { SetFaction(owner->GetFaction()); - SetLevel(owner->getLevel()); + SetLevel(owner->GetLevel()); if (owner->GetTypeId() == TYPEID_PLAYER) m_ControlledByPlayer = true; } @@ -412,7 +412,7 @@ void Guardian::InitStats(uint32 duration) if (Unit* m_owner = GetOwner()) { - InitStatsForLevel(m_owner->getLevel()); + InitStatsForLevel(m_owner->GetLevel()); if (m_owner->GetTypeId() == TYPEID_PLAYER && HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN)) m_charmInfo->InitCharmCreateSpells(); @@ -450,7 +450,7 @@ Puppet::Puppet(SummonPropertiesEntry const* properties, ObjectGuid owner) : Mini void Puppet::InitStats(uint32 duration) { Minion::InitStats(duration); - SetLevel(GetOwner()->getLevel()); + SetLevel(GetOwner()->GetLevel()); SetReactState(REACT_PASSIVE); } diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index e801d7a2f..2b81574fc 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -1916,10 +1916,10 @@ void GameObject::Use(Unit* user) return; //required lvl checks! - uint8 level = player->getLevel(); + uint8 level = player->GetLevel(); if (level < info->meetingstone.minLevel) return; - level = targetPlayer->getLevel(); + level = targetPlayer->GetLevel(); if (level < info->meetingstone.minLevel) return; @@ -2107,7 +2107,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId) if (Unit* owner = GetOwner()) { - trigger->SetLevel(owner->getLevel(), false); + trigger->SetLevel(owner->GetLevel(), false); trigger->SetFaction(owner->GetFaction()); // needed for GO casts for proper target validation checks trigger->SetOwnerGUID(owner->GetGUID()); diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index d44f10f2d..8c8511c5a 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -2361,7 +2361,7 @@ Creature* WorldObject::SummonTrigger(float x, float y, float z, float ang, uint3 if (setLevel && (GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT)) { summon->SetFaction(((Unit*)this)->GetFaction()); - summon->SetLevel(((Unit*)this)->getLevel()); + summon->SetLevel(((Unit*)this)->GetLevel()); } // Xinef: correctly set phase mask in case of gameobjects diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 3eaba9600..f8107478f 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -296,7 +296,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c switch (getPetType()) { case SUMMON_PET: - petlevel = owner->getLevel(); + petlevel = owner->GetLevel(); if (IsPetGhoul()) SetUInt32Value(UNIT_FIELD_BYTES_0, 0x400); // class = rogue @@ -565,7 +565,7 @@ void Pet::SavePetToDB(PetSaveMode mode) stmt->SetData(3, GetNativeDisplayId()); stmt->SetData(4, GetUInt32Value(UNIT_CREATED_BY_SPELL)); stmt->SetData(5, uint8(getPetType())); - stmt->SetData(6, getLevel()); + stmt->SetData(6, GetLevel()); stmt->SetData(7, GetUInt32Value(UNIT_FIELD_PETEXPERIENCE)); stmt->SetData(8, uint8(GetReactState())); stmt->SetData(9, GetName()); @@ -887,8 +887,8 @@ void Pet::GivePetXP(uint32 xp) if (!IsAlive()) return; - uint8 maxlevel = std::min((uint8)sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL), GetOwner()->getLevel()); - uint8 petlevel = getLevel(); + uint8 maxlevel = std::min((uint8)sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL), GetOwner()->GetLevel()); + uint8 petlevel = GetLevel(); // If pet is detected to be at, or above(?) the players level, don't hand out XP if (petlevel >= maxlevel) @@ -915,7 +915,7 @@ void Pet::GivePetXP(uint32 xp) void Pet::GivePetLevel(uint8 level) { - if (!level || level == getLevel()) + if (!level || level == GetLevel()) return; if (getPetType() == HUNTER_PET) @@ -992,7 +992,7 @@ bool Pet::CreateBaseAtTamed(CreatureTemplate const* cinfo, Map* map, uint32 phas setPowerType(POWER_FOCUS); SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, 0); SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0); - SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, uint32(sObjectMgr->GetXPForLevel(getLevel() + 1)* sWorld->getRate(RATE_XP_PET_NEXT_LEVEL))); + SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, uint32(sObjectMgr->GetXPForLevel(GetLevel() + 1)* sWorld->getRate(RATE_XP_PET_NEXT_LEVEL))); ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE); if (cinfo->type == CREATURE_TYPE_BEAST) @@ -1078,12 +1078,12 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) if (cFamily && cFamily->minScale > 0.0f && petType == HUNTER_PET) { float scale; - if (getLevel() >= cFamily->maxScaleLevel) + if (GetLevel() >= cFamily->maxScaleLevel) scale = 1.0f; - else if (getLevel() <= cFamily->minScaleLevel) + else if (GetLevel() <= cFamily->minScaleLevel) scale = 0.5f; else - scale = 0.5f + 0.5f * float(getLevel() - cFamily->minScaleLevel) / float(cFamily->maxScaleLevel - cFamily->minScaleLevel); + scale = 0.5f + 0.5f * float(GetLevel() - cFamily->minScaleLevel) / float(cFamily->maxScaleLevel - cFamily->minScaleLevel); SetObjectScale(scale); } @@ -1421,13 +1421,13 @@ bool Pet::HaveInDiet(ItemTemplate const* item) const uint32 Pet::GetCurrentFoodBenefitLevel(uint32 itemlevel) const { // -5 or greater food level - if (getLevel() <= itemlevel + 5) //possible to feed level 60 pet with level 55 level food for full effect + if (GetLevel() <= itemlevel + 5) //possible to feed level 60 pet with level 55 level food for full effect return 35000; // -10..-6 - else if (getLevel() <= itemlevel + 10) //pure guess, but sounds good + else if (GetLevel() <= itemlevel + 10) //pure guess, but sounds good return 17000; // -14..-11 - else if (getLevel() <= itemlevel + 14) //level 55 food gets green on 70, makes sense to me + else if (GetLevel() <= itemlevel + 14) //level 55 food gets green on 70, makes sense to me return 8000; // -15 or less else @@ -1611,7 +1611,7 @@ void Pet::_LoadAuras(PreparedQueryResult result, uint32 timediff) } // avoid higher level auras if any, and adjust - SpellInfo const* scaledSpellInfo = spellInfo->GetAuraRankForLevel(getLevel()); + SpellInfo const* scaledSpellInfo = spellInfo->GetAuraRankForLevel(GetLevel()); if (scaledSpellInfo != spellInfo) spellInfo = scaledSpellInfo; @@ -1864,7 +1864,7 @@ bool Pet::addSpell(uint32 spellId, ActiveStates active /*= ACT_DECIDE*/, PetSpel uint32 talentCost = GetTalentSpellCost(spellId); if (talentCost) { - int32 free_points = GetMaxTalentPointsForLevel(getLevel()); + int32 free_points = GetMaxTalentPointsForLevel(GetLevel()); m_usedTalentCount += talentCost; // update free talent points free_points -= m_usedTalentCount; @@ -1892,7 +1892,7 @@ bool Pet::learnSpell(uint32 spell_id) void Pet::InitLevelupSpellsForLevel() { - uint8 level = getLevel(); + uint8 level = GetLevel(); if (PetLevelupSpellSet const* levelupSpells = GetCreatureTemplate()->family ? sSpellMgr->GetPetLevelupSpellList(GetCreatureTemplate()->family) : nullptr) { @@ -1970,7 +1970,7 @@ bool Pet::removeSpell(uint32 spell_id, bool learn_prev, bool clear_ab) else m_usedTalentCount = 0; // update free talent points - int32 free_points = GetMaxTalentPointsForLevel(getLevel()) - m_usedTalentCount; + int32 free_points = GetMaxTalentPointsForLevel(GetLevel()) - m_usedTalentCount; SetFreeTalentPoints(free_points > 0 ? free_points : 0); } @@ -2044,7 +2044,7 @@ bool Pet::resetTalents() Player* player = owner->ToPlayer(); - uint8 level = getLevel(); + uint8 level = GetLevel(); uint32 talentPointsForLevel = GetMaxTalentPointsForLevel(level); if (m_usedTalentCount == 0) @@ -2166,7 +2166,7 @@ void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* onlinePet /*= nullptr*/) void Pet::InitTalentForLevel() { - uint8 level = getLevel(); + uint8 level = GetLevel(); uint32 talentPointsForLevel = GetMaxTalentPointsForLevel(level); Unit* owner = GetOwner(); @@ -2349,14 +2349,14 @@ void Pet::SynchronizeLevelWithOwner() { // always same level case SUMMON_PET: - GivePetLevel(owner->getLevel()); + GivePetLevel(owner->GetLevel()); break; // can't be greater owner level case HUNTER_PET: - if (getLevel() > owner->getLevel()) - GivePetLevel(owner->getLevel()); - else if (getLevel() + 5 < owner->getLevel()) - GivePetLevel(owner->getLevel() - 5); + if (GetLevel() > owner->GetLevel()) + GivePetLevel(owner->GetLevel()); + else if (GetLevel() + 5 < owner->GetLevel()) + GivePetLevel(owner->GetLevel() - 5); break; default: break; @@ -2421,7 +2421,7 @@ void Pet::FillPetInfo(PetStable::PetInfo* petInfo) const petInfo->PetNumber = m_charmInfo->GetPetNumber(); petInfo->CreatureId = GetEntry(); petInfo->DisplayId = GetNativeDisplayId(); - petInfo->Level = getLevel(); + petInfo->Level = GetLevel(); petInfo->Experience = GetUInt32Value(UNIT_FIELD_PETEXPERIENCE); petInfo->ReactState = GetReactState(); petInfo->Name = GetName(); diff --git a/src/server/game/Entities/Player/KillRewarder.cpp b/src/server/game/Entities/Player/KillRewarder.cpp index c3b26ee89..7ea1c821d 100644 --- a/src/server/game/Entities/Player/KillRewarder.cpp +++ b/src/server/game/Entities/Player/KillRewarder.cpp @@ -87,7 +87,7 @@ void KillRewarder::_InitGroupData() if (Player* member = itr->GetSource()) if ((_killer == member || member->IsAtGroupRewardDistance(_victim))) { - const uint8 lvl = member->getLevel(); + const uint8 lvl = member->GetLevel(); if (member->IsAlive()) { // 2.1. _count - number of alive group members within reward distance; @@ -102,7 +102,7 @@ void KillRewarder::_InitGroupData() // 2.4. _maxNotGrayMember - maximum level of alive group member within reward distance, // for whom victim is not gray; uint32 grayLevel = Acore::XP::GetGrayLevel(lvl); - if (_victim->getLevel() > grayLevel && (!_maxNotGrayMember || _maxNotGrayMember->getLevel() < lvl)) + if (_victim->GetLevel() > grayLevel && (!_maxNotGrayMember || _maxNotGrayMember->GetLevel() < lvl)) { _maxNotGrayMember = member; } @@ -112,7 +112,7 @@ void KillRewarder::_InitGroupData() } // 2.6. _isFullXP - flag identifying that for all group members victim is not gray, // so 100% XP will be rewarded (50% otherwise). - _isFullXP = _maxNotGrayMember && (_maxLevel == _maxNotGrayMember->getLevel()); + _isFullXP = _maxNotGrayMember && (_maxLevel == _maxNotGrayMember->GetLevel()); } else _count = 1; @@ -151,7 +151,7 @@ void KillRewarder::_RewardXP(Player* player, float rate) // * set to 0 if player's level is more than maximum level of not gray member; // * cut XP in half if _isFullXP is false. if (_maxNotGrayMember && player->IsAlive() && - _maxNotGrayMember->getLevel() >= player->getLevel()) + _maxNotGrayMember->GetLevel() >= player->GetLevel()) xp = _isFullXP ? uint32(xp * rate) : // Reward FULL XP if all group members are not gray. uint32(xp * rate / 2) + 1; // Reward only HALF of XP if some of group members are gray. @@ -206,8 +206,8 @@ void KillRewarder::_RewardPlayer(Player* player, bool isDungeon) // Give reputation and kill credit only in PvE. if (!_isPvP || _isBattleGround) { - float xpRate = _group ? _groupRate * float(player->getLevel()) / _aliveSumLevel : /*Personal rate is 100%.*/ 1.0f; // Group rate depends on the sum of levels. - float reputationRate = _group ? _groupRate * float(player->getLevel()) / _sumLevel : /*Personal rate is 100%.*/ 1.0f; // Group rate depends on the sum of levels. + float xpRate = _group ? _groupRate * float(player->GetLevel()) / _aliveSumLevel : /*Personal rate is 100%.*/ 1.0f; // Group rate depends on the sum of levels. + float reputationRate = _group ? _groupRate * float(player->GetLevel()) / _sumLevel : /*Personal rate is 100%.*/ 1.0f; // Group rate depends on the sum of levels. sScriptMgr->OnRewardKillRewarder(player, isDungeon, xpRate); // Personal rate is 100%. if (_xp) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 005a5bcd6..263436076 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -854,7 +854,7 @@ void Player::HandleDrowning(uint32 time_diff) m_MirrorTimer[BREATH_TIMER] += 1 * IN_MILLISECONDS; // Calculate and deal damage // TODO: Check this formula - uint32 damage = GetMaxHealth() / 5 + urand(0, getLevel() - 1); + uint32 damage = GetMaxHealth() / 5 + urand(0, GetLevel() - 1); EnvironmentalDamage(DAMAGE_DROWNING, damage); } else if (!(m_MirrorTimerFlagsLast & UNDERWATER_INWATER)) // Update time in client if need @@ -890,7 +890,7 @@ void Player::HandleDrowning(uint32 time_diff) m_MirrorTimer[FATIGUE_TIMER] += 1 * IN_MILLISECONDS; if (IsAlive()) // Calculate and deal damage { - uint32 damage = GetMaxHealth() / 5 + urand(0, getLevel() - 1); + uint32 damage = GetMaxHealth() / 5 + urand(0, GetLevel() - 1); EnvironmentalDamage(DAMAGE_EXHAUSTED, damage); } else if (HasPlayerFlag(PLAYER_FLAGS_GHOST)) // Teleport ghost to graveyard @@ -1850,8 +1850,8 @@ void Player::Regenerate(Powers power) bool recentCast = IsUnderLastManaUseEffect(); float ManaIncreaseRate = sWorld->getRate(RATE_POWER_MANA); - if (sWorld->getBoolConfig(CONFIG_LOW_LEVEL_REGEN_BOOST) && getLevel() < 15) - ManaIncreaseRate = sWorld->getRate(RATE_POWER_MANA) * (2.066f - (getLevel() * 0.066f)); + if (sWorld->getBoolConfig(CONFIG_LOW_LEVEL_REGEN_BOOST) && GetLevel() < 15) + ManaIncreaseRate = sWorld->getRate(RATE_POWER_MANA) * (2.066f - (GetLevel() * 0.066f)); if (recentCast) // Trinity Updates Mana in intervals of 2s, which is correct addvalue += GetFloatValue(UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER) * ManaIncreaseRate * 0.001f * m_regenTimer; @@ -1960,8 +1960,8 @@ void Player::RegenerateHealth() float HealthIncreaseRate = sWorld->getRate(RATE_HEALTH); - if (sWorld->getBoolConfig(CONFIG_LOW_LEVEL_REGEN_BOOST) && getLevel() < 15) - HealthIncreaseRate = sWorld->getRate(RATE_HEALTH) * (2.066f - (getLevel() * 0.066f)); + if (sWorld->getBoolConfig(CONFIG_LOW_LEVEL_REGEN_BOOST) && GetLevel() < 15) + HealthIncreaseRate = sWorld->getRate(RATE_HEALTH) * (2.066f - (GetLevel() * 0.066f)); float addvalue = 0.0f; @@ -2354,7 +2354,7 @@ void Player::GiveXP(uint32 xp, Unit* victim, float group_rate, bool isLFGReward) return; } - uint8 level = getLevel(); + uint8 level = GetLevel(); sScriptMgr->OnGivePlayerXP(this, xp, victim); @@ -2400,7 +2400,7 @@ void Player::GiveXP(uint32 xp, Unit* victim, float group_rate, bool isLFGReward) if (level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) GiveLevel(level + 1); - level = getLevel(); + level = GetLevel(); nextLvlXP = GetUInt32Value(PLAYER_NEXT_LEVEL_XP); } @@ -2411,7 +2411,7 @@ void Player::GiveXP(uint32 xp, Unit* victim, float group_rate, bool isLFGReward) // Current player experience not update (must be update by caller) void Player::GiveLevel(uint8 level) { - uint8 oldLevel = getLevel(); + uint8 oldLevel = GetLevel(); if (level == oldLevel) return; @@ -2532,15 +2532,15 @@ void Player::InitStatsForLevel(bool reapplyMods) _RemoveAllStatBonuses(); PlayerClassLevelInfo classInfo; - sObjectMgr->GetPlayerClassLevelInfo(getClass(), getLevel(), &classInfo); + sObjectMgr->GetPlayerClassLevelInfo(getClass(), GetLevel(), &classInfo); PlayerLevelInfo info; - sObjectMgr->GetPlayerLevelInfo(getRace(true), getClass(), getLevel(), &info); + sObjectMgr->GetPlayerLevelInfo(getRace(true), getClass(), GetLevel(), &info); uint32 maxPlayerLevel = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); sScriptMgr->OnSetMaxLevel(this, maxPlayerLevel); SetUInt32Value(PLAYER_FIELD_MAX_LEVEL, maxPlayerLevel); - SetUInt32Value(PLAYER_NEXT_LEVEL_XP, sObjectMgr->GetXPForLevel(getLevel())); + SetUInt32Value(PLAYER_NEXT_LEVEL_XP, sObjectMgr->GetXPForLevel(GetLevel())); // reset before any aura state sources (health set/aura apply) SetUInt32Value(UNIT_FIELD_AURASTATE, 0); @@ -3853,7 +3853,7 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell return TRAINER_SPELL_RED; // check level requirement - if (getLevel() < trainer_spell->reqLevel) + if (GetLevel() < trainer_spell->reqLevel) return TRAINER_SPELL_RED; for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) @@ -4425,15 +4425,15 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness) //Characters level 20 and up suffer from ten minutes of sickness. int32 startLevel = sWorld->getIntConfig(CONFIG_DEATH_SICKNESS_LEVEL); - if (int32(getLevel()) >= startLevel) + if (int32(GetLevel()) >= startLevel) { // set resurrection sickness CastSpell(this, 15007, true); // not full duration - if (int32(getLevel()) < startLevel + 9) + if (int32(GetLevel()) < startLevel + 9) { - int32 delta = (int32(getLevel()) - startLevel + 1) * MINUTE; + int32 delta = (int32(GetLevel()) - startLevel + 1) * MINUTE; if (Aura* aur = GetAura(15007, GetGUID())) { @@ -4990,7 +4990,7 @@ uint32 Player::GetShieldBlockValue() const float Player::GetMeleeCritFromAgility() { - uint8 level = getLevel(); + uint8 level = GetLevel(); uint32 pclass = getClass(); if (level > GT_MAX_LEVEL) @@ -5038,7 +5038,7 @@ void Player::GetDodgeFromAgility(float& diminishing, float& nondiminishing) 2.00f / 1.15f // Druid }; - uint8 level = getLevel(); + uint8 level = GetLevel(); uint32 pclass = getClass(); if (level > GT_MAX_LEVEL) @@ -5060,7 +5060,7 @@ void Player::GetDodgeFromAgility(float& diminishing, float& nondiminishing) float Player::GetSpellCritFromIntellect() { - uint8 level = getLevel(); + uint8 level = GetLevel(); uint32 pclass = getClass(); if (level > GT_MAX_LEVEL) @@ -5077,7 +5077,7 @@ float Player::GetSpellCritFromIntellect() float Player::GetRatingMultiplier(CombatRating cr) const { - uint8 level = getLevel(); + uint8 level = GetLevel(); if (level > GT_MAX_LEVEL) level = GT_MAX_LEVEL; @@ -5112,7 +5112,7 @@ float Player::GetExpertiseDodgeOrParryReduction(WeaponAttackType attType) const float Player::OCTRegenHPPerSpirit() { - uint8 level = getLevel(); + uint8 level = GetLevel(); uint32 pclass = getClass(); if (level > GT_MAX_LEVEL) @@ -5135,7 +5135,7 @@ float Player::OCTRegenHPPerSpirit() float Player::OCTRegenMPPerSpirit() { - uint8 level = getLevel(); + uint8 level = GetLevel(); uint32 pclass = getClass(); if (level > GT_MAX_LEVEL) @@ -5687,17 +5687,17 @@ void Player::CheckAreaExploreAndOutdoor() if (areaEntry->area_level > 0) { - if (getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) + if (GetLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { SendExplorationExperience(areaId, 0); } else { - int32 diff = int32(getLevel()) - areaEntry->area_level; + int32 diff = int32(GetLevel()) - areaEntry->area_level; uint32 XP = 0; if (diff < -5) { - XP = uint32(sObjectMgr->GetBaseXP(getLevel() + 5) * sWorld->getRate(RATE_XP_EXPLORE)); + XP = uint32(sObjectMgr->GetBaseXP(GetLevel() + 5) * sWorld->getRate(RATE_XP_EXPLORE)); } else if (diff > 5) { @@ -5792,7 +5792,7 @@ float Player::CalculateReputationGain(ReputationSource source, uint32 creatureOr break; } - if (rate != 1.0f && creatureOrQuestLevel <= Acore::XP::GetGrayLevel(getLevel())) + if (rate != 1.0f && creatureOrQuestLevel <= Acore::XP::GetGrayLevel(GetLevel())) percent *= rate; if (percent <= 0.0f) @@ -5869,7 +5869,7 @@ void Player::RewardReputation(Unit* victim, float rate) if (Rep->RepFaction1 && (!Rep->TeamDependent || teamId == TEAM_ALLIANCE)) { - float donerep1 = CalculateReputationGain(REPUTATION_SOURCE_KILL, victim->getLevel(), static_cast(Rep->RepValue1), ChampioningFaction ? ChampioningFaction : Rep->RepFaction1); + float donerep1 = CalculateReputationGain(REPUTATION_SOURCE_KILL, victim->GetLevel(), static_cast(Rep->RepValue1), ChampioningFaction ? ChampioningFaction : Rep->RepFaction1); donerep1 *= rate; FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->RepFaction1); @@ -5881,7 +5881,7 @@ void Player::RewardReputation(Unit* victim, float rate) if (Rep->RepFaction2 && (!Rep->TeamDependent || teamId == TEAM_HORDE)) { - float donerep2 = CalculateReputationGain(REPUTATION_SOURCE_KILL, victim->getLevel(), static_cast(Rep->RepValue2), ChampioningFaction ? ChampioningFaction : Rep->RepFaction2); + float donerep2 = CalculateReputationGain(REPUTATION_SOURCE_KILL, victim->GetLevel(), static_cast(Rep->RepValue2), ChampioningFaction ? ChampioningFaction : Rep->RepFaction2); donerep2 *= rate; FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(ChampioningFaction ? ChampioningFaction : Rep->RepFaction2); @@ -6011,9 +6011,9 @@ bool Player::RewardHonor(Unit* uVictim, uint32 groupsize, int32 honor, bool awar if (GetTeamId() == victim->GetTeamId() && !sWorld->IsFFAPvPRealm()) return false; - uint8 k_level = getLevel(); + uint8 k_level = GetLevel(); uint8 k_grey = Acore::XP::GetGrayLevel(k_level); - uint8 v_level = victim->getLevel(); + uint8 v_level = victim->GetLevel(); if (v_level <= k_grey) return false; @@ -6103,7 +6103,7 @@ bool Player::RewardHonor(Unit* uVictim, uint32 groupsize, int32 honor, bool awar bg->UpdatePlayerScore(this, SCORE_BONUS_HONOR, honor, false); //false: prevent looping // Xinef: Only for BG activities if (!uVictim) - GiveXP(uint32(honor * (3 + getLevel() * 0.30f)), nullptr); + GiveXP(uint32(honor * (3 + GetLevel() * 0.30f)), nullptr); } if (sWorld->getBoolConfig(CONFIG_PVP_TOKEN_ENABLE)) @@ -6492,7 +6492,7 @@ void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply return; // req. check at equip, but allow use for extended range if range limit max level, set proper level - uint32 ssd_level = getLevel(); + uint32 ssd_level = GetLevel(); uint32 CustomScalingStatValue = 0; sScriptMgr->OnCustomScalingStatValueBefore(this, proto, slot, apply, CustomScalingStatValue); @@ -6684,7 +6684,7 @@ void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply case ITEM_MOD_BLOCK_VALUE: HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, float(val), apply); break; - // deprecated item mods + /// @deprecated item mods case ITEM_MOD_SPELL_HEALING_DONE: case ITEM_MOD_SPELL_DAMAGE_DONE: break; @@ -6790,7 +6790,7 @@ void Player::_ApplyWeaponDamage(uint8 slot, ItemTemplate const* proto, ScalingSt ScalingStatDistributionEntry const* ssd = proto->ScalingStatDistribution ? sScalingStatDistributionStore.LookupEntry(proto->ScalingStatDistribution) : nullptr; // req. check at equip, but allow use for extended range if range limit max level, set proper level - uint32 ssd_level = getLevel(); + uint32 ssd_level = GetLevel(); if (ssd && ssd_level > ssd->MaxLevel) ssd_level = ssd->MaxLevel; @@ -7632,7 +7632,7 @@ void Player::RemovedInsignia(Player* looterPlr) // We store the level of our player in the gold field // We retrieve this information at Player::SendLoot() - bones->loot.gold = getLevel(); + bones->loot.gold = GetLevel(); bones->lootRecipient = looterPlr; looterPlr->SendLoot(bones->GetGUID(), LOOT_INSIGNIA); } @@ -7883,8 +7883,8 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type) loot->FillLoot(lootid, LootTemplates_Pickpocketing, this, true); // Generate extra money for pick pocket loot - const uint32 a = urand(0, creature->getLevel() / 2); - const uint32 b = urand(0, getLevel() / 2); + const uint32 a = urand(0, creature->GetLevel() / 2); + const uint32 b = urand(0, GetLevel() / 2); loot->gold = uint32(10 * (a + b) * sWorld->getRate(RATE_DROP_MONEY)); permission = OWNER_PERMISSION; } @@ -8861,7 +8861,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy pet->setPowerType(POWER_MANA); pet->ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE); pet->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - pet->InitStatsForLevel(getLevel()); + pet->InitStatsForLevel(GetLevel()); SetMinion(pet, true); @@ -9110,7 +9110,7 @@ Pet* Player::CreatePet(Creature* creatureTarget, uint32 spellID /*= 0*/) creatureTarget->DespawnOrUnsummon(); // calculate proper level - uint8 level = (creatureTarget->getLevel() < (getLevel() - 5)) ? (getLevel() - 5) : getLevel(); + uint8 level = (creatureTarget->GetLevel() < (GetLevel() - 5)) ? (GetLevel() - 5) : GetLevel(); // prepare visual effect for levelup pet->SetUInt32Value(UNIT_FIELD_LEVEL, level - 1); @@ -9154,13 +9154,13 @@ Pet* Player::CreatePet(uint32 creatureEntry, uint32 spellID /*= 0*/) } // prepare visual effect for levelup - pet->SetUInt32Value(UNIT_FIELD_LEVEL, getLevel() - 1); + pet->SetUInt32Value(UNIT_FIELD_LEVEL, GetLevel() - 1); // add to world pet->GetMap()->AddToMap(pet->ToCreature()); // visual effect for levelup - pet->SetUInt32Value(UNIT_FIELD_LEVEL, getLevel()); + pet->SetUInt32Value(UNIT_FIELD_LEVEL, GetLevel()); // caster have pet now SetMinion(pet, true); @@ -9939,7 +9939,7 @@ void Player::LeaveAllArenaTeams(ObjectGuid guid) void Player::SetRestBonus(float rest_bonus_new) { // Prevent resting on max level - if (getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) + if (GetLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) rest_bonus_new = 0; if (rest_bonus_new < 0) @@ -11652,7 +11652,7 @@ void Player::LearnDefaultSkill(uint32 skillId, uint16 rank) } else if (getClass() == CLASS_DEATH_KNIGHT) { - skillValue = std::min(std::max({ 1, uint16((getLevel() - 1) * 5) }), maxValue); + skillValue = std::min(std::max({ 1, uint16((GetLevel() - 1) * 5) }), maxValue); } else if (skillId == SKILL_FIST_WEAPONS) { @@ -11685,7 +11685,7 @@ void Player::LearnDefaultSkill(uint32 skillId, uint16 rank) } else if (getClass() == CLASS_DEATH_KNIGHT) { - skillValue = std::min(std::max({ uint16(1), uint16((getLevel() - 1) * 5) }), maxValue); + skillValue = std::min(std::max({ uint16(1), uint16((GetLevel() - 1) * 5) }), maxValue); } SetSkill(skillId, rank, skillValue, maxValue); @@ -12081,7 +12081,7 @@ bool Player::GetBGAccessByLevel(BattlegroundTypeId bgTypeId) const return false; // limit check leel to dbc compatible level range - uint32 level = getLevel(); + uint32 level = GetLevel(); if (level > DEFAULT_MAX_LEVEL) level = DEFAULT_MAX_LEVEL; @@ -12418,8 +12418,8 @@ uint32 Player::GetResurrectionSpellId() // Used in triggers for check "Only to targets that grant experience or honor" req bool Player::isHonorOrXPTarget(Unit* victim) const { - uint8 v_level = victim->getLevel(); - uint8 k_grey = Acore::XP::GetGrayLevel(getLevel()); + uint8 v_level = victim->GetLevel(); + uint8 k_grey = Acore::XP::GetGrayLevel(GetLevel()); // Victim level less gray level if (v_level <= k_grey) @@ -12438,7 +12438,7 @@ bool Player::isHonorOrXPTarget(Unit* victim) const bool Player::GetsRecruitAFriendBonus(bool forXP) { bool recruitAFriend = false; - if (getLevel() <= sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL) || !forXP) + if (GetLevel() <= sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL) || !forXP) { if (Group* group = this->GetGroup()) { @@ -12454,12 +12454,12 @@ bool Player::GetsRecruitAFriendBonus(bool forXP) if (forXP) { // level must be allowed to get RaF bonus - if (player->getLevel() > sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL)) + if (player->GetLevel() > sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL)) continue; // level difference must be small enough to get RaF bonus, UNLESS we are lower level - if (player->getLevel() < getLevel()) - if (uint8(getLevel() - player->getLevel()) > sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL_DIFFERENCE)) + if (player->GetLevel() < GetLevel()) + if (uint8(GetLevel() - player->GetLevel()) > sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL_DIFFERENCE)) continue; } @@ -12978,8 +12978,11 @@ bool Player::CanUseBattlegroundObject(GameObject* gameobject) const return false; } - // BUG: sometimes when player clicks on flag in AB - client won't send gameobject_use, only gameobject_report_use packet - // Note: Mount, stealth and invisibility will be removed when used + /** + * @bug + * sometimes when player clicks on flag in AB - client won't send gameobject_use, only gameobject_report_use packet + * Note: Mount, stealth and invisibility will be removed when used + */ return (!isTotalImmune() && // Damage immune !HasAura(SPELL_RECENTLY_DROPPED_FLAG) && // Still has recently held flag debuff IsAlive()); // Alive @@ -12995,7 +12998,7 @@ bool Player::CanCaptureTowerPoint() const uint32 Player::GetBarberShopCost(uint8 newhairstyle, uint8 newhaircolor, uint8 newfacialhair, BarberShopStyleEntry const* newSkin) { - uint8 level = getLevel(); + uint8 level = GetLevel(); if (level > GT_MAX_LEVEL) level = GT_MAX_LEVEL; // max level in this dbc @@ -13037,7 +13040,7 @@ void Player::InitGlyphsForLevel() if (gs->Order) SetGlyphSlot(gs->Order - 1, gs->Id); - uint8 level = getLevel(); + uint8 level = GetLevel(); uint32 value = 0; // 0x3F = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 for 80 level @@ -13360,7 +13363,7 @@ LootItem* Player::StoreLootItem(uint8 lootSlot, Loot* loot, InventoryResult& msg uint32 Player::CalculateTalentsPoints() const { - uint32 base_talent = getLevel() < 10 ? 0 : getLevel() - 9; + uint32 base_talent = GetLevel() < 10 ? 0 : GetLevel() - 9; uint32 talentPointsForLevel = 0; if (getClass() != CLASS_DEATH_KNIGHT || GetMapId() != 609) @@ -13369,7 +13372,7 @@ uint32 Player::CalculateTalentsPoints() const } else { - talentPointsForLevel = getLevel() < 56 ? 0 : getLevel() - 55; + talentPointsForLevel = GetLevel() < 56 ? 0 : GetLevel() - 55; talentPointsForLevel += m_questRewardTalentCount; if (talentPointsForLevel > base_talent) @@ -14433,7 +14436,7 @@ void Player::_SaveCharacter(bool create, CharacterDatabaseTransaction trans) stmt->SetData(index++, getRace(true)); stmt->SetData(index++, getClass()); stmt->SetData(index++, GetByteValue(PLAYER_BYTES_3, 0)); // save gender from PLAYER_BYTES_3, UNIT_BYTES_0 changes with every transform effect - stmt->SetData(index++, getLevel()); + stmt->SetData(index++, GetLevel()); stmt->SetData(index++, GetUInt32Value(PLAYER_XP)); stmt->SetData(index++, GetMoney()); stmt->SetData(index++, GetByteValue(PLAYER_BYTES, 0)); @@ -14550,7 +14553,7 @@ void Player::_SaveCharacter(bool create, CharacterDatabaseTransaction trans) stmt->SetData(index++, getRace(true)); stmt->SetData(index++, getClass()); stmt->SetData(index++, GetByteValue(PLAYER_BYTES_3, 0)); // save gender from PLAYER_BYTES_3, UNIT_BYTES_0 changes with every transform effect - stmt->SetData(index++, getLevel()); + stmt->SetData(index++, GetLevel()); stmt->SetData(index++, GetUInt32Value(PLAYER_XP)); stmt->SetData(index++, GetMoney()); stmt->SetData(index++, GetByteValue(PLAYER_BYTES, 0)); @@ -15459,7 +15462,7 @@ float Player::GetAverageItemLevel() { float sum = 0; uint32 count = 0; - uint8 level = getLevel(); + uint8 level = GetLevel(); for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i) { @@ -15480,7 +15483,7 @@ float Player::GetAverageItemLevelForDF() { float sum = 0; uint32 count = 0; - uint8 level = getLevel(); + uint8 level = GetLevel(); for (int i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i) { diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 71aac67c1..e68e4b1c5 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1121,7 +1121,7 @@ public: PlayerSocial* GetSocial() { return m_social; } PlayerTaxi m_taxi; - void InitTaxiNodesForLevel() { m_taxi.InitTaxiNodesForLevel(getRace(), getClass(), getLevel()); } + void InitTaxiNodesForLevel() { m_taxi.InitTaxiNodesForLevel(getRace(), getClass(), GetLevel()); } bool ActivateTaxiPathTo(std::vector const& nodes, Creature* npc = nullptr, uint32 spellid = 1); bool ActivateTaxiPathTo(uint32 taxi_path_id, uint32 spellid = 1); void CleanupAfterTaxiFlight(); @@ -1388,7 +1388,7 @@ public: /*** QUEST SYSTEM ***/ /*********************************************************/ - int32 GetQuestLevel(Quest const* quest) const { return quest && (quest->GetQuestLevel() > 0) ? quest->GetQuestLevel() : getLevel(); } + int32 GetQuestLevel(Quest const* quest) const { return quest && (quest->GetQuestLevel() > 0) ? quest->GetQuestLevel() : GetLevel(); } void PrepareQuestMenu(ObjectGuid guid); void SendPreparedQuest(ObjectGuid guid); diff --git a/src/server/game/Entities/Player/PlayerGossip.cpp b/src/server/game/Entities/Player/PlayerGossip.cpp index ed1e45a1c..e6fcb518c 100644 --- a/src/server/game/Entities/Player/PlayerGossip.cpp +++ b/src/server/game/Entities/Player/PlayerGossip.cpp @@ -89,7 +89,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool } case GOSSIP_OPTION_LEARNDUALSPEC: case GOSSIP_OPTION_DUALSPEC_INFO: - if (!(GetSpecsCount() == 1 && creature->isCanTrainingAndResetTalentsOf(this) && !(getLevel() < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL)))) + if (!(GetSpecsCount() == 1 && creature->isCanTrainingAndResetTalentsOf(this) && !(GetLevel() < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL)))) canTalk = false; break; case GOSSIP_OPTION_UNLEARNTALENTS: @@ -332,7 +332,7 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men GetSession()->SendTrainerList(guid); break; case GOSSIP_OPTION_LEARNDUALSPEC: - if (GetSpecsCount() == 1 && getLevel() >= sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL)) + if (GetSpecsCount() == 1 && GetLevel() >= sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL)) { // Cast spells that teach dual spec // Both are also ImplicitTarget self and must be cast by player diff --git a/src/server/game/Entities/Player/PlayerQuest.cpp b/src/server/game/Entities/Player/PlayerQuest.cpp index 3b684cf8e..23affa3e6 100644 --- a/src/server/game/Entities/Player/PlayerQuest.cpp +++ b/src/server/game/Entities/Player/PlayerQuest.cpp @@ -241,7 +241,7 @@ bool Player::CanSeeStartQuest(Quest const* quest) SatisfyQuestPrevChain(quest, false) && SatisfyQuestDay(quest, false) && SatisfyQuestWeek(quest, false) && SatisfyQuestMonth(quest, false) && SatisfyQuestSeasonal(quest, false)) { - return getLevel() + sWorld->getIntConfig(CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF) >= quest->GetMinLevel(); + return GetLevel() + sWorld->getIntConfig(CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF) >= quest->GetMinLevel(); } return false; @@ -735,7 +735,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, bool rewarded = IsQuestRewarded(quest_id) && !quest->IsDFQuest(); // Not give XP in case already completed once repeatable quest - uint32 XP = rewarded ? 0 : uint32(quest->XPValue(getLevel()) * GetQuestRate(quest->IsDFQuest())); + uint32 XP = rewarded ? 0 : uint32(quest->XPValue(GetLevel()) * GetQuestRate(quest->IsDFQuest())); // handle SPELL_AURA_MOD_XP_QUEST_PCT auras Unit::AuraEffectList const& ModXPPctAuras = GetAuraEffectsByType(SPELL_AURA_MOD_XP_QUEST_PCT); @@ -744,7 +744,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, sScriptMgr->OnQuestComputeXP(this, quest, XP); int32 moneyRew = 0; - if (getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) || sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(this)) + if (GetLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) || sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(this)) { moneyRew = quest->GetRewMoneyMaxLevel(); } @@ -754,7 +754,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, } // Give player extra money if GetRewOrReqMoney > 0 and get ReqMoney if negative - if (int32 rewOrReqMoney = quest->GetRewOrReqMoney(getLevel())) + if (int32 rewOrReqMoney = quest->GetRewOrReqMoney(GetLevel())) { moneyRew += rewOrReqMoney; } @@ -768,7 +768,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, } // honor reward - if (uint32 honor = quest->CalculateHonorGain(getLevel())) + if (uint32 honor = quest->CalculateHonorGain(GetLevel())) RewardHonor(nullptr, 0, honor); // title reward @@ -957,13 +957,13 @@ bool Player::SatisfyQuestSkill(Quest const* qInfo, bool msg) const bool Player::SatisfyQuestLevel(Quest const* qInfo, bool msg) const { - if (getLevel() < qInfo->GetMinLevel()) + if (GetLevel() < qInfo->GetMinLevel()) { if (msg) SendCanTakeQuestResponse(INVALIDREASON_QUEST_FAILED_LOW_LEVEL); return false; } - else if (qInfo->GetMaxLevel() > 0 && getLevel() > qInfo->GetMaxLevel()) + else if (qInfo->GetMaxLevel() > 0 && GetLevel() > qInfo->GetMaxLevel()) { if (msg) SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ); // There doesn't seem to be a specific response for too high player level @@ -1656,7 +1656,7 @@ QuestGiverStatus Player::GetQuestDialogStatus(Object* questgiver) { if (SatisfyQuestLevel(quest, false)) { - bool isNotLowLevelQuest = getLevel() <= (GetQuestLevel(quest) + sWorld->getIntConfig(CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF)); + bool isNotLowLevelQuest = GetLevel() <= (GetQuestLevel(quest) + sWorld->getIntConfig(CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF)); if (quest->IsRepeatable()) { @@ -2339,15 +2339,15 @@ void Player::SendQuestReward(Quest const* quest, uint32 XP) WorldPacket data(SMSG_QUESTGIVER_QUEST_COMPLETE, (4 + 4 + 4 + 4 + 4)); data << uint32(questid); - if (getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) + if (GetLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { data << uint32(XP); - data << uint32(quest->GetRewOrReqMoney(getLevel())); + data << uint32(quest->GetRewOrReqMoney(GetLevel())); } else { data << uint32(0); - data << uint32(quest->GetRewOrReqMoney(getLevel()) + quest->GetRewMoneyMaxLevel()); + data << uint32(quest->GetRewOrReqMoney(GetLevel()) + quest->GetRewMoneyMaxLevel()); } data << uint32(10 * quest->CalculateHonorGain(GetQuestLevel(quest))); diff --git a/src/server/game/Entities/Player/PlayerStorage.cpp b/src/server/game/Entities/Player/PlayerStorage.cpp index a0f8dce5f..6371c56a7 100644 --- a/src/server/game/Entities/Player/PlayerStorage.cpp +++ b/src/server/game/Entities/Player/PlayerStorage.cpp @@ -1890,7 +1890,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16& dest, Item* pItem, bool ScalingStatDistributionEntry const* ssd = pProto->ScalingStatDistribution ? sScalingStatDistributionStore.LookupEntry(pProto->ScalingStatDistribution) : 0; // check allowed level (extend range to upper values if MaxLevel more or equal max player level, this let GM set high level with 1...max range items) - if (ssd && ssd->MaxLevel < DEFAULT_MAX_LEVEL && ssd->MaxLevel < getLevel()) + if (ssd && ssd->MaxLevel < DEFAULT_MAX_LEVEL && ssd->MaxLevel < GetLevel()) return EQUIP_ERR_ITEM_CANT_BE_EQUIPPED; uint8 eslot = FindEquipSlot(pProto, slot, swap); @@ -2342,7 +2342,7 @@ InventoryResult Player::CanUseItem(ItemTemplate const* proto) const return EQUIP_ERR_NO_REQUIRED_PROFICIENCY; } - if (getLevel() < proto->RequiredLevel) + if (GetLevel() < proto->RequiredLevel) { return EQUIP_ERR_CANT_EQUIP_LEVEL_I; } @@ -4348,7 +4348,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool if (!ignore_condition && pEnchant->EnchantmentCondition && !EnchantmentFitsRequirements(pEnchant->EnchantmentCondition, -1)) return; - if (pEnchant->requiredLevel > getLevel()) + if (pEnchant->requiredLevel > GetLevel()) return; if (pEnchant->requiredSkill > 0 && pEnchant->requiredSkillValue > GetSkillValue(pEnchant->requiredSkill)) @@ -6737,9 +6737,9 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map if (!sWorld->getBoolConfig(CONFIG_INSTANCE_IGNORE_LEVEL)) { - if (ar->levelMin && getLevel() < ar->levelMin) + if (ar->levelMin && GetLevel() < ar->levelMin) LevelMin = ar->levelMin; - if (ar->levelMax && getLevel() > ar->levelMax) + if (ar->levelMax && GetLevel() > ar->levelMax) LevelMax = ar->levelMax; } @@ -7758,7 +7758,7 @@ void Player::_SaveSpells(CharacterDatabaseTransaction trans) void Player::_SaveStats(CharacterDatabaseTransaction trans) { // check if stat saving is enabled and if char level is high enough - if (!sWorld->getIntConfig(CONFIG_MIN_LEVEL_STAT_SAVE) || getLevel() < sWorld->getIntConfig(CONFIG_MIN_LEVEL_STAT_SAVE)) + if (!sWorld->getIntConfig(CONFIG_MIN_LEVEL_STAT_SAVE) || GetLevel() < sWorld->getIntConfig(CONFIG_MIN_LEVEL_STAT_SAVE)) return; CharacterDatabasePreparedStatement* stmt = nullptr; diff --git a/src/server/game/Entities/Player/PlayerUpdates.cpp b/src/server/game/Entities/Player/PlayerUpdates.cpp index cefebfec9..c6661c13b 100644 --- a/src/server/game/Entities/Player/PlayerUpdates.cpp +++ b/src/server/game/Entities/Player/PlayerUpdates.cpp @@ -980,7 +980,7 @@ void Player::UpdateWeaponSkill(Unit* victim, WeaponAttackType attType, Item* ite void Player::UpdateCombatSkills(Unit* victim, WeaponAttackType attType, bool defence, Item* item /*= nullptr*/) { - uint8 playerLevel = getLevel(); + uint8 playerLevel = GetLevel(); uint16 currentSkillValue = defence ? GetBaseDefenseSkillValue() : GetBaseWeaponSkillValue(attType); uint16 currentSkillMax = 5 * playerLevel; int32 skillDiff = currentSkillMax - currentSkillValue; @@ -993,7 +993,7 @@ void Player::UpdateCombatSkills(Unit* victim, WeaponAttackType attType, bool def } uint8 greylevel = Acore::XP::GetGrayLevel(playerLevel); - uint8 moblevel = defence ? victim->getLevelForTarget(this) : victim->getLevel(); // if defense than victim == attacker + uint8 moblevel = defence ? victim->getLevelForTarget(this) : victim->GetLevel(); // if defense than victim == attacker /*if (moblevel < greylevel) return;*/ // Patch 3.0.8 (2009-01-20): You can no longer skill up weapons on mobs that are immune to damage. diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp index 24426730f..2893c99f7 100644 --- a/src/server/game/Entities/Player/SocialMgr.cpp +++ b/src/server/game/Entities/Player/SocialMgr.cpp @@ -242,7 +242,7 @@ void SocialMgr::GetFriendInfo(Player* player, ObjectGuid friendGUID, FriendInfo& if (pFriend->isDND()) friendInfo.Status = FRIEND_STATUS_DND; friendInfo.Area = pFriend->GetZoneId(); - friendInfo.Level = pFriend->getLevel(); + friendInfo.Level = pFriend->GetLevel(); friendInfo.Class = pFriend->getClass(); } } diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp index 76bac1473..ac495b02e 100644 --- a/src/server/game/Entities/Totem/Totem.cpp +++ b/src/server/game/Entities/Totem/Totem.cpp @@ -64,7 +64,7 @@ void Totem::InitStats(uint32 duration) SetDisplayId(owner->GetModelForTotem(PlayerTotemType(m_Properties->Id))); } - SetLevel(owner->getLevel()); + SetLevel(owner->GetLevel()); } Minion::InitStats(duration); diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index 18c07d9c8..e9eb7e0b1 100644 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -330,7 +330,7 @@ void Player::ApplyFeralAPBonus(int32 amount, bool apply) void Player::UpdateAttackPowerAndDamage(bool ranged) { float val2 = 0.0f; - float level = float(getLevel()); + float level = float(GetLevel()); sScriptMgr->OnBeforeUpdateAttackPowerAndDamage(this, level, val2, ranged); @@ -454,14 +454,14 @@ void Player::UpdateAttackPowerAndDamage(bool ranged) switch (GetShapeshiftForm()) { case FORM_CAT: - val2 = (getLevel() * mLevelMult) + GetStat(STAT_STRENGTH) * 2.0f + GetStat(STAT_AGILITY) - 20.0f + weapon_bonus + m_baseFeralAP; + val2 = (GetLevel() * mLevelMult) + GetStat(STAT_STRENGTH) * 2.0f + GetStat(STAT_AGILITY) - 20.0f + weapon_bonus + m_baseFeralAP; break; case FORM_BEAR: case FORM_DIREBEAR: - val2 = (getLevel() * mLevelMult) + GetStat(STAT_STRENGTH) * 2.0f - 20.0f + weapon_bonus + m_baseFeralAP; + val2 = (GetLevel() * mLevelMult) + GetStat(STAT_STRENGTH) * 2.0f - 20.0f + weapon_bonus + m_baseFeralAP; break; case FORM_MOONKIN: - val2 = (getLevel() * mLevelMult) + GetStat(STAT_STRENGTH) * 2.0f - 20.0f + m_baseFeralAP; + val2 = (GetLevel() * mLevelMult) + GetStat(STAT_STRENGTH) * 2.0f - 20.0f + m_baseFeralAP; break; default: val2 = GetStat(STAT_STRENGTH) * 2.0f - 20.0f; @@ -576,7 +576,7 @@ void Player::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bo if (IsInFeralForm()) // check if player is druid and in cat or bear forms { - uint8 lvl = getLevel(); + uint8 lvl = GetLevel(); if (lvl > 60) lvl = 60; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 3d33d2b32..59624677f 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1707,7 +1707,7 @@ void Unit::CalculateMeleeDamage(Unit* victim, CalcDamageInfo* damageInfo, Weapon damageInfo->HitInfo |= HITINFO_GLANCING; damageInfo->TargetState = VICTIMSTATE_HIT; damageInfo->procEx |= PROC_EX_NORMAL_HIT; - int32 leveldif = int32(victim->getLevel()) - int32(getLevel()); + int32 leveldif = int32(victim->GetLevel()) - int32(GetLevel()); if (leveldif > 3) leveldif = 3; float reducePercent = 1 - leveldif * 0.1f; @@ -1880,8 +1880,8 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss) float Probability = 20.0f; // there is a newbie protection, at level 10 just 7% base chance; assuming linear function - if (victim->getLevel() < 30) - Probability = 0.65f * victim->getLevel() + 0.5f; + if (victim->GetLevel() < 30) + Probability = 0.65f * victim->GetLevel() + 0.5f; uint32 VictimDefense = victim->GetDefenseSkillValue(); uint32 AttackerMeleeSkill = GetUnitMeleeSkill(); @@ -2036,10 +2036,10 @@ uint32 Unit::CalcArmorReducedDamage(Unit const* attacker, Unit const* victim, co } float maxArmorPen = 0; - if (victim->getLevel() < 60) - maxArmorPen = float(400 + 85 * victim->getLevel()); + if (victim->GetLevel() < 60) + maxArmorPen = float(400 + 85 * victim->GetLevel()); else - maxArmorPen = 400 + 85 * victim->getLevel() + 4.5f * 85 * (victim->getLevel() - 59); + maxArmorPen = 400 + 85 * victim->GetLevel() + 4.5f * 85 * (victim->GetLevel() - 59); // Cap armor penetration to this number maxArmorPen = std::min((armor + maxArmorPen) / 3, armor); @@ -2053,7 +2053,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit const* attacker, Unit const* victim, co if (armor < 0.0f) armor = 0.0f; - float levelModifier = attacker ? attacker->getLevel() : attackerLevel; + float levelModifier = attacker ? attacker->GetLevel() : attackerLevel; if (levelModifier > 59) levelModifier = levelModifier + (4.5f * (levelModifier - 59)); @@ -2087,11 +2087,11 @@ float Unit::GetEffectiveResistChance(Unit const* owner, SpellSchoolMask schoolMa victimResistance = std::max(victimResistance, 0.0f); if (owner) - victimResistance += std::max((float(victim->getLevel()) - float(owner->getLevel())) * 5.0f, 0.0f); + victimResistance += std::max((float(victim->GetLevel()) - float(owner->GetLevel())) * 5.0f, 0.0f); static uint32 const BOSS_LEVEL = 83; static float const BOSS_RESISTANCE_CONSTANT = 510.0f; - uint32 level = victim->getLevel(); + uint32 level = victim->GetLevel(); float resistanceConstant = 0.0f; if (level == BOSS_LEVEL) @@ -2872,7 +2872,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(Unit const* victim, WeaponAttackTy if (attType != RANGED_ATTACK && (GetTypeId() == TYPEID_PLAYER || IsPet()) && victim->GetTypeId() != TYPEID_PLAYER && !victim->IsPet() && - getLevel() < victim->getLevelForTarget(this)) + GetLevel() < victim->getLevelForTarget(this)) { // cap possible value (with bonuses > max skill) int32 skill = attackerWeaponSkill; @@ -3001,7 +3001,7 @@ float Unit::CalculateLevelPenalty(SpellInfo const* spellProto) const if (spellProto->SpellLevel < 20) LvlPenalty = (20.0f - spellProto->SpellLevel) * 3.75f; - float LvlFactor = (float(spellProto->SpellLevel) + 6.0f) / float(getLevel()); + float LvlFactor = (float(spellProto->SpellLevel) + 6.0f) / float(GetLevel()); if (LvlFactor > 1.0f) LvlFactor = 1.0f; @@ -3110,7 +3110,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spellInfo int32 attackerWeaponSkill; // skill value for these spells (for example judgements) is 5* level if (spellInfo->DmgClass == SPELL_DAMAGE_CLASS_RANGED && !spellInfo->IsRangedWeaponSpell()) - attackerWeaponSkill = getLevel() * 5; + attackerWeaponSkill = GetLevel() * 5; // bonus from skills is 0.04% per skill Diff else attackerWeaponSkill = int32(GetWeaponSkillValue(attType, victim)); @@ -11436,7 +11436,7 @@ float Unit::SpellPctDamageModsDone(Unit* victim, SpellInfo const* spellProto, Da if (victim->HasAuraState(AURA_STATE_FROZEN, spellProto, this)) { // Glyph of Ice Lance - if (owner->HasAura(56377) && victim->getLevel() > owner->getLevel()) + if (owner->HasAura(56377) && victim->GetLevel() > owner->GetLevel()) DoneTotalMod *= 4.0f; else DoneTotalMod *= 3.0f; @@ -17456,7 +17456,7 @@ Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget, uint32 spell_id) return nullptr; } - uint8 level = creatureTarget->getLevel() + 5 < getLevel() ? (getLevel() - 5) : creatureTarget->getLevel(); + uint8 level = creatureTarget->GetLevel() + 5 < GetLevel() ? (GetLevel() - 5) : creatureTarget->GetLevel(); if (!InitTamedPet(pet, level, spell_id)) { @@ -17478,7 +17478,7 @@ Pet* Unit::CreateTamedPetFrom(uint32 creatureEntry, uint32 spell_id) Pet* pet = new Pet(ToPlayer(), HUNTER_PET); - if (!pet->CreateBaseAtCreatureInfo(creatureInfo, this) || !InitTamedPet(pet, getLevel(), spell_id)) + if (!pet->CreateBaseAtCreatureInfo(creatureInfo, this) || !InitTamedPet(pet, GetLevel(), spell_id)) { delete pet; return nullptr; @@ -20208,11 +20208,11 @@ void Unit::RewardRage(uint32 damage, uint32 weaponSpeedHitFactor, bool attacker) { float addRage; - float rageconversion = ((0.0091107836f * getLevel() * getLevel()) + 3.225598133f * getLevel()) + 4.2652911f; + float rageconversion = ((0.0091107836f * GetLevel() * GetLevel()) + 3.225598133f * GetLevel()) + 4.2652911f; // Unknown if correct, but lineary adjust rage conversion above level 70 - if (getLevel() > 70) - rageconversion += 13.27f * (getLevel() - 70); + if (GetLevel() > 70) + rageconversion += 13.27f * (GetLevel() - 70); if (attacker) { diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 739bab585..4850d5323 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -1415,8 +1415,10 @@ public: [[nodiscard]] bool IsTotem() const { return m_unitTypeMask & UNIT_MASK_TOTEM; } [[nodiscard]] bool IsVehicle() const { return m_unitTypeMask & UNIT_MASK_VEHICLE; } + /// @deprecated Use GetLevel() instead! [[nodiscard]] uint8 getLevel() const { return uint8(GetUInt32Value(UNIT_FIELD_LEVEL)); } - uint8 getLevelForTarget(WorldObject const* /*target*/) const override { return getLevel(); } + [[nodiscard]] uint8 GetLevel() const { return getLevel(); } + uint8 getLevelForTarget(WorldObject const* /*target*/) const override { return GetLevel(); } void SetLevel(uint8 lvl, bool showLevelChange = true); [[nodiscard]] uint8 getRace(bool original = false) const; void setRace(uint8 race); @@ -1542,7 +1544,7 @@ public: void Mount(uint32 mount, uint32 vehicleId = 0, uint32 creatureEntry = 0); void Dismount(); - uint16 GetMaxSkillValueForLevel(Unit const* target = nullptr) const { return (target ? getLevelForTarget(target) : getLevel()) * 5; } + uint16 GetMaxSkillValueForLevel(Unit const* target = nullptr) const { return (target ? getLevelForTarget(target) : GetLevel()) * 5; } static void DealDamageMods(Unit const* victim, uint32& damage, uint32* absorb); static uint32 DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage const* cleanDamage = nullptr, DamageEffectType damagetype = DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellInfo const* spellProto = nullptr, bool durabilityLoss = true, bool allowGM = false, Spell const* spell = nullptr); static void Kill(Unit* killer, Unit* victim, bool durabilityLoss = true, WeaponAttackType attackType = BASE_ATTACK, SpellInfo const* spellProto = nullptr, Spell const* spell = nullptr); @@ -1630,7 +1632,7 @@ public: return value; } - uint32 GetUnitMeleeSkill(Unit const* target = nullptr) const { return (target ? getLevelForTarget(target) : getLevel()) * 5; } + uint32 GetUnitMeleeSkill(Unit const* target = nullptr) const { return (target ? getLevelForTarget(target) : GetLevel()) * 5; } uint32 GetDefenseSkillValue(Unit const* target = nullptr) const; uint32 GetWeaponSkillValue(WeaponAttackType attType, Unit const* target = nullptr) const; [[nodiscard]] float GetWeaponProcChance() const; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 13aa9f489..b755bfa58 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -6198,6 +6198,7 @@ void ObjectMgr::LoadQuestGreetings() LOG_INFO("server.loading", " "); } +/// @bug Does not load Locale greetings. See https://github.com/azerothcore/azerothcore-wotlk/issues/10913 void ObjectMgr::LoadQuestGreetingsLocales() { uint32 oldMSTime = getMSTime(); @@ -9872,7 +9873,7 @@ void ObjectMgr::SendServerMail(Player* player, uint32 id, uint32 reqLevel, uint3 { if (active) { - if (player->getLevel() < reqLevel) + if (player->GetLevel() < reqLevel) return; if (player->GetTotalPlayedTime() < reqPlayTime) diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 5e7a1e7c8..49535085a 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -283,7 +283,7 @@ bool Group::CheckLevelForRaid() { for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr) if (Player* player = ObjectAccessor::FindPlayer(citr->guid)) - if (player->getLevel() < sConfigMgr->GetOption("Group.Raid.LevelRestriction", 10)) + if (player->GetLevel() < sConfigMgr->GetOption("Group.Raid.LevelRestriction", 10)) return true; return false; @@ -1915,7 +1915,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* if (!reference) return ERR_BATTLEGROUND_JOIN_FAILED; - PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bgTemplate->GetMapId(), reference->getLevel()); + PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bgTemplate->GetMapId(), reference->GetLevel()); if (!bracketEntry) return ERR_BATTLEGROUND_JOIN_FAILED; @@ -1946,7 +1946,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* return ERR_BATTLEGROUND_JOIN_FAILED; // not in the same battleground level braket, don't let join - PvPDifficultyEntry const* memberBracketEntry = GetBattlegroundBracketByLevel(bracketEntry->mapId, member->getLevel()); + PvPDifficultyEntry const* memberBracketEntry = GetBattlegroundBracketByLevel(bracketEntry->mapId, member->GetLevel()); if (memberBracketEntry != bracketEntry) return ERR_BATTLEGROUND_JOIN_RANGE_INDEX; diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 0b534676e..849f75487 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -523,7 +523,7 @@ void Guild::BankTab::SendText(Guild const* guild, WorldSession* session) const void Guild::Member::SetStats(Player* player) { m_name = player->GetName(); - m_level = player->getLevel(); + m_level = player->GetLevel(); m_class = player->getClass(); m_gender = player->getGender(); m_zoneId = player->GetZoneId(); @@ -1672,7 +1672,7 @@ void Guild::HandleMemberDepositMoney(WorldSession* session, uint32 amount) if (amount > 10 * GOLD) // receiver_acc = Guild id, receiver_name = Guild name CharacterDatabase.Execute("INSERT INTO log_money VALUES({}, {}, \"{}\", \"{}\", {}, \"{}\", {}, \"(guild members: {}, new amount: {}, leader guid low: {}, sender level: {})\", NOW(), {})", - session->GetAccountId(), player->GetGUID().GetCounter(), player->GetName(), session->GetRemoteAddress(), GetId(), GetName(), amount, GetMemberCount(), GetTotalBankMoney(), GetLeaderGUID().GetCounter(), player->getLevel(), 3); + session->GetAccountId(), player->GetGUID().GetCounter(), player->GetName(), session->GetRemoteAddress(), GetId(), GetName(), amount, GetMemberCount(), GetTotalBankMoney(), GetLeaderGUID().GetCounter(), player->GetLevel(), 3); } bool Guild::HandleMemberWithdrawMoney(WorldSession* session, uint32 amount, bool repair) @@ -1716,7 +1716,7 @@ bool Guild::HandleMemberWithdrawMoney(WorldSession* session, uint32 amount, bool if (amount > 10 * GOLD) // sender_acc = 0 (guild has no account), sender_guid = Guild id, sender_name = Guild name CharacterDatabase.Execute("INSERT INTO log_money VALUES({}, {}, \"{}\", \"{}\", {}, \"{}\", {}, \"(guild, members: {}, new amount: {}, leader guid low: {}, withdrawer level: {})\", NOW(), {})", - 0, GetId(), GetName(), session->GetRemoteAddress(), session->GetAccountId(), player->GetName(), amount, GetMemberCount(), GetTotalBankMoney(), GetLeaderGUID().GetCounter(), player->getLevel(), 4); + 0, GetId(), GetName(), session->GetRemoteAddress(), session->GetAccountId(), player->GetName(), amount, GetMemberCount(), GetTotalBankMoney(), GetLeaderGUID().GetCounter(), player->GetLevel(), 4); std::string aux = Acore::Impl::ByteArrayToHexStr(reinterpret_cast(&m_bankMoney), 8, true); _BroadcastEvent(GE_BANK_MONEY_SET, ObjectGuid::Empty, aux.c_str()); diff --git a/src/server/game/Handlers/ArenaTeamHandler.cpp b/src/server/game/Handlers/ArenaTeamHandler.cpp index e42609b98..66b348190 100644 --- a/src/server/game/Handlers/ArenaTeamHandler.cpp +++ b/src/server/game/Handlers/ArenaTeamHandler.cpp @@ -97,7 +97,7 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket& recvData) return; } - if (player->getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) + if (player->GetLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, "", invitedName, ERR_ARENA_TEAM_TARGET_TOO_LOW_S); return; diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp index ece0e94df..abac07950 100644 --- a/src/server/game/Handlers/AuctionHouseHandler.cpp +++ b/src/server/game/Handlers/AuctionHouseHandler.cpp @@ -53,7 +53,7 @@ void WorldSession::HandleAuctionHelloOpcode(WorldPacket& recvData) //this void causes that auction window is opened void WorldSession::SendAuctionHello(ObjectGuid guid, Creature* unit) { - if (GetPlayer()->getLevel() < sWorld->getIntConfig(CONFIG_AUCTION_LEVEL_REQ)) + if (GetPlayer()->GetLevel() < sWorld->getIntConfig(CONFIG_AUCTION_LEVEL_REQ)) { SendNotification(GetAcoreString(LANG_AUCTION_REQ), sWorld->getIntConfig(CONFIG_AUCTION_LEVEL_REQ)); return; diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp index 8bbe394c8..4ab089472 100644 --- a/src/server/game/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Handlers/BattleGroundHandler.cpp @@ -122,7 +122,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData) return; // expected bracket entry - PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel()); + PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), _player->GetLevel()); if (!bracketEntry) return; @@ -464,7 +464,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket& recvData) GetPlayerInfo(), arenaType, unk2, bgTypeId_, action); // expected bracket entry - PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel()); + PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), _player->GetLevel()); if (!bracketEntry) return; @@ -481,10 +481,10 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket& recvData) LOG_DEBUG("bg.battleground", "Player {} {} has a deserter debuff, do not port him to battleground!", _player->GetName(), _player->GetGUID().ToString()); } - if (_player->getLevel() > bg->GetMaxLevel()) + if (_player->GetLevel() > bg->GetMaxLevel()) { LOG_ERROR("network", "Player {} {} has level ({}) higher than maxlevel ({}) of battleground ({})! Do not port him to battleground!", - _player->GetName(), _player->GetGUID().ToString(), _player->getLevel(), bg->GetMaxLevel(), bg->GetBgTypeID()); + _player->GetName(), _player->GetGUID().ToString(), _player->GetLevel(), bg->GetMaxLevel(), bg->GetBgTypeID()); action = 0; } } @@ -650,7 +650,7 @@ void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket& /*recvData*/) continue; // expected bracket entry - PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bgt->GetMapId(), _player->getLevel()); + PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bgt->GetMapId(), _player->GetLevel()); if (!bracketEntry) continue; @@ -726,7 +726,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData) BattlegroundTypeId bgTypeId = bgt->GetBgTypeID(); // expected bracket entry - PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bgt->GetMapId(), _player->getLevel()); + PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bgt->GetMapId(), _player->GetLevel()); if (!bracketEntry) return; diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 06ab7a3e4..30d5618cf 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -581,7 +581,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData) { LOG_INFO("entities.player.character", "Account: {} (IP: {}) Create Character: {} {}", GetAccountId(), GetRemoteAddress(), newChar->GetName(), newChar->GetGUID().ToString()); sScriptMgr->OnPlayerCreate(newChar.get()); - sCharacterCache->AddCharacterCacheEntry(newChar->GetGUID(), GetAccountId(), newChar->GetName(), newChar->getGender(), newChar->getRace(), newChar->getClass(), newChar->getLevel()); + sCharacterCache->AddCharacterCacheEntry(newChar->GetGUID(), GetAccountId(), newChar->GetName(), newChar->getGender(), newChar->getRace(), newChar->getClass(), newChar->GetLevel()); SendCharCreate(CHAR_CREATE_SUCCESS); } else @@ -1045,7 +1045,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder) std::string IP_str = GetRemoteAddress(); LOG_INFO("entities.player", "Account: {} (IP: {}) Login Character:[{}] ({}) Level: {}", - GetAccountId(), IP_str, pCurrChar->GetName(), pCurrChar->GetGUID().ToString(), pCurrChar->getLevel()); + GetAccountId(), IP_str, pCurrChar->GetName(), pCurrChar->GetGUID().ToString(), pCurrChar->GetLevel()); if (!pCurrChar->IsStandState() && !pCurrChar->HasUnitState(UNIT_STATE_STUNNED)) pCurrChar->SetStandState(UNIT_STAND_STATE_STAND); diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp index e580a378a..3d1af0d8b 100644 --- a/src/server/game/Handlers/ChatHandler.cpp +++ b/src/server/game/Handlers/ChatHandler.cpp @@ -351,7 +351,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) if (!sender->IsAlive()) return; - if (sender->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_SAY_LEVEL_REQ)) + if (sender->GetLevel() < sWorld->getIntConfig(CONFIG_CHAT_SAY_LEVEL_REQ)) { SendNotification(GetAcoreString(LANG_SAY_REQ), sWorld->getIntConfig(CONFIG_CHAT_SAY_LEVEL_REQ)); return; @@ -367,7 +367,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) break; case CHAT_MSG_WHISPER: { - if (sender->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ)) + if (sender->GetLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ)) { SendNotification(GetAcoreString(LANG_WHISPER_REQ), sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ)); return; @@ -579,7 +579,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) { if (AccountMgr::IsPlayerAccount(GetSecurity())) { - if (sender->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_CHANNEL_LEVEL_REQ)) + if (sender->GetLevel() < sWorld->getIntConfig(CONFIG_CHAT_CHANNEL_LEVEL_REQ)) { SendNotification(GetAcoreString(LANG_CHANNEL_REQ), sWorld->getIntConfig(CONFIG_CHAT_CHANNEL_LEVEL_REQ)); return; diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp index 5bb8eb4b1..cf0e23b26 100644 --- a/src/server/game/Handlers/GroupHandler.cpp +++ b/src/server/game/Handlers/GroupHandler.cpp @@ -124,7 +124,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData) return; } - if (!player->GetSocial()->HasFriend(GetPlayer()->GetGUID()) && GetPlayer()->getLevel() < sWorld->getIntConfig(CONFIG_PARTY_LEVEL_REQ)) + if (!player->GetSocial()->HasFriend(GetPlayer()->GetGUID()) && GetPlayer()->GetLevel() < sWorld->getIntConfig(CONFIG_PARTY_LEVEL_REQ)) { SendPartyResult(PARTY_OP_INVITE, player->GetName(), ERR_INVITE_RESTRICTED); return; @@ -853,7 +853,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player* player, WorldPacke *data << uint16(player->GetMaxPower(powerType)); if (mask & GROUP_UPDATE_FLAG_LEVEL) - *data << uint16(player->getLevel()); + *data << uint16(player->GetLevel()); if (mask & GROUP_UPDATE_FLAG_ZONE) *data << uint16(player->GetZoneId()); @@ -1044,7 +1044,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket& recvData) data << uint16(player->GetPower(powerType)); // GROUP_UPDATE_FLAG_CUR_POWER data << uint16(player->GetMaxPower(powerType)); // GROUP_UPDATE_FLAG_MAX_POWER - data << uint16(player->getLevel()); // GROUP_UPDATE_FLAG_LEVEL + data << uint16(player->GetLevel()); // GROUP_UPDATE_FLAG_LEVEL data << uint16(player->GetZoneId()); // GROUP_UPDATE_FLAG_ZONE data << uint16(player->GetPositionX()); // GROUP_UPDATE_FLAG_POSITION data << uint16(player->GetPositionY()); // GROUP_UPDATE_FLAG_POSITION diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp index e94096b8b..6b4c74b76 100644 --- a/src/server/game/Handlers/LFGHandler.cpp +++ b/src/server/game/Handlers/LFGHandler.cpp @@ -152,7 +152,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData* LOG_DEBUG("network", "CMSG_LFG_PLAYER_LOCK_INFO_REQUEST [{}]", guid.ToString()); // Get Random dungeons that can be done at a certain level and expansion - uint8 level = GetPlayer()->getLevel(); + uint8 level = GetPlayer()->GetLevel(); lfg::LfgDungeonSet const& randomDungeons = sLFGMgr->GetRandomAndSeasonalDungeons(level, GetPlayer()->GetSession()->Expansion()); @@ -185,7 +185,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData* if (quest) { - uint8 playerLevel = GetPlayer() ? GetPlayer()->getLevel() : 0; + uint8 playerLevel = GetPlayer() ? GetPlayer()->GetLevel() : 0; data << uint8(done); data << uint32(quest->GetRewOrReqMoney(playerLevel)); data << uint32(quest->XPValue(playerLevel)); @@ -410,7 +410,7 @@ void WorldSession::SendLfgRoleCheckUpdate(lfg::LfgRoleCheck const& roleCheck) data << uint8(roles > 0); // Ready data << uint32(roles); // Roles Player* player = ObjectAccessor::FindConnectedPlayer(guid); - data << uint8(player ? player->getLevel() : 0); // Level + data << uint8(player ? player->GetLevel() : 0); // Level for (lfg::LfgRolesMap::const_iterator it = roleCheck.roles.begin(); it != roleCheck.roles.end(); ++it) { @@ -423,7 +423,7 @@ void WorldSession::SendLfgRoleCheckUpdate(lfg::LfgRoleCheck const& roleCheck) data << uint8(roles > 0); // Ready data << uint32(roles); // Roles player = ObjectAccessor::FindConnectedPlayer(guid); - data << uint8(player ? player->getLevel() : 0);// Level + data << uint8(player ? player->GetLevel() : 0);// Level } } SendPacket(&data); @@ -473,7 +473,7 @@ void WorldSession::SendLfgPlayerReward(lfg::LfgPlayerRewardData const& rewardDat uint8 itemNum = rewardData.quest->GetRewItemsCount(); - uint8 playerLevel = GetPlayer() ? GetPlayer()->getLevel() : 0; + uint8 playerLevel = GetPlayer() ? GetPlayer()->GetLevel() : 0; WorldPacket data(SMSG_LFG_PLAYER_REWARD, 4 + 4 + 1 + 4 + 4 + 4 + 4 + 4 + 1 + itemNum * (4 + 4 + 4)); data << uint32(rewardData.rdungeonEntry); // Random Dungeon Finished diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp index 0bdcb4b31..5eb4e15c4 100644 --- a/src/server/game/Handlers/MailHandler.cpp +++ b/src/server/game/Handlers/MailHandler.cpp @@ -115,7 +115,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData) Player* player = _player; - if (player->getLevel() < sWorld->getIntConfig(CONFIG_MAIL_LEVEL_REQ)) + if (player->GetLevel() < sWorld->getIntConfig(CONFIG_MAIL_LEVEL_REQ)) { SendNotification(GetAcoreString(LANG_MAIL_SENDER_REQ), sWorld->getIntConfig(CONFIG_MAIL_LEVEL_REQ)); return; diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp index e5ec2da7d..3734aeaf8 100644 --- a/src/server/game/Handlers/PetitionsHandler.cpp +++ b/src/server/game/Handlers/PetitionsHandler.cpp @@ -92,7 +92,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData) else { // TODO: find correct opcode - if (_player->getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) + if (_player->GetLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, "", _player->GetName(), ERR_ARENA_TEAM_TARGET_TOO_LOW_S); return; @@ -426,7 +426,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData) if (type != GUILD_CHARTER_TYPE) { - if (_player->getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) + if (_player->GetLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, "", _player->GetName().c_str(), ERR_ARENA_TEAM_TARGET_TOO_LOW_S); return; @@ -576,7 +576,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket& recvData) if (petition->petitionType != GUILD_CHARTER_TYPE) { - if (player->getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) + if (player->GetLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { // player is too low level to join an arena team SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, player->GetName().c_str(), "", ERR_ARENA_TEAM_TARGET_TOO_LOW_S); diff --git a/src/server/game/Handlers/ReferAFriendHandler.cpp b/src/server/game/Handlers/ReferAFriendHandler.cpp index d1c0211a5..e616d7b47 100644 --- a/src/server/game/Handlers/ReferAFriendHandler.cpp +++ b/src/server/game/Handlers/ReferAFriendHandler.cpp @@ -40,9 +40,9 @@ void WorldSession::HandleGrantLevel(WorldPacket& recvData) error = ERR_REFER_A_FRIEND_NOT_REFERRED_BY; else if (target->GetTeamId() != _player->GetTeamId()) error = ERR_REFER_A_FRIEND_DIFFERENT_FACTION; - else if (target->getLevel() >= _player->getLevel()) + else if (target->GetLevel() >= _player->GetLevel()) error = ERR_REFER_A_FRIEND_TARGET_TOO_HIGH; - else if (target->getLevel() >= sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL)) + else if (target->GetLevel() >= sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL)) error = ERR_REFER_A_FRIEND_GRANT_LEVEL_MAX_I; else if (target->GetGroup() != _player->GetGroup()) error = ERR_REFER_A_FRIEND_NOT_IN_GROUP; @@ -82,5 +82,5 @@ void WorldSession::HandleAcceptGrantLevel(WorldPacket& recvData) else return; - _player->GiveLevel(_player->getLevel() + 1); + _player->GiveLevel(_player->GetLevel() + 1); } diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 3a25d131e..247fded70 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -458,7 +458,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) // auto-selection buff level base at target level (in spellInfo) if (targets.GetUnitTarget()) { - SpellInfo const* actualSpellInfo = spellInfo->GetAuraRankForLevel(targets.GetUnitTarget()->getLevel()); + SpellInfo const* actualSpellInfo = spellInfo->GetAuraRankForLevel(targets.GetUnitTarget()->GetLevel()); // if rank not found then function return nullptr but in explicit cast case original spell can be casted and later failed with appropriate error message if (actualSpellInfo) diff --git a/src/server/game/Handlers/TicketHandler.cpp b/src/server/game/Handlers/TicketHandler.cpp index 2d2eb9e8c..9a445efe4 100644 --- a/src/server/game/Handlers/TicketHandler.cpp +++ b/src/server/game/Handlers/TicketHandler.cpp @@ -33,7 +33,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket& recvData) if (sTicketMgr->GetStatus() == GMTICKET_QUEUE_STATUS_DISABLED) return; - if (GetPlayer()->getLevel() < sWorld->getIntConfig(CONFIG_TICKET_LEVEL_REQ)) + if (GetPlayer()->GetLevel() < sWorld->getIntConfig(CONFIG_TICKET_LEVEL_REQ)) { SendNotification(GetAcoreString(LANG_TICKET_REQ), sWorld->getIntConfig(CONFIG_TICKET_LEVEL_REQ)); return; diff --git a/src/server/game/Handlers/TradeHandler.cpp b/src/server/game/Handlers/TradeHandler.cpp index e78788eca..b212e97ad 100644 --- a/src/server/game/Handlers/TradeHandler.cpp +++ b/src/server/game/Handlers/TradeHandler.cpp @@ -570,7 +570,7 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket) return; } - if (GetPlayer()->getLevel() < sWorld->getIntConfig(CONFIG_TRADE_LEVEL_REQ)) + if (GetPlayer()->GetLevel() < sWorld->getIntConfig(CONFIG_TRADE_LEVEL_REQ)) { SendNotification(GetAcoreString(LANG_TRADE_REQ), sWorld->getIntConfig(CONFIG_TRADE_LEVEL_REQ)); return; @@ -635,7 +635,7 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket) return; } - if (pOther->getLevel() < sWorld->getIntConfig(CONFIG_TRADE_LEVEL_REQ)) + if (pOther->GetLevel() < sWorld->getIntConfig(CONFIG_TRADE_LEVEL_REQ)) { SendNotification(GetAcoreString(LANG_TRADE_OTHER_REQ), sWorld->getIntConfig(CONFIG_TRADE_LEVEL_REQ)); return; diff --git a/src/server/game/Miscellaneous/Formulas.cpp b/src/server/game/Miscellaneous/Formulas.cpp index 788fc5967..0924db641 100644 --- a/src/server/game/Miscellaneous/Formulas.cpp +++ b/src/server/game/Miscellaneous/Formulas.cpp @@ -78,7 +78,7 @@ uint32 Acore::XP::Gain(Player* player, Unit* unit, bool isBattleGround /*= false { float xpMod = 1.0f; - gain = BaseGain(player->getLevel(), unit->getLevel(), GetContentLevelsForMapAndZone(unit->GetMapId(), unit->GetZoneId())); + gain = BaseGain(player->GetLevel(), unit->GetLevel(), GetContentLevelsForMapAndZone(unit->GetMapId(), unit->GetZoneId())); if (gain && creature) { diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index b0b0d7df7..551239007 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -686,7 +686,7 @@ void WorldSession::LogoutPlayer(bool save) METRIC_EVENT("player_events", "Logout", _player->GetName()); LOG_INFO("entities.player", "Account: {} (IP: {}) Logout Character:[{}] ({}) Level: {}", - GetAccountId(), GetRemoteAddress(), _player->GetName(), _player->GetGUID().ToString(), _player->getLevel()); + GetAccountId(), GetRemoteAddress(), _player->GetName(), _player->GetGUID().ToString(), _player->GetLevel()); //! Remove the player from the world // the player may not be in the world when logging out diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index cfe37f4e8..60f97bf15 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -390,7 +390,7 @@ AuraEffect::AuraEffect(Aura* base, uint8 effIndex, int32* baseAmount, Unit* cast CalculatePeriodicData(); m_amount = CalculateAmount(caster); - m_casterLevel = caster ? caster->getLevel() : 0; + m_casterLevel = caster ? caster->GetLevel() : 0; m_applyResilience = caster && caster->CanApplyResilience(); m_auraGroup = sSpellMgr->GetSpellGroup(GetId()); diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 73668ac89..91fa6d859 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -410,7 +410,7 @@ Aura::Aura(SpellInfo const* spellproto, WorldObject* owner, Unit* caster, Item* m_spellInfo(spellproto), m_casterGuid(casterGUID ? casterGUID : caster->GetGUID()), m_castItemGuid(itemGUID ? itemGUID : castItem ? castItem->GetGUID() : ObjectGuid::Empty), m_castItemEntry(castItem ? castItem->GetEntry() : 0), m_applyTime(GameTime::GetGameTime().count()), m_owner(owner), m_timeCla(0), m_updateTargetMapInterval(0), - m_casterLevel(caster ? caster->getLevel() : m_spellInfo->SpellLevel), m_procCharges(0), m_stackAmount(1), + m_casterLevel(caster ? caster->GetLevel() : m_spellInfo->SpellLevel), m_procCharges(0), m_stackAmount(1), m_isRemoved(false), m_isSingleTarget(false), m_isUsingCharges(false), m_triggeredByAuraSpellInfo(nullptr) { if ((m_spellInfo->ManaPerSecond || m_spellInfo->ManaPerSecondPerLevel) && !m_spellInfo->HasAttribute(SPELL_ATTR2_NO_TARGET_PER_SECOND_COST)) @@ -824,7 +824,7 @@ void Aura::Update(uint32 diff, Unit* caster) m_timeCla -= diff; else if (caster) { - if (int32 ManaPerSecond = m_spellInfo->ManaPerSecond + m_spellInfo->ManaPerSecondPerLevel * caster->getLevel()) + if (int32 ManaPerSecond = m_spellInfo->ManaPerSecond + m_spellInfo->ManaPerSecondPerLevel * caster->GetLevel()) { m_timeCla += 1000 - diff; @@ -1531,7 +1531,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b case SPELLFAMILY_SHAMAN: { // Ghost Wolf Speed (PvP 58 lvl set) - if (GetSpellInfo()->SpellFamilyFlags[0] & 0x00000800 && target->HasAura(22801) && target->getLevel() <= 60) + if (GetSpellInfo()->SpellFamilyFlags[0] & 0x00000800 && target->HasAura(22801) && target->GetLevel() <= 60) { int32 bp0 = 15; target->CastCustomSpell(target, 47017, &bp0, 0, 0, true); diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index d8a2b4c8d..2053b4e50 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2396,7 +2396,7 @@ void Spell::AddUnitTarget(Unit* target, uint32 effectMask, bool checkIfValid /*= if (m_auraScaleMask && ihit->effectMask == m_auraScaleMask && m_caster != target) { SpellInfo const* auraSpell = m_spellInfo->GetFirstRankSpell(); - if (uint32(target->getLevel() + 10) >= auraSpell->SpellLevel) + if (uint32(target->GetLevel() + 10) >= auraSpell->SpellLevel) ihit->scaleAura = true; } @@ -2419,7 +2419,7 @@ void Spell::AddUnitTarget(Unit* target, uint32 effectMask, bool checkIfValid /*= if (m_auraScaleMask && targetInfo.effectMask == m_auraScaleMask && m_caster != target) { SpellInfo const* auraSpell = m_spellInfo->GetFirstRankSpell(); - if (uint32(target->getLevel() + 10) >= auraSpell->SpellLevel) + if (uint32(target->GetLevel() + 10) >= auraSpell->SpellLevel) targetInfo.scaleAura = true; } @@ -3105,7 +3105,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA int32 basePoints[3]; if (scaleAura) { - aurSpellInfo = m_spellInfo->GetAuraRankForLevel(unitTarget->getLevel()); + aurSpellInfo = m_spellInfo->GetAuraRankForLevel(unitTarget->GetLevel()); ASSERT(aurSpellInfo); for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) { @@ -6097,7 +6097,7 @@ SpellCastResult Spell::CheckCast(bool strict) if (!learn_spellproto) return SPELL_FAILED_NOT_KNOWN; - if (m_spellInfo->SpellLevel > pet->getLevel()) + if (m_spellInfo->SpellLevel > pet->GetLevel()) return SPELL_FAILED_LOWLEVEL; break; @@ -6119,7 +6119,7 @@ SpellCastResult Spell::CheckCast(bool strict) if (!learn_spellproto) return SPELL_FAILED_NOT_KNOWN; - if (m_spellInfo->SpellLevel > pet->getLevel()) + if (m_spellInfo->SpellLevel > pet->GetLevel()) return SPELL_FAILED_LOWLEVEL; } break; @@ -6240,7 +6240,7 @@ SpellCastResult Spell::CheckCast(bool strict) uint32 skill = creature->GetCreatureTemplate()->GetRequiredLootSkill(); int32 skillValue = m_caster->ToPlayer()->GetSkillValue(skill); - int32 TargetLevel = m_targets.GetUnitTarget()->getLevel(); + int32 TargetLevel = m_targets.GetUnitTarget()->GetLevel(); int32 ReqValue = (skillValue < 100 ? (TargetLevel - 10) * 10 : TargetLevel * 5); if (ReqValue > skillValue) return SPELL_FAILED_LOW_CASTLEVEL; @@ -6619,7 +6619,7 @@ SpellCastResult Spell::CheckCast(bool strict) return SPELL_FAILED_CANT_BE_CHARMED; int32 damage = CalculateSpellDamage(i, target); - if (damage && int32(target->getLevel()) > damage) + if (damage && int32(target->GetLevel()) > damage) return SPELL_FAILED_HIGHLEVEL; } @@ -7886,7 +7886,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const if (target->GetCharmerGUID()) return false; if (int32 damage = CalculateSpellDamage(eff, target)) - if ((int32)target->getLevel() > damage) + if ((int32)target->GetLevel() > damage) return false; break; default: @@ -7958,7 +7958,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const return false; if (m_caster->ToPlayer()->GetSession()->GetRecruiterId() != target->ToPlayer()->GetSession()->GetAccountId() && target->ToPlayer()->GetSession()->IsARecruiter()) return false; - if (target->ToPlayer()->getLevel() >= sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL)) + if (target->ToPlayer()->GetLevel() >= sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL)) return false; break; default: // normal case diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 5ae18f79c..7b7995f3c 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -352,7 +352,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex) // Shield Slam if (m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->GetCategory() == 1209) { - uint8 level = m_caster->getLevel(); + uint8 level = m_caster->GetLevel(); // xinef: shield block should increase the limit float limit = m_caster->HasAura(2565) ? 2.0f : 1.0f; uint32 block_value = m_caster->GetShieldBlockValue(uint32(float(level) * 24.5f * limit), uint32(float(level) * 34.5f * limit)); @@ -641,7 +641,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex) // Shield of Righteousness if (m_spellInfo->SpellFamilyFlags[EFFECT_1] & 0x100000) { - uint8 level = m_caster->getLevel(); + uint8 level = m_caster->GetLevel(); uint32 block_value = m_caster->GetShieldBlockValue(uint32(float(level) * 29.5f), uint32(float(level) * 34.5f)); if (m_caster->GetAuraEffect(64882, EFFECT_0)) block_value += 225; @@ -1911,15 +1911,15 @@ void Spell::EffectEnergize(SpellEffIndex effIndex) switch (m_spellInfo->Id) { case 9512: // Restore Energy - level_diff = m_caster->getLevel() - 40; + level_diff = m_caster->GetLevel() - 40; level_multiplier = 2; break; case 24571: // Blood Fury - level_diff = m_caster->getLevel() - 60; + level_diff = m_caster->GetLevel() - 60; level_multiplier = 10; break; case 24532: // Burst of Energy - level_diff = m_caster->getLevel() - 60; + level_diff = m_caster->GetLevel() - 60; level_multiplier = 4; break; case 31930: // Judgements of the Wise @@ -1981,7 +1981,7 @@ void Spell::EffectEnergize(SpellEffIndex effIndex) for (std::set::iterator itr = availableElixirs.begin(); itr != availableElixirs.end();) { SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(*itr); - if (spellInfo->SpellLevel < m_spellInfo->SpellLevel || spellInfo->SpellLevel > unitTarget->getLevel()) + if (spellInfo->SpellLevel < m_spellInfo->SpellLevel || spellInfo->SpellLevel > unitTarget->GetLevel()) availableElixirs.erase(itr++); else ++itr; @@ -2817,7 +2817,7 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/) // do not allow to add too many honor for player (50 * 21) = 1040 at level 70, or (50 * 31) = 1550 at level 80 if (damage <= 50) { - uint32 honor_reward = Acore::Honor::hk_honor_at_level(unitTarget->getLevel(), float(damage)); + uint32 honor_reward = Acore::Honor::hk_honor_at_level(unitTarget->GetLevel(), float(damage)); unitTarget->ToPlayer()->RewardHonor(nullptr, 1, honor_reward, false); LOG_DEBUG("spells.aura", "SpellEffect::AddHonor (spell_id {}) rewards {} honor points (scale) to player: {}", m_spellInfo->Id, honor_reward, unitTarget->ToPlayer()->GetGUID().ToString()); @@ -3127,7 +3127,7 @@ void Spell::EffectTameCreature(SpellEffIndex /*effIndex*/) // "kill" original creature creatureTarget->DespawnOrUnsummon(); - uint8 level = (creatureTarget->getLevel() < (m_caster->getLevel() - 5)) ? (m_caster->getLevel() - 5) : creatureTarget->getLevel(); + uint8 level = (creatureTarget->GetLevel() < (m_caster->GetLevel() - 5)) ? (m_caster->GetLevel() - 5) : creatureTarget->GetLevel(); // prepare visual effect for levelup pet->SetUInt32Value(UNIT_FIELD_LEVEL, level - 1); @@ -4181,7 +4181,7 @@ void Spell::EffectDuel(SpellEffIndex effIndex) } pGameObj->SetUInt32Value(GAMEOBJECT_FACTION, m_caster->GetFaction()); - pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel() + 1); + pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->GetLevel() + 1); int32 duration = m_spellInfo->GetDuration(); pGameObj->SetRespawnTime(duration > 0 ? duration / IN_MILLISECONDS : 0); pGameObj->SetSpellId(m_spellInfo->Id); @@ -4391,7 +4391,7 @@ void Spell::EffectApplyGlyph(SpellEffIndex effIndex) minLevel = 80; break; } - if (minLevel && m_caster->getLevel() < minLevel) + if (minLevel && m_caster->GetLevel() < minLevel) { SendCastResult(SPELL_FAILED_GLYPH_SOCKET_LOCKED); return; @@ -4648,7 +4648,7 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex) return; } - //pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel()); + //pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->GetLevel()); int32 duration = m_spellInfo->GetDuration(); pGameObj->SetRespawnTime(duration > 0 ? duration / IN_MILLISECONDS : 0); pGameObj->SetSpellId(m_spellInfo->Id); @@ -4922,7 +4922,7 @@ void Spell::EffectSkinning(SpellEffIndex /*effIndex*/) return; Creature* creature = unitTarget->ToCreature(); - int32 targetLevel = creature->getLevel(); + int32 targetLevel = creature->GetLevel(); uint32 skill = creature->GetCreatureTemplate()->GetRequiredLootSkill(); @@ -5511,7 +5511,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex) pGameObj->SetOwnerGUID(m_caster->GetGUID()); - //pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel()); + //pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->GetLevel()); pGameObj->SetSpellId(m_spellInfo->Id); ExecuteLogEffectSummonObject(effIndex, pGameObj); @@ -6015,7 +6015,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const* caster = caster->ToTotem()->GetOwner(); // in another case summon new - uint8 summonLevel = caster->getLevel(); + uint8 summonLevel = caster->GetLevel(); // level of pet summoned using engineering item based at engineering skill level if (m_CastItem && caster->GetTypeId() == TYPEID_PLAYER) @@ -6113,7 +6113,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const* summon->SetLevel(summonLevel); // if summonLevel changed, set stats for calculated level - if (summonLevel != caster->getLevel()) + if (summonLevel != caster->GetLevel()) { ((Guardian*)summon)->InitStatsForLevel(summonLevel); } diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index a9a73f07c..8851d3613 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -414,7 +414,7 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster, int32 const* bp, Unit const // xinef: added basePointsPerLevel check if (caster && basePointsPerLevel != 0.0f) { - int32 level = int32(caster->getLevel()); + int32 level = int32(caster->GetLevel()); if (level > int32(_spellInfo->MaxLevel) && _spellInfo->MaxLevel > 0) level = int32(_spellInfo->MaxLevel); else if (level < int32(_spellInfo->BaseLevel)) @@ -458,7 +458,7 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster, int32 const* bp, Unit const // amount multiplication based on caster's level if (!caster->IsControlledByPlayer() && - _spellInfo->SpellLevel && _spellInfo->SpellLevel != caster->getLevel() && + _spellInfo->SpellLevel && _spellInfo->SpellLevel != caster->GetLevel() && !basePointsPerLevel && _spellInfo->HasAttribute(SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL)) { bool canEffectScale = false; @@ -502,7 +502,7 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster, int32 const* bp, Unit const if (canEffectScale) { GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.LookupEntry(_spellInfo->SpellLevel - 1); - GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(caster->getLevel() - 1); + GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(caster->GetLevel() - 1); if (spellScaler && casterScaler) value *= casterScaler->ratio / spellScaler->ratio; } @@ -549,7 +549,7 @@ float SpellEffectInfo::CalcRadius(Unit* caster, Spell* spell) const float radius = RadiusEntry->RadiusMin; if (caster) { - radius += RadiusEntry->RadiusPerLevel * caster->getLevel(); + radius += RadiusEntry->RadiusPerLevel * caster->GetLevel(); radius = std::min(radius, RadiusEntry->RadiusMax); if (Player* modOwner = caster->GetSpellModOwner()) modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_RADIUS, radius, spell); @@ -2453,7 +2453,7 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, S if (HasAttribute(SPELL_ATTR0_SCALES_WITH_CREATURE_LEVEL)) { GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.LookupEntry(SpellLevel - 1); - GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(caster->getLevel() - 1); + GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(caster->GetLevel() - 1); if (spellScaler && casterScaler) powerCost *= casterScaler->ratio / spellScaler->ratio; } diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 8f150857b..77998a6d9 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -2675,7 +2675,7 @@ void World::SendGMText(uint32 string_id, ...) va_end(ap); } -/// DEPRECATED, only for debug purpose. Send a System Message to all players (except self if mentioned) +/// @deprecated only for debug purpose. Send a System Message to all players (except self if mentioned) void World::SendGlobalText(const char* text, WorldSession* self) { WorldPacket data; diff --git a/src/server/scripts/Commands/cs_cache.cpp b/src/server/scripts/Commands/cs_cache.cpp index 3b8550d46..6fb0fe94f 100644 --- a/src/server/scripts/Commands/cs_cache.cpp +++ b/src/server/scripts/Commands/cs_cache.cpp @@ -120,7 +120,7 @@ public: else { sCharacterCache->AddCharacterCacheEntry(cPlayer->GetGUID(), cPlayer->GetSession()->GetAccountId(), cPlayer->GetName(), - cPlayer->getGender(), cPlayer->getRace(), cPlayer->getClass(), cPlayer->getLevel()); + cPlayer->getGender(), cPlayer->getRace(), cPlayer->getClass(), cPlayer->GetLevel()); } sCharacterCache->UpdateCharacterAccountId(cPlayer->GetGUID(), cPlayer->GetSession()->GetAccountId()); diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index bd34f10bb..e1a065b75 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -437,7 +437,7 @@ public: if (!player) return false; - uint8 oldlevel = player->IsConnected() ? player->GetConnectedPlayer()->getLevel() : sCharacterCache->GetCharacterLevelByGuid(player->GetGUID()); + uint8 oldlevel = player->IsConnected() ? player->GetConnectedPlayer()->GetLevel() : sCharacterCache->GetCharacterLevelByGuid(player->GetGUID()); if (newlevel < 1) return false; // invalid level @@ -762,7 +762,7 @@ public: if (!player) return false; - uint8 oldlevel = player->IsConnected() ? player->GetConnectedPlayer()->getLevel() : sCharacterCache->GetCharacterLevelByGuid(player->GetGUID()); + uint8 oldlevel = player->IsConnected() ? player->GetConnectedPlayer()->GetLevel() : sCharacterCache->GetCharacterLevelByGuid(player->GetGUID()); int16 newlevel = static_cast(oldlevel) + level; if (newlevel < 1) diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 523409f38..915f161f3 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1966,7 +1966,7 @@ public: accId = playerTarget->GetSession()->GetAccountId(); money = playerTarget->GetMoney(); totalPlayerTime = playerTarget->GetTotalPlayedTime(); - level = playerTarget->getLevel(); + level = playerTarget->GetLevel(); latency = playerTarget->GetSession()->GetLatency(); raceid = playerTarget->getRace(); classid = playerTarget->getClass(); diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 83c5fbeb0..7813f5e42 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -612,7 +612,7 @@ public: std::string defRespawnDelayStr = secsToTimeString(target->GetRespawnDelay(), true); handler->PSendSysMessage(LANG_NPCINFO_CHAR, target->GetSpawnId(), target->GetGUID().GetCounter(), entry, id1, id2, id3, displayid, nativeid, faction, npcflags); - handler->PSendSysMessage(LANG_NPCINFO_LEVEL, target->getLevel()); + handler->PSendSysMessage(LANG_NPCINFO_LEVEL, target->GetLevel()); handler->PSendSysMessage(LANG_NPCINFO_EQUIPMENT, target->GetCurrentEquipmentId(), target->GetOriginalEquipmentId()); handler->PSendSysMessage(LANG_NPCINFO_HEALTH, target->GetCreateHealth(), target->GetMaxHealth(), target->GetHealth()); handler->PSendSysMessage(LANG_NPCINFO_FLAGS, target->GetUnitFlags(), target->GetUnitFlags2(), target->GetDynamicFlags(), target->GetFaction()); diff --git a/src/server/scripts/Commands/cs_player_settings.cpp b/src/server/scripts/Commands/cs_player_settings.cpp index 2b7381e4f..efc5ae603 100644 --- a/src/server/scripts/Commands/cs_player_settings.cpp +++ b/src/server/scripts/Commands/cs_player_settings.cpp @@ -59,7 +59,7 @@ public: } else if (type == "autobroadcast") { - if (player->getLevel() < sWorld->getIntConfig(CONFIG_AUTOBROADCAST_MIN_LEVEL_DISABLE)) + if (player->GetLevel() < sWorld->getIntConfig(CONFIG_AUTOBROADCAST_MIN_LEVEL_DISABLE)) { handler->SetSentErrorMessage(true); handler->PSendSysMessage(LANG_CMD_AUTOBROADCAST_LVL_ERROR, sWorld->getIntConfig(CONFIG_AUTOBROADCAST_MIN_LEVEL_DISABLE)); diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index 5f0d8d911..3940ca8d2 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -337,7 +337,7 @@ public: } // If the quest requires money - int32 ReqOrRewMoney = quest->GetRewOrReqMoney(player->getLevel()); + int32 ReqOrRewMoney = quest->GetRewOrReqMoney(player->GetLevel()); if (ReqOrRewMoney < 0) { player->ModifyMoney(-ReqOrRewMoney); diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index c189b009d..fc2f78ddc 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -132,7 +132,7 @@ public: if (!HandleResetStatsOrLevelHelper(target)) return false; - uint8 oldLevel = target->getLevel(); + uint8 oldLevel = target->GetLevel(); // set starting level uint32 startLevel = target->getClass() != CLASS_DEATH_KNIGHT diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp index a2345e5a8..189fcb74a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp @@ -846,7 +846,7 @@ public: if (Creature* creature = player->FindNearestCreature(NPC_SCARSHIELD_INFILTRATOR, 100.0f, true)) { bool transformHasStarted = creature->AI()->GetData(0) == 1; - if ((player->getLevel() < 57 || !player->HasItemCount(ITEM_UNADORNED_SEAL)) && !transformHasStarted) + if ((player->GetLevel() < 57 || !player->HasItemCount(ITEM_UNADORNED_SEAL)) && !transformHasStarted) { // Send whisper if not already sent std::list::iterator itr = std::find(whisperedTargets.begin(), whisperedTargets.end(), player->GetGUID()); @@ -876,7 +876,7 @@ public: { if (Creature* creature = player->FindNearestCreature(NPC_SCARSHIELD_INFILTRATOR, 100.0f, true)) { - if (player->getLevel() >= 57 && player->HasItemCount(ITEM_UNADORNED_SEAL)) + if (player->GetLevel() >= 57 && player->HasItemCount(ITEM_UNADORNED_SEAL)) { creature->AI()->SetData(0, 1); // Start transform into Vaelan return true; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index 75d899c7a..feb1bc37c 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -624,7 +624,12 @@ public: DoCast(target, SPELL_FLASH_HEAL, false); else { - // bugged + /** + * @bug + * Bugged + * //me->GetMotionMaster()->Clear(); + * //me->GetMotionMaster()->MoveChase(target, 20); + */ //me->GetMotionMaster()->Clear(); //me->GetMotionMaster()->MoveChase(target, 20); } diff --git a/src/server/scripts/Northrend/zone_howling_fjord.cpp b/src/server/scripts/Northrend/zone_howling_fjord.cpp index 94379e484..5409d5ec1 100644 --- a/src/server/scripts/Northrend/zone_howling_fjord.cpp +++ b/src/server/scripts/Northrend/zone_howling_fjord.cpp @@ -162,7 +162,7 @@ public: case 2: { Talk(SAY_TURMOIL_1, summoner->ToPlayer()); - me->SetLevel(summoner->getLevel()); + me->SetLevel(summoner->GetLevel()); me->SetFaction(FACTION_MONSTER); if (me->GetExactDist(summoner) < 50.0f) { diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp index 143584180..3f2b00b74 100644 --- a/src/server/scripts/Northrend/zone_wintergrasp.cpp +++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp @@ -748,7 +748,7 @@ public: { if (quest->IsAutoComplete()) result2 = DIALOG_STATUS_REWARD_REP; - else if (player->getLevel() <= (player->GetQuestLevel(quest) + sWorld->getIntConfig(CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF))) + else if (player->GetLevel() <= (player->GetQuestLevel(quest) + sWorld->getIntConfig(CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF))) { if (quest->IsDaily()) result2 = DIALOG_STATUS_AVAILABLE_REP; @@ -1047,7 +1047,7 @@ public: PreventHitDefaultEffect(effIndex); Player* target = GetHitPlayer(); Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG); - if (!wintergrasp || !target || target->getLevel() < 75 || (wintergrasp->GetDefenderTeam() != target->GetTeamId())) + if (!wintergrasp || !target || target->GetLevel() < 75 || (wintergrasp->GetDefenderTeam() != target->GetTeamId())) return; target->CastSpell(target, SPELL_TELEPORT_TO_FORTRESS, true); diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp index 3dc996029..c19cc1271 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp @@ -108,7 +108,7 @@ bool OutdoorPvPSI::HandleAreaTrigger(Player* player, uint32 trigger) } UpdateWorldState(); // reward player, xinef: has no effect on characters above level 70 - if (player->getLevel() < 70) + if (player->GetLevel() < 70) player->CastSpell(player, SI_TRACES_OF_SILITHYST, true); // add 19 honor player->RewardHonor(nullptr, 1, 19); @@ -134,7 +134,7 @@ bool OutdoorPvPSI::HandleAreaTrigger(Player* player, uint32 trigger) } UpdateWorldState(); // reward player, xinef: has no effect on characters above level 70 - if (player->getLevel() < 70) + if (player->GetLevel() < 70) player->CastSpell(player, SI_TRACES_OF_SILITHYST, true); // add 19 honor player->RewardHonor(nullptr, 1, 19); diff --git a/src/server/scripts/Pet/pet_dk.cpp b/src/server/scripts/Pet/pet_dk.cpp index 14cd12ffe..a47484d71 100644 --- a/src/server/scripts/Pet/pet_dk.cpp +++ b/src/server/scripts/Pet/pet_dk.cpp @@ -316,9 +316,9 @@ class spell_pet_dk_gargoyle_strike : public SpellScript int32 damage = 60; if (Unit* caster = GetCaster()) { - if (caster->getLevel() >= 60) + if (caster->GetLevel() >= 60) { - damage += (caster->getLevel() - 60) * 4; + damage += (caster->GetLevel() - 60) * 4; } } diff --git a/src/server/scripts/Pet/pet_hunter.cpp b/src/server/scripts/Pet/pet_hunter.cpp index 2533462a5..048afaf13 100644 --- a/src/server/scripts/Pet/pet_hunter.cpp +++ b/src/server/scripts/Pet/pet_hunter.cpp @@ -97,8 +97,8 @@ struct npc_pet_hunter_snake_trap : public ScriptedAI _init = true; CreatureTemplate const* Info = me->GetCreatureTemplate(); - CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(me->getLevel(), Info->unit_class); - uint32 health = uint32(107 * (me->getLevel() - 40) * 0.025f); + CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(me->GetLevel(), Info->unit_class); + uint32 health = uint32(107 * (me->GetLevel() - 40) * 0.025f); me->SetCreateHealth(health); for (uint8 stat = 0; stat < MAX_STATS; ++stat) diff --git a/src/server/scripts/Pet/pet_priest.cpp b/src/server/scripts/Pet/pet_priest.cpp index 1f6b2f964..d3f56a7c8 100644 --- a/src/server/scripts/Pet/pet_priest.cpp +++ b/src/server/scripts/Pet/pet_priest.cpp @@ -45,7 +45,7 @@ struct npc_pet_pri_lightwell : public TotemAI uint32 hp = uint32(owner->GetMaxHealth() * 0.3f); me->SetMaxHealth(hp); me->SetHealth(hp); - me->SetLevel(owner->getLevel()); + me->SetLevel(owner->GetLevel()); } me->CastSpell(me, SPELL_PRIEST_LIGHTWELL_CHARGES, false); // Spell for Lightwell Charges diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 69bb30523..36e32aca6 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -149,7 +149,7 @@ class spell_dk_raise_ally : public SpellScript if (Unit* ghoul = unitTarget->GetCharm()) { //health, mana, armor and resistance - PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(ghoul->GetEntry(), ghoul->getLevel()); + PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(ghoul->GetEntry(), ghoul->GetLevel()); if (pInfo) // exist in DB { ghoul->SetCreateHealth(pInfo->health); @@ -159,8 +159,8 @@ class spell_dk_raise_ally : public SpellScript ghoul->SetCreateStat(Stats(stat), float(pInfo->stats[stat])); } - ghoul->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(ghoul->getLevel() - (ghoul->getLevel() / 4))); - ghoul->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(ghoul->getLevel() + (ghoul->getLevel() / 4))); + ghoul->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(ghoul->GetLevel() - (ghoul->GetLevel() / 4))); + ghoul->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(ghoul->GetLevel() + (ghoul->GetLevel() / 4))); // Avoidance, Night of the Dead if (Aura* aur = ghoul->AddAura(62137, ghoul)) diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 7bbd294ff..d54ded1fe 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -273,10 +273,10 @@ class spell_gen_reduced_above_60 : public SpellScript void RecalculateDamage() { if (Unit* target = GetHitUnit()) - if (target->getLevel() > 60) + if (target->GetLevel() > 60) { int32 damage = GetHitDamage(); - AddPct(damage, -4 * int8(std::min(target->getLevel(), uint8(85)) - 60)); // prevents reduce by more than 100% + AddPct(damage, -4 * int8(std::min(target->GetLevel(), uint8(85)) - 60)); // prevents reduce by more than 100% SetHitDamage(damage); } } @@ -294,8 +294,8 @@ class spell_gen_reduced_above_60_aura : public AuraScript void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) { if (Unit* owner = GetUnitOwner()) - if (owner->getLevel() > 60) - AddPct(amount, -4 * int8(std::min(owner->getLevel(), uint8(85)) - 60)); // prevents reduce by more than 100% + if (owner->GetLevel() > 60) + AddPct(amount, -4 * int8(std::min(owner->GetLevel(), uint8(85)) - 60)); // prevents reduce by more than 100% } void Register() override @@ -417,7 +417,7 @@ public: SpellCastResult CheckRequirement() { if (Unit* target = GetExplTargetUnit()) - if (target->getLevel() >= _level) + if (target->GetLevel() >= _level) return SPELL_FAILED_DONT_REPORT; return SPELL_CAST_OK; @@ -587,8 +587,8 @@ class spell_gen_disabled_above_63 : public AuraScript void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) { Unit* target = GetUnitOwner(); - if (target->getLevel() <= 63) - amount = amount * target->getLevel() / 60; + if (target->GetLevel() <= 63) + amount = amount * target->GetLevel() / 60; else SetDuration(1); } @@ -693,7 +693,7 @@ class spell_gen_use_spell_base_level_check : public SpellScript SpellCastResult CheckRequirement() { - if (GetCaster()->getLevel() < GetSpellInfo()->BaseLevel) + if (GetCaster()->GetLevel() < GetSpellInfo()->BaseLevel) return SPELL_FAILED_LEVEL_REQUIREMENT; return SPELL_CAST_OK; } @@ -857,7 +857,7 @@ class spell_gen_proc_above_75 : public SpellScript SpellCastResult CheckLevel() { Unit* caster = GetCaster(); - if (caster->getLevel() < 75) + if (caster->GetLevel() < 75) { return SPELL_FAILED_LOWLEVEL; } @@ -934,8 +934,8 @@ class spell_gen_proc_reduced_above_60 : public AuraScript bool CheckProc(ProcEventInfo& eventInfo) { // Xinef: mostly its 33.(3)% reduce by 70 and 66.(6)% by 80 - if (eventInfo.GetActor() && eventInfo.GetActor()->getLevel() > 60) - if (roll_chance_f((eventInfo.GetActor()->getLevel() - 60) * 3.33f)) + if (eventInfo.GetActor() && eventInfo.GetActor()->GetLevel() > 60) + if (roll_chance_f((eventInfo.GetActor()->GetLevel() - 60) * 3.33f)) return false; return true; diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index bead12996..361785e6e 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -950,7 +950,7 @@ class spell_hun_tame_beast : public SpellScript if (Creature* target = GetExplTargetUnit()->ToCreature()) { - if (target->getLevel() > player->getLevel()) + if (target->GetLevel() > player->GetLevel()) { player->SendTameFailure(PET_TAME_TOO_HIGHLEVEL); return SPELL_FAILED_DONT_REPORT; diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 285995658..c085e64cf 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -123,10 +123,10 @@ class spell_item_mind_amplify_dish : public SpellScript return; if (GetSpellInfo()->Id != SPELL_AMPLIFY_10S) - if (target->getLevel() > 60) + if (target->GetLevel() > 60) return; - uint8 pct = std::max(0, 20 + player->getLevel() - target->getLevel()); + uint8 pct = std::max(0, 20 + player->GetLevel() - target->GetLevel()); if (roll_chance_i(pct)) player->CastSpell(target, SPELL_MENTAL_BATTLE, true); else if (roll_chance_i(pct)) @@ -156,7 +156,7 @@ class spell_item_runescroll_of_fortitude : public SpellScript if (Unit* target = GetHitUnit()) { - if (target->getLevel() < 70) + if (target->GetLevel() < 70) return; target->CastSpell(target, SPELL_FORTITUDE, true); @@ -264,7 +264,7 @@ class spell_item_with_mount_speed : public AuraScript void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { Unit* target = GetTarget(); - if (target->getLevel() <= 70) + if (target->GetLevel() <= 70) { if (auto spellId = getMountSpellId()) { @@ -297,9 +297,9 @@ class spell_item_magic_dust : public SpellScript { if (Unit* target = GetHitUnit()) { - if (target->getLevel() >= 30) + if (target->GetLevel() >= 30) { - uint8 chance = 100 - std::min(100, target->getLevel() - 30 * urand(3, 10)); + uint8 chance = 100 - std::min(100, target->GetLevel() - 30 * urand(3, 10)); if (!roll_chance_i(chance)) { PreventHitAura(); @@ -1362,7 +1362,7 @@ class spell_item_arcane_shroud : public AuraScript void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) { - int32 diff = GetUnitOwner()->getLevel() - 60; + int32 diff = GetUnitOwner()->GetLevel() - 60; if (diff > 0) amount += 2 * diff; } @@ -2142,7 +2142,7 @@ class spell_item_scroll_of_recall : public SpellScript break; } - if (caster->getLevel() > maxSafeLevel) + if (caster->GetLevel() > maxSafeLevel) { caster->CastSpell(caster, SPELL_LOST, true); @@ -2508,7 +2508,7 @@ class spell_item_the_eye_of_diminution : public AuraScript void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) { - int32 diff = GetUnitOwner()->getLevel() - 60; + int32 diff = GetUnitOwner()->GetLevel() - 60; if (diff > 0) amount += diff; } @@ -3745,7 +3745,7 @@ class spell_item_green_whelp_armor : public AuraScript bool CheckProc(ProcEventInfo& eventInfo) { - if (eventInfo.GetActor() && eventInfo.GetActor()->getLevel() <= 50) + if (eventInfo.GetActor() && eventInfo.GetActor()->GetLevel() <= 50) return true; return false; diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index a3588b7d1..14dfc2e24 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -337,7 +337,7 @@ private: uint32 defenseSkillValue = victim->GetDefenseSkillValue(); // Max heal when defense skill denies critical hits from raid bosses // Formula: max defense at level + 140 (raiting from gear) - uint32 reqDefForMaxHeal = victim->getLevel() * 5 + 140; + uint32 reqDefForMaxHeal = victim->GetLevel() * 5 + 140; float pctFromDefense = (defenseSkillValue >= reqDefForMaxHeal) ? 1.0f : float(defenseSkillValue) / float(reqDefForMaxHeal); diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 89624091b..c5dc9dd0c 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -203,7 +203,7 @@ class spell_pri_divine_aegis : public AuraScript if (AuraEffect const* aegis = eventInfo.GetProcTarget()->GetAuraEffect(SPELL_PRIEST_DIVINE_AEGIS, EFFECT_0)) absorb += aegis->GetAmount(); - absorb = std::min(absorb, eventInfo.GetProcTarget()->getLevel() * 125); + absorb = std::min(absorb, eventInfo.GetProcTarget()->GetLevel() * 125); GetTarget()->CastCustomSpell(SPELL_PRIEST_DIVINE_AEGIS, SPELLVALUE_BASE_POINT0, absorb, eventInfo.GetProcTarget(), true, nullptr, aurEff); } diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index 202331f59..fff776729 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -255,11 +255,11 @@ public: bool OnCastItemCombatSpell(Player* /*player*/, Unit* victim, SpellInfo const* /*spellInfo*/, Item* /*item*/) override { // spell proc chance gets severely reduced on victims > 60 (formula unknown) - if (victim->getLevel() > 60) + if (victim->GetLevel() > 60) { // gives ~0.1% proc chance at lvl 70 float const lvlPenaltyFactor = 9.93f; - float const failureChance = (victim->getLevel() - 60) * lvlPenaltyFactor; + float const failureChance = (victim->GetLevel() - 60) * lvlPenaltyFactor; // base ppm chance was already rolled, only roll success chance return !roll_chance_f(failureChance); diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 81291031e..5dadc63de 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -273,7 +273,7 @@ int32 DoHighUnlearnCost(Player* /*player*/) //tailor, alchemy int32 DoMedUnlearnCost(Player* player) //blacksmith, leatherwork { - uint8 level = player->getLevel(); + uint8 level = player->GetLevel(); if (level < 51) return 250000; else if (level < 66) @@ -284,7 +284,7 @@ int32 DoMedUnlearnCost(Player* player) //blacksmith, leather int32 DoLowUnlearnCost(Player* player) //blacksmith { - uint8 level = player->getLevel(); + uint8 level = player->GetLevel(); if (level < 66) return 50000; else @@ -486,7 +486,7 @@ public: if (creature->IsTrainer()) AddGossipItemFor(player, GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); - if (player->HasSkill(SKILL_ALCHEMY) && player->GetBaseSkillValue(SKILL_ALCHEMY) >= 350 && player->getLevel() > 67) + if (player->HasSkill(SKILL_ALCHEMY) && player->GetBaseSkillValue(SKILL_ALCHEMY) >= 350 && player->GetLevel() > 67) { if (player->GetQuestRewardStatus(Q_MASTER_TRANSMUTE) || player->GetQuestRewardStatus(Q_MASTER_ELIXIR) || player->GetQuestRewardStatus(Q_MASTER_POTION)) { @@ -683,7 +683,7 @@ public: } } //WEAPONSMITH SPEC - if (player->HasSpell(S_WEAPON) && player->getLevel() > 49 && player->GetBaseSkillValue(SKILL_BLACKSMITHING) >= 250) + if (player->HasSpell(S_WEAPON) && player->GetLevel() > 49 && player->GetBaseSkillValue(SKILL_BLACKSMITHING) >= 250) { switch (creatureId) { @@ -992,7 +992,7 @@ public: player->PrepareQuestMenu(creature->GetGUID()); } - if (player->HasSkill(SKILL_LEATHERWORKING) && player->GetBaseSkillValue(SKILL_LEATHERWORKING) >= 225 && player->getLevel() > 40) + if (player->HasSkill(SKILL_LEATHERWORKING) && player->GetBaseSkillValue(SKILL_LEATHERWORKING) >= 225 && player->GetLevel() > 40) { switch (creature->GetEntry()) { @@ -1085,7 +1085,7 @@ public: AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); //TAILORING SPEC - if (player->HasSkill(SKILL_TAILORING) && player->GetBaseSkillValue(SKILL_TAILORING) >= 350 && player->getLevel() > 59) + if (player->HasSkill(SKILL_TAILORING) && player->GetBaseSkillValue(SKILL_TAILORING) >= 350 && player->GetLevel() > 59) { if (player->GetQuestRewardStatus(10831) || player->GetQuestRewardStatus(10832) || player->GetQuestRewardStatus(10833)) { @@ -1247,7 +1247,7 @@ public: bool OnGossipHello(Player* player, GameObject* gameobject) override { //ENGINEERING SPEC - if (player->HasSkill(SKILL_ENGINEERING) && player->GetBaseSkillValue(SKILL_ENGINEERING) >= 225 && player->getLevel() >= 35) + if (player->HasSkill(SKILL_ENGINEERING) && player->GetBaseSkillValue(SKILL_ENGINEERING) >= 225 && player->GetLevel() >= 35) { if (player->GetQuestRewardStatus(3643) || player->GetQuestRewardStatus(3641) || player->GetQuestRewardStatus(3639)) { @@ -1268,7 +1268,7 @@ public: } //LEATHERWORKING SPEC - if (player->HasSkill(SKILL_LEATHERWORKING) && player->GetBaseSkillValue(SKILL_LEATHERWORKING) >= 225 && player->getLevel() >= 40) + if (player->HasSkill(SKILL_LEATHERWORKING) && player->GetBaseSkillValue(SKILL_LEATHERWORKING) >= 225 && player->GetLevel() >= 40) { if (!HasLeatherSpecialty(player) && (player->GetQuestRewardStatus(5141) || player->GetQuestRewardStatus(5143) || player->GetQuestRewardStatus(5144) || player->GetQuestRewardStatus(5145) || player->GetQuestRewardStatus(5146) || player->GetQuestRewardStatus(5148))) { diff --git a/src/server/scripts/World/player_scripts.cpp b/src/server/scripts/World/player_scripts.cpp index b42c4dd1e..cc98f2b37 100644 --- a/src/server/scripts/World/player_scripts.cpp +++ b/src/server/scripts/World/player_scripts.cpp @@ -34,7 +34,7 @@ public: { if (quest->GetQuestId() == QUEST_APPRENTICE_ANGLER) { - uint32 level = player->getLevel(); + uint32 level = player->GetLevel(); int32 moneyRew = 0; if (level <= 10) moneyRew = 85; From 8448996639a8fe17704829486caf117835f3eba2 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 1 Jan 2023 12:49:47 +0100 Subject: [PATCH 20/66] =?UTF-8?q?fix(Core/Spells):=20Fixed=20Hunter's=20Ma?= =?UTF-8?q?rk=20not=20being=20casted=20by=20Swamplord=20M=E2=80=A6=20(#144?= =?UTF-8?q?57)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/Spells): Fixed Hunter's Mark not being casted by Swamplord Musel'ek. Fixes #13993 --- src/server/game/Spells/SpellInfoCorrections.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 18fdefb60..febeb19a9 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4455,6 +4455,16 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->Effects[EFFECT_0].TargetB = TARGET_DEST_CASTER; }); + // Hunter's Mark + ApplySpellFix({ 31615 }, [](SpellInfo* spellInfo) + { + for (uint8 index = EFFECT_0; index <= EFFECT_1; ++index) + { + spellInfo->Effects[index].TargetA = TARGET_UNIT_TARGET_ENEMY; + spellInfo->Effects[index].TargetB = 0; + } + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; From a9bc936b4f83986d4a9bc0d467be7bc5c8d89aaa Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 1 Jan 2023 12:50:06 +0100 Subject: [PATCH 21/66] =?UTF-8?q?fix(DB/SAI):=20Swamplord=20Musel'ek's=20A?= =?UTF-8?q?imed=20Shot=20should=20not=20be=20interrupte=E2=80=A6=20(#14455?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(DB/SAI): Swamplord Musel'ek's Aimed Shot should not be interrupted by anything. Fixes #13994 --- data/sql/updates/pending_db_world/rev_1672569382741536400.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1672569382741536400.sql diff --git a/data/sql/updates/pending_db_world/rev_1672569382741536400.sql b/data/sql/updates/pending_db_world/rev_1672569382741536400.sql new file mode 100644 index 000000000..1e87ad5ac --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672569382741536400.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=17826 AND `source_type`=0 AND `id` IN (1,2); From fe3487f07872366ee338814a9e4bc407c441a069 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 1 Jan 2023 12:50:24 +0100 Subject: [PATCH 22/66] fix(DB/SAI): Swamplord Musel'ek should yell when Claw is enraged. (#14454) Fixes #13996 --- .../sql/updates/pending_db_world/rev_1672568748762669000.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1672568748762669000.sql diff --git a/data/sql/updates/pending_db_world/rev_1672568748762669000.sql b/data/sql/updates/pending_db_world/rev_1672568748762669000.sql new file mode 100644 index 000000000..08bccd305 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672568748762669000.sql @@ -0,0 +1,5 @@ +-- +UPDATE `smart_scripts` SET `link`=9 WHERE `entryorguid`=17827 AND `source_type`=0 AND `id`=2; +DELETE FROM `smart_scripts` WHERE `entryorguid`=17827 AND `source_type`=0 AND `id`=9; +INSERT INTO `smart_scripts` VALUES +(17827,0,9,0,61,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,19,17826,100,0,0,0,0,0,0,'Claw - Combat - Swamplord Musel\'ek Say 0'); From 254ead6df4d31e681d03fbcc070dcead984e96f1 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 1 Jan 2023 11:52:34 +0000 Subject: [PATCH 23/66] chore(DB): import pending files Referenced commit(s): fe3487f07872366ee338814a9e4bc407c441a069 --- .../rev_1672568748762669000.sql => db_world/2023_01_01_00.sql} | 1 + .../rev_1672569382741536400.sql => db_world/2023_01_01_01.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1672568748762669000.sql => db_world/2023_01_01_00.sql} (88%) rename data/sql/updates/{pending_db_world/rev_1672569382741536400.sql => db_world/2023_01_01_01.sql} (71%) diff --git a/data/sql/updates/pending_db_world/rev_1672568748762669000.sql b/data/sql/updates/db_world/2023_01_01_00.sql similarity index 88% rename from data/sql/updates/pending_db_world/rev_1672568748762669000.sql rename to data/sql/updates/db_world/2023_01_01_00.sql index 08bccd305..cf63d3c5f 100644 --- a/data/sql/updates/pending_db_world/rev_1672568748762669000.sql +++ b/data/sql/updates/db_world/2023_01_01_00.sql @@ -1,3 +1,4 @@ +-- DB update 2022_12_31_02 -> 2023_01_01_00 -- UPDATE `smart_scripts` SET `link`=9 WHERE `entryorguid`=17827 AND `source_type`=0 AND `id`=2; DELETE FROM `smart_scripts` WHERE `entryorguid`=17827 AND `source_type`=0 AND `id`=9; diff --git a/data/sql/updates/pending_db_world/rev_1672569382741536400.sql b/data/sql/updates/db_world/2023_01_01_01.sql similarity index 71% rename from data/sql/updates/pending_db_world/rev_1672569382741536400.sql rename to data/sql/updates/db_world/2023_01_01_01.sql index 1e87ad5ac..4d9f2fc38 100644 --- a/data/sql/updates/pending_db_world/rev_1672569382741536400.sql +++ b/data/sql/updates/db_world/2023_01_01_01.sql @@ -1,2 +1,3 @@ +-- DB update 2023_01_01_00 -> 2023_01_01_01 -- UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=17826 AND `source_type`=0 AND `id` IN (1,2); From 9dcd475a3b9ed224e6ac1727836093a773d2a5cc Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 1 Jan 2023 15:06:21 +0100 Subject: [PATCH 24/66] chore(Docs): New Year (#14459) --- AUTHORS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index cae1f1485..ebf2b5f8a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -16,7 +16,7 @@ Development of this project dates back to 2004, and was developed under various * SD2 project, 2008-2009, located at http://www.scriptdev2.com/ * TrinityCore, 2008-2012, located at https://www.trinitycore.org/ * SunwellCore 2012-2016, privately developed, more info at https://www.azerothcore.org/pages/sunwell.pl/ -* AzerothCore, 2016-2022, located at https://www.azerothcore.org/ +* AzerothCore, 2016-2023, located at https://www.azerothcore.org/ ## Authorship of the code Authorship is assigned for each commit within the git history, which is stored in these git repositories: From 234b2fb60f887e50bbb8518d4a1e3eab05ed4a18 Mon Sep 17 00:00:00 2001 From: Samsequel <20357406+Samsequel@users.noreply.github.com> Date: Sun, 1 Jan 2023 18:11:53 +0100 Subject: [PATCH 25/66] fix(DB/Loot): Prospecting Adamantite adjustment (#14456) --- data/sql/updates/pending_db_world/prospectada.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 data/sql/updates/pending_db_world/prospectada.sql diff --git a/data/sql/updates/pending_db_world/prospectada.sql b/data/sql/updates/pending_db_world/prospectada.sql new file mode 100644 index 000000000..a3c34b05a --- /dev/null +++ b/data/sql/updates/pending_db_world/prospectada.sql @@ -0,0 +1,7 @@ +-- +DELETE FROM `prospecting_loot_template` WHERE (`Entry` = 23425); +INSERT INTO `prospecting_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(23425, 1, 13001, 100, 0, 1, 1, 1, 1, '(ReferenceTable)'), +(23425, 2, 13002, 24, 0, 1, 1, 1, 1, '(ReferenceTable)'), +(23425, 3, 13001, 15, 0, 1, 1, 1, 1, '(ReferenceTable)'), +(23425, 24243, 0, 100, 0, 1, 0, 1, 1, 'Adamantite Powder'); From ade2b4cddf6168c2974359463e31b26cdc0f4099 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 1 Jan 2023 17:13:56 +0000 Subject: [PATCH 26/66] chore(DB): import pending files Referenced commit(s): 234b2fb60f887e50bbb8518d4a1e3eab05ed4a18 --- .../prospectada.sql => db_world/2023_01_01_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/prospectada.sql => db_world/2023_01_01_02.sql} (91%) diff --git a/data/sql/updates/pending_db_world/prospectada.sql b/data/sql/updates/db_world/2023_01_01_02.sql similarity index 91% rename from data/sql/updates/pending_db_world/prospectada.sql rename to data/sql/updates/db_world/2023_01_01_02.sql index a3c34b05a..99699e5fc 100644 --- a/data/sql/updates/pending_db_world/prospectada.sql +++ b/data/sql/updates/db_world/2023_01_01_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_01_01_01 -> 2023_01_01_02 -- DELETE FROM `prospecting_loot_template` WHERE (`Entry` = 23425); INSERT INTO `prospecting_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES From e7a865ce6407d9b09f6d6ca4b8416d3ed6c4a6a4 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 1 Jan 2023 21:22:18 +0100 Subject: [PATCH 27/66] fix(DB/SAI): Swamplord Musel'ek prefers ranged attacks than melee. (#14463) Fixes #13990 --- data/sql/updates/pending_db_world/rev_1672587681948762700.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1672587681948762700.sql diff --git a/data/sql/updates/pending_db_world/rev_1672587681948762700.sql b/data/sql/updates/pending_db_world/rev_1672587681948762700.sql new file mode 100644 index 000000000..15a46687d --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672587681948762700.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid`=17826 AND `source_type`=0 AND `id`=15; +INSERT INTO `smart_scripts` VALUES +(17826,0,15,0,0,0,100,0,0,0,2000,2500,0,11,22907,64,0,0,0,0,2,0,0,0,0,0,0,0,0,'Swamplord Musel\'ek - In Combat - Cast Shoot'); From 740439e27bdba0f28338d96d4b4938bd928f390a Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 1 Jan 2023 20:24:30 +0000 Subject: [PATCH 28/66] chore(DB): import pending files Referenced commit(s): e7a865ce6407d9b09f6d6ca4b8416d3ed6c4a6a4 --- .../rev_1672587681948762700.sql => db_world/2023_01_01_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1672587681948762700.sql => db_world/2023_01_01_03.sql} (85%) diff --git a/data/sql/updates/pending_db_world/rev_1672587681948762700.sql b/data/sql/updates/db_world/2023_01_01_03.sql similarity index 85% rename from data/sql/updates/pending_db_world/rev_1672587681948762700.sql rename to data/sql/updates/db_world/2023_01_01_03.sql index 15a46687d..98804e99e 100644 --- a/data/sql/updates/pending_db_world/rev_1672587681948762700.sql +++ b/data/sql/updates/db_world/2023_01_01_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_01_01_02 -> 2023_01_01_03 -- DELETE FROM `smart_scripts` WHERE `entryorguid`=17826 AND `source_type`=0 AND `id`=15; INSERT INTO `smart_scripts` VALUES From e8de2fb519effd29fcf9f5af3aed0b8c03606208 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 1 Jan 2023 21:54:24 +0100 Subject: [PATCH 29/66] =?UTF-8?q?fix(DB/SAI):=20Murkblood=20Spearman's=20V?= =?UTF-8?q?iper=20Sting=20should=20be=20casted=20only=20o=E2=80=A6=20(#144?= =?UTF-8?q?65)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(DB/SAI): Murkblood Spearman's Viper Sting should be casted only on targets with mana. Fixes #13980 --- data/sql/updates/pending_db_world/rev_1672595110750520000.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1672595110750520000.sql diff --git a/data/sql/updates/pending_db_world/rev_1672595110750520000.sql b/data/sql/updates/pending_db_world/rev_1672595110750520000.sql new file mode 100644 index 000000000..8c44456cd --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672595110750520000.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `target_param3`=1 WHERE `entryorguid`=17729 AND `source_type`=0 AND `id` IN (3,4); From ca1a0960d65865e07f893944dfe2f6462baf5408 Mon Sep 17 00:00:00 2001 From: Samsequel <20357406+Samsequel@users.noreply.github.com> Date: Sun, 1 Jan 2023 21:55:35 +0100 Subject: [PATCH 30/66] fix(DB/loot): Nagrand gold drop fixes (#14462) * fix(DB/loot): Nagrand gold drop fixes * windyreed * boulderfist mage / warrior * warmaul reaver / shaman * warmaul brute / warlock * Murkblood * agitated orc spirit * Vir'aani and Voidspawn * oshu'gun --- .../pending_db_world/nagrandgoldfix.sql | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 data/sql/updates/pending_db_world/nagrandgoldfix.sql diff --git a/data/sql/updates/pending_db_world/nagrandgoldfix.sql b/data/sql/updates/pending_db_world/nagrandgoldfix.sql new file mode 100644 index 000000000..07a7fcc2e --- /dev/null +++ b/data/sql/updates/pending_db_world/nagrandgoldfix.sql @@ -0,0 +1,23 @@ +-- +UPDATE `creature_template` SET `mingold` = 256, `maxgold` = 1723 WHERE (`entry` = 17135); +UPDATE `creature_template` SET `mingold` = 274, `maxgold` = 1565 WHERE (`entry` = 17134); +UPDATE `creature_template` SET `mingold` = 270, `maxgold` = 1554 WHERE (`entry` = 17139); +UPDATE `creature_template` SET `mingold` = 303, `maxgold` = 1628 WHERE (`entry` = 17141); +UPDATE `creature_template` SET `mingold` = 545, `maxgold` = 1838 WHERE (`entry` = 17136); +UPDATE `creature_template` SET `mingold` = 266, `maxgold` = 1715 WHERE (`entry` = 17137); +UPDATE `creature_template` SET `mingold` = 407, `maxgold` = 1582 WHERE (`entry` = 18064); +UPDATE `creature_template` SET `mingold` = 341, `maxgold` = 1716 WHERE (`entry` = 17138); +UPDATE `creature_template` SET `mingold` = 457, `maxgold` = 1743 WHERE (`entry` = 18065); +UPDATE `creature_template` SET `mingold` = 280, `maxgold` = 1639 WHERE (`entry` = 18037); +UPDATE `creature_template` SET `mingold` = 323, `maxgold` = 1353 WHERE (`entry` = 18211); +UPDATE `creature_template` SET `mingold` = 297, `maxgold` = 1703 WHERE (`entry` = 18202); +UPDATE `creature_template` SET `mingold` = 107, `maxgold` = 459 WHERE (`entry` = 18207); +UPDATE `creature_template` SET `mingold` = 497, `maxgold` = 1814 WHERE (`entry` = 18203); +UPDATE `creature_template` SET `mingold` = 763, `maxgold` = 1101 WHERE (`entry` = 18204); +UPDATE `creature_template` SET `mingold` = 286, `maxgold` = 1940 WHERE (`entry` = 18043); +UPDATE `creature_template` SET `mingold` = 555, `maxgold` = 1712 WHERE (`entry` = 17149); +UPDATE `creature_template` SET `mingold` = 373, `maxgold` = 1844 WHERE (`entry` = 17150); +UPDATE `creature_template` SET `mingold` = 359, `maxgold` = 1721 WHERE (`entry` = 17981); +UPDATE `creature_template` SET `mingold` = 390, `maxgold` = 2052 WHERE (`entry` = 18658); +UPDATE `creature_template` SET `mingold` = 332, `maxgold` = 739 WHERE (`entry` = 18660); +UPDATE `creature_template` SET `mingold` = 318, `maxgold` = 2054 WHERE (`entry` = 18661); From 626e68fdc05b041baf93944c43372cd64be37fdb Mon Sep 17 00:00:00 2001 From: Samsequel <20357406+Samsequel@users.noreply.github.com> Date: Sun, 1 Jan 2023 21:57:14 +0100 Subject: [PATCH 31/66] fix(DB/Loot): Auchenai Death-Speaker/Doomsayer money drop (#14461) --- .../updates/pending_db_world/auchenaideathspeakerdoomsayer.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/sql/updates/pending_db_world/auchenaideathspeakerdoomsayer.sql diff --git a/data/sql/updates/pending_db_world/auchenaideathspeakerdoomsayer.sql b/data/sql/updates/pending_db_world/auchenaideathspeakerdoomsayer.sql new file mode 100644 index 000000000..dad95b290 --- /dev/null +++ b/data/sql/updates/pending_db_world/auchenaideathspeakerdoomsayer.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature_template` SET `mingold` = 270, `maxgold` = 1611 WHERE (`entry` = 21285); +UPDATE `creature_template` SET `mingold` = 259, `maxgold` = 1547 WHERE (`entry` = 21242); From 4d16ff472b74869612ad760ee7ad9baac57c7355 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 1 Jan 2023 20:59:15 +0000 Subject: [PATCH 32/66] chore(DB): import pending files Referenced commit(s): 626e68fdc05b041baf93944c43372cd64be37fdb --- .../2023_01_01_04.sql} | 1 + .../nagrandgoldfix.sql => db_world/2023_01_01_05.sql} | 1 + .../rev_1672595110750520000.sql => db_world/2023_01_01_06.sql} | 1 + 3 files changed, 3 insertions(+) rename data/sql/updates/{pending_db_world/auchenaideathspeakerdoomsayer.sql => db_world/2023_01_01_04.sql} (80%) rename data/sql/updates/{pending_db_world/nagrandgoldfix.sql => db_world/2023_01_01_05.sql} (97%) rename data/sql/updates/{pending_db_world/rev_1672595110750520000.sql => db_world/2023_01_01_06.sql} (71%) diff --git a/data/sql/updates/pending_db_world/auchenaideathspeakerdoomsayer.sql b/data/sql/updates/db_world/2023_01_01_04.sql similarity index 80% rename from data/sql/updates/pending_db_world/auchenaideathspeakerdoomsayer.sql rename to data/sql/updates/db_world/2023_01_01_04.sql index dad95b290..6eed0fa72 100644 --- a/data/sql/updates/pending_db_world/auchenaideathspeakerdoomsayer.sql +++ b/data/sql/updates/db_world/2023_01_01_04.sql @@ -1,3 +1,4 @@ +-- DB update 2023_01_01_03 -> 2023_01_01_04 -- UPDATE `creature_template` SET `mingold` = 270, `maxgold` = 1611 WHERE (`entry` = 21285); UPDATE `creature_template` SET `mingold` = 259, `maxgold` = 1547 WHERE (`entry` = 21242); diff --git a/data/sql/updates/pending_db_world/nagrandgoldfix.sql b/data/sql/updates/db_world/2023_01_01_05.sql similarity index 97% rename from data/sql/updates/pending_db_world/nagrandgoldfix.sql rename to data/sql/updates/db_world/2023_01_01_05.sql index 07a7fcc2e..2cdeaafb2 100644 --- a/data/sql/updates/pending_db_world/nagrandgoldfix.sql +++ b/data/sql/updates/db_world/2023_01_01_05.sql @@ -1,3 +1,4 @@ +-- DB update 2023_01_01_04 -> 2023_01_01_05 -- UPDATE `creature_template` SET `mingold` = 256, `maxgold` = 1723 WHERE (`entry` = 17135); UPDATE `creature_template` SET `mingold` = 274, `maxgold` = 1565 WHERE (`entry` = 17134); diff --git a/data/sql/updates/pending_db_world/rev_1672595110750520000.sql b/data/sql/updates/db_world/2023_01_01_06.sql similarity index 71% rename from data/sql/updates/pending_db_world/rev_1672595110750520000.sql rename to data/sql/updates/db_world/2023_01_01_06.sql index 8c44456cd..d6eab093c 100644 --- a/data/sql/updates/pending_db_world/rev_1672595110750520000.sql +++ b/data/sql/updates/db_world/2023_01_01_06.sql @@ -1,2 +1,3 @@ +-- DB update 2023_01_01_05 -> 2023_01_01_06 -- UPDATE `smart_scripts` SET `target_param3`=1 WHERE `entryorguid`=17729 AND `source_type`=0 AND `id` IN (3,4); From a8e17946fb5968f1c61e965c804e6903053f3712 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 1 Jan 2023 22:33:05 +0100 Subject: [PATCH 33/66] fix(DB/SAI): Fen Ray should cast Psychic Horror on random target. (#14464) Fixes #13981 --- data/sql/updates/pending_db_world/rev_1672587966569522600.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1672587966569522600.sql diff --git a/data/sql/updates/pending_db_world/rev_1672587966569522600.sql b/data/sql/updates/pending_db_world/rev_1672587966569522600.sql new file mode 100644 index 000000000..a14068d92 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672587966569522600.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `target_type`=5 WHERE `entryorguid`=17731 AND `source_type`=0 AND `id`=0; From 63ae11ae7c96d9af88974289b9134f04b57b52a6 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 1 Jan 2023 21:34:59 +0000 Subject: [PATCH 34/66] chore(DB): import pending files Referenced commit(s): a8e17946fb5968f1c61e965c804e6903053f3712 --- .../rev_1672587966569522600.sql => db_world/2023_01_01_07.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1672587966569522600.sql => db_world/2023_01_01_07.sql} (70%) diff --git a/data/sql/updates/pending_db_world/rev_1672587966569522600.sql b/data/sql/updates/db_world/2023_01_01_07.sql similarity index 70% rename from data/sql/updates/pending_db_world/rev_1672587966569522600.sql rename to data/sql/updates/db_world/2023_01_01_07.sql index a14068d92..e61b38eb4 100644 --- a/data/sql/updates/pending_db_world/rev_1672587966569522600.sql +++ b/data/sql/updates/db_world/2023_01_01_07.sql @@ -1,2 +1,3 @@ +-- DB update 2023_01_01_06 -> 2023_01_01_07 -- UPDATE `smart_scripts` SET `target_type`=5 WHERE `entryorguid`=17731 AND `source_type`=0 AND `id`=0; From f057ef6bbaa46bccb85e2b40e3c6ee70b07b8fe6 Mon Sep 17 00:00:00 2001 From: Eddy Vega <61223313+Si1ker@users.noreply.github.com> Date: Mon, 2 Jan 2023 11:35:21 -0600 Subject: [PATCH 35/66] fix(DB/smart_scripts): Fix Crypt Guard's Acid Spit (#14132) Create update-crypt-guard.sql --- data/sql/updates/pending_db_world/update-crypt-guard.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/sql/updates/pending_db_world/update-crypt-guard.sql diff --git a/data/sql/updates/pending_db_world/update-crypt-guard.sql b/data/sql/updates/pending_db_world/update-crypt-guard.sql new file mode 100644 index 000000000..6804de484 --- /dev/null +++ b/data/sql/updates/pending_db_world/update-crypt-guard.sql @@ -0,0 +1,3 @@ +-- +UPDATE `smart_scripts` SET `target_type`=2, `comment`='Crypt Guard - In Combat - CastVictim Acid Spit' WHERE `entryorguid`=16573 AND `source_type`=0 AND `id` IN (1,2) AND `link`=0; + From e6ba4084440e362991ef516373df3c5453fa7dda Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Mon, 2 Jan 2023 17:37:25 +0000 Subject: [PATCH 36/66] chore(DB): import pending files Referenced commit(s): f057ef6bbaa46bccb85e2b40e3c6ee70b07b8fe6 --- .../update-crypt-guard.sql => db_world/2023_01_02_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/update-crypt-guard.sql => db_world/2023_01_02_00.sql} (80%) diff --git a/data/sql/updates/pending_db_world/update-crypt-guard.sql b/data/sql/updates/db_world/2023_01_02_00.sql similarity index 80% rename from data/sql/updates/pending_db_world/update-crypt-guard.sql rename to data/sql/updates/db_world/2023_01_02_00.sql index 6804de484..7c591bdf7 100644 --- a/data/sql/updates/pending_db_world/update-crypt-guard.sql +++ b/data/sql/updates/db_world/2023_01_02_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_01_01_07 -> 2023_01_02_00 -- UPDATE `smart_scripts` SET `target_type`=2, `comment`='Crypt Guard - In Combat - CastVictim Acid Spit' WHERE `entryorguid`=16573 AND `source_type`=0 AND `id` IN (1,2) AND `link`=0; From cef8d8705ebee8e567934c36d117b6c57f1ea6df Mon Sep 17 00:00:00 2001 From: neifion-00000000 <91289495+neifion-00000000@users.noreply.github.com> Date: Mon, 2 Jan 2023 12:38:39 -0600 Subject: [PATCH 37/66] fix(DB/npc_vendor): Improve a few TBC Vendor Recipe Rates (#14472) * fix(DB/npc_vendor): Improve a few TBC Vendor Recipe Rates * Update rev_1672683380617865400.sql bloopers removed * Update data/sql/updates/pending_db_world/rev_1672683380617865400.sql Co-authored-by: Gultask <100873791+Gultask@users.noreply.github.com> Co-authored-by: Gultask <100873791+Gultask@users.noreply.github.com> --- .../updates/pending_db_world/rev_1672683380617865400.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1672683380617865400.sql diff --git a/data/sql/updates/pending_db_world/rev_1672683380617865400.sql b/data/sql/updates/pending_db_world/rev_1672683380617865400.sql new file mode 100644 index 000000000..0729900de --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672683380617865400.sql @@ -0,0 +1,6 @@ +-- +-- Recipe: Elixir of Major Frost Power +UPDATE `npc_vendor` SET `incrtime`=1800 WHERE `entry` IN (18005, 18017) AND `item`=22902 AND `ExtendedCost`=0; + +-- Tailoring Recipes off Aarond +UPDATE `npc_vendor` SET `incrtime`=1800 WHERE `entry`=19521 AND `item` IN (21900, 21901) AND `ExtendedCost`=0; From 26b36a5af10ca18303f5a639d532b418d14a30b7 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Mon, 2 Jan 2023 19:39:31 +0100 Subject: [PATCH 38/66] =?UTF-8?q?fix(DB/SAI):=20Nexus=20Terror's=20Death?= =?UTF-8?q?=20Coil=20should=20be=20casted=20only=20on=20Hero=E2=80=A6=20(#?= =?UTF-8?q?14449)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(DB/SAI): Nexus Terror's Death Coild should be casted only on Heroic difficulty. Fixes #14298 --- data/sql/updates/pending_db_world/rev_1672492892779867100.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1672492892779867100.sql diff --git a/data/sql/updates/pending_db_world/rev_1672492892779867100.sql b/data/sql/updates/pending_db_world/rev_1672492892779867100.sql new file mode 100644 index 000000000..dcdff61f1 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672492892779867100.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `event_flags`=4 WHERE `entryorguid`=19307 AND `source_type`=0 AND `id`=2; From 0dec381997b638cade7b1436707134b00d72f144 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Mon, 2 Jan 2023 18:41:35 +0000 Subject: [PATCH 39/66] chore(DB): import pending files Referenced commit(s): 26b36a5af10ca18303f5a639d532b418d14a30b7 --- .../rev_1672492892779867100.sql => db_world/2023_01_02_01.sql} | 1 + .../rev_1672683380617865400.sql => db_world/2023_01_02_02.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1672492892779867100.sql => db_world/2023_01_02_01.sql} (70%) rename data/sql/updates/{pending_db_world/rev_1672683380617865400.sql => db_world/2023_01_02_02.sql} (87%) diff --git a/data/sql/updates/pending_db_world/rev_1672492892779867100.sql b/data/sql/updates/db_world/2023_01_02_01.sql similarity index 70% rename from data/sql/updates/pending_db_world/rev_1672492892779867100.sql rename to data/sql/updates/db_world/2023_01_02_01.sql index dcdff61f1..6d3725cd2 100644 --- a/data/sql/updates/pending_db_world/rev_1672492892779867100.sql +++ b/data/sql/updates/db_world/2023_01_02_01.sql @@ -1,2 +1,3 @@ +-- DB update 2023_01_02_00 -> 2023_01_02_01 -- UPDATE `smart_scripts` SET `event_flags`=4 WHERE `entryorguid`=19307 AND `source_type`=0 AND `id`=2; diff --git a/data/sql/updates/pending_db_world/rev_1672683380617865400.sql b/data/sql/updates/db_world/2023_01_02_02.sql similarity index 87% rename from data/sql/updates/pending_db_world/rev_1672683380617865400.sql rename to data/sql/updates/db_world/2023_01_02_02.sql index 0729900de..e02a0e232 100644 --- a/data/sql/updates/pending_db_world/rev_1672683380617865400.sql +++ b/data/sql/updates/db_world/2023_01_02_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_01_02_01 -> 2023_01_02_02 -- -- Recipe: Elixir of Major Frost Power UPDATE `npc_vendor` SET `incrtime`=1800 WHERE `entry` IN (18005, 18017) AND `item`=22902 AND `ExtendedCost`=0; From 8985fe53afaa532f4a8c111bc6586f224b7d098a Mon Sep 17 00:00:00 2001 From: Asthalor <87535580+Asthalor@users.noreply.github.com> Date: Mon, 2 Jan 2023 20:25:18 +0100 Subject: [PATCH 40/66] fix(DB/Creature): Force the correct modelid on spawn of Enchanted Tiki Warriors (#12318) * fix(DB/Creature): Delete modelid2 from Enchanted Tiki Warriors * Update modelid * Better sql * Update SAI to change model on spawn --- .../sql/updates/pending_db_world/rev_1657261273976252267.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1657261273976252267.sql diff --git a/data/sql/updates/pending_db_world/rev_1657261273976252267.sql b/data/sql/updates/pending_db_world/rev_1657261273976252267.sql new file mode 100644 index 000000000..28fb59472 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1657261273976252267.sql @@ -0,0 +1,5 @@ +-- On spawn set the modelID to model 25749 to fix the golem model + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28882) AND (`source_type` = 0) AND (`id` IN (2)); +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 +(28882, 0, 2, 0, 11, 0, 100, 1, 0, 0, 0, 0, 0, 3, 0, 25749, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Enchanted Tiki Warrior - On Respawn - Morph To Model 25749 (No Repeat)'); From 8b8b75b5ce25c393fd689dd5ee7969ef67cc399e Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Mon, 2 Jan 2023 19:29:20 +0000 Subject: [PATCH 41/66] chore(DB): import pending files Referenced commit(s): 8985fe53afaa532f4a8c111bc6586f224b7d098a --- .../rev_1657261273976252267.sql => db_world/2023_01_02_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1657261273976252267.sql => db_world/2023_01_02_03.sql} (94%) diff --git a/data/sql/updates/pending_db_world/rev_1657261273976252267.sql b/data/sql/updates/db_world/2023_01_02_03.sql similarity index 94% rename from data/sql/updates/pending_db_world/rev_1657261273976252267.sql rename to data/sql/updates/db_world/2023_01_02_03.sql index 28fb59472..5dfabbe33 100644 --- a/data/sql/updates/pending_db_world/rev_1657261273976252267.sql +++ b/data/sql/updates/db_world/2023_01_02_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_01_02_02 -> 2023_01_02_03 -- On spawn set the modelID to model 25749 to fix the golem model DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28882) AND (`source_type` = 0) AND (`id` IN (2)); From af2d3a7cfc613aabf5d177d38ea25219b7c2a9e9 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Mon, 2 Jan 2023 20:36:44 +0100 Subject: [PATCH 42/66] =?UTF-8?q?fix(Core/Spells):=20Spellmods=20should=20?= =?UTF-8?q?not=20drop=20charges=20if=20not=20consumed=20b=E2=80=A6=20(#134?= =?UTF-8?q?98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/game/Entities/Player/Player.cpp | 143 ++++++++++++++++++++- src/server/game/Entities/Player/Player.h | 130 +------------------ src/server/game/Entities/Unit/Unit.cpp | 12 +- 3 files changed, 144 insertions(+), 141 deletions(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 263436076..2109d1372 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -9598,6 +9598,137 @@ bool Player::IsAffectedBySpellmod(SpellInfo const* spellInfo, SpellModifier* mod return spellInfo->IsAffectedBySpellMod(mod); } +template +void Player::ApplySpellMod(uint32 spellId, SpellModOp op, T& basevalue, Spell* spell, bool temporaryPet) +{ + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); + if (!spellInfo) + { + return; + } + + float totalmul = 1.0f; + int32 totalflat = 0; + + auto calculateSpellMod = [&](SpellModifier* mod) + { + // xinef: temporary pets cannot use charged mods of owner, needed for mirror image QQ they should use their own auras + if (temporaryPet && mod->charges != 0) + { + return; + } + + if (mod->type == SPELLMOD_FLAT) + { + // xinef: do not allow to consume more than one 100% crit increasing spell + if (mod->op == SPELLMOD_CRITICAL_CHANCE && totalflat >= 100) + { + return; + } + + int32 flatValue = mod->value; + + // SPELL_MOD_THREAT - divide by 100 (in packets we send threat * 100) + if (mod->op == SPELLMOD_THREAT) + { + flatValue /= 100; + } + + totalflat += flatValue; + } + else if (mod->type == SPELLMOD_PCT) + { + // skip percent mods for null basevalue (most important for spell mods with charges) + if (basevalue == T(0) || totalmul == 0.0f) + { + return; + } + + // special case (skip > 10sec spell casts for instant cast setting) + if (mod->op == SPELLMOD_CASTING_TIME && basevalue >= T(10000) && mod->value <= -100) + { + return; + } + // xinef: special exception for surge of light, dont affect crit chance if previous mods were not applied + else if (mod->op == SPELLMOD_CRITICAL_CHANCE && spell && !HasSpellMod(mod, spell)) + { + return; + } + // xinef: special case for backdraft gcd reduce with backlast time reduction, dont affect gcd if cast time was not applied + else if (mod->op == SPELLMOD_GLOBAL_COOLDOWN && spell && !HasSpellMod(mod, spell)) + { + return; + } + + // xinef: those two mods should be multiplicative (Glyph of Renew) + if (mod->op == SPELLMOD_DAMAGE || mod->op == SPELLMOD_DOT) + { + totalmul *= CalculatePct(1.0f, 100.0f + mod->value); + } + else + { + totalmul += CalculatePct(1.0f, mod->value); + } + } + + DropModCharge(mod, spell); + }; + + // Drop charges for triggering spells instead of triggered ones + if (m_spellModTakingSpell) + { + spell = m_spellModTakingSpell; + } + + SpellModifier* chargedMod = nullptr; + for (auto mod : m_spellMods[op]) + { + // Charges can be set only for mods with auras + if (!mod->ownerAura) + { + ASSERT(!mod->charges); + } + + if (!IsAffectedBySpellmod(spellInfo, mod, spell)) + { + continue; + } + + if (mod->ownerAura->IsUsingCharges()) + { + if (!chargedMod || (chargedMod->ownerAura->GetSpellInfo()->SpellPriority < mod->ownerAura->GetSpellInfo()->SpellPriority)) + { + chargedMod = mod; + } + + continue; + } + + calculateSpellMod(mod); + } + + if (chargedMod) + { + calculateSpellMod(chargedMod); + } + + float diff = 0.0f; + if (op == SPELLMOD_CASTING_TIME || op == SPELLMOD_DURATION) + { + diff = ((float)basevalue + totalflat) * (totalmul - 1.0f) + (float)totalflat; + } + else + { + diff = (float)basevalue * (totalmul - 1.0f) + (float)totalflat; + } + + basevalue = T((float)basevalue + diff); +} + +template AC_GAME_API void Player::ApplySpellMod(uint32 spellId, SpellModOp op, int32& basevalue, Spell* spell, bool temporaryPet); +template AC_GAME_API void Player::ApplySpellMod(uint32 spellId, SpellModOp op, uint32& basevalue, Spell* spell, bool temporaryPet); +template AC_GAME_API void Player::ApplySpellMod(uint32 spellId, SpellModOp op, float& basevalue, Spell* spell, bool temporaryPet); + // Binary predicate for sorting SpellModifiers class SpellModPred { @@ -9765,6 +9896,13 @@ void Player::RemoveSpellMods(Spell* spell) SpellModifier* mod = *itr; ++itr; + // don't handle spells with proc_event entry defined + // this is a temporary workaround, because all spellmods should be handled like that + if (sSpellMgr->GetSpellProcEvent(mod->spellId)) + { + continue; + } + // spellmods without aura set cannot be charged if (!mod->ownerAura || !mod->ownerAura->IsUsingCharges()) continue; @@ -9800,11 +9938,6 @@ void Player::RemoveSpellMods(Spell* spell) void Player::DropModCharge(SpellModifier* mod, Spell* spell) { - // don't handle spells with proc_event entry defined - // this is a temporary workaround, because all spellmods should be handled like that - if (sSpellMgr->GetSpellProcEvent(mod->spellId)) - return; - if (spell && mod->ownerAura && mod->charges > 0) { if (--mod->charges == 0) diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index e68e4b1c5..2951bb669 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1732,7 +1732,8 @@ public: void AddSpellMod(SpellModifier* mod, bool apply); bool IsAffectedBySpellmod(SpellInfo const* spellInfo, SpellModifier* mod, Spell* spell = nullptr); bool HasSpellMod(SpellModifier* mod, Spell* spell); - template T ApplySpellMod(uint32 spellId, SpellModOp op, T& basevalue, Spell* spell = nullptr, bool temporaryPet = false); + template + void ApplySpellMod(uint32 spellId, SpellModOp op, T& basevalue, Spell* spell = nullptr, bool temporaryPet = false); void RemoveSpellMods(Spell* spell); void RestoreSpellMods(Spell* spell, uint32 ownerAuraId = 0, Aura* aura = nullptr); void RestoreAllSpellMods(uint32 ownerAuraId = 0, Aura* aura = nullptr); @@ -2941,131 +2942,4 @@ private: void AddItemsSetItem(Player* player, Item* item); void RemoveItemsSetItem(Player* player, ItemTemplate const* proto); -// "the bodies of template functions must be made available in a header file" -template T Player::ApplySpellMod(uint32 spellId, SpellModOp op, T& basevalue, Spell* spell, bool temporaryPet) -{ - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); - if (!spellInfo) - { - return 0; - } - - float totalmul = 1.0f; - int32 totalflat = 0; - - auto calculateSpellMod = [&](SpellModifier* mod) - { - // xinef: temporary pets cannot use charged mods of owner, needed for mirror image QQ they should use their own auras - if (temporaryPet && mod->charges != 0) - { - return; - } - - if (mod->type == SPELLMOD_FLAT) - { - // xinef: do not allow to consume more than one 100% crit increasing spell - if (mod->op == SPELLMOD_CRITICAL_CHANCE && totalflat >= 100) - { - return; - } - - int32 flatValue = mod->value; - - // SPELL_MOD_THREAT - divide by 100 (in packets we send threat * 100) - if (mod->op == SPELLMOD_THREAT) - { - flatValue /= 100; - } - - totalflat += flatValue; - } - else if (mod->type == SPELLMOD_PCT) - { - // skip percent mods for null basevalue (most important for spell mods with charges) - if (basevalue == T(0) || totalmul == 0.0f) - { - return; - } - - // special case (skip > 10sec spell casts for instant cast setting) - if (mod->op == SPELLMOD_CASTING_TIME && basevalue >= T(10000) && mod->value <= -100) - { - return; - } - // xinef: special exception for surge of light, dont affect crit chance if previous mods were not applied - else if (mod->op == SPELLMOD_CRITICAL_CHANCE && spell && !HasSpellMod(mod, spell)) - { - return; - } - // xinef: special case for backdraft gcd reduce with backlast time reduction, dont affect gcd if cast time was not applied - else if (mod->op == SPELLMOD_GLOBAL_COOLDOWN && spell && !HasSpellMod(mod, spell)) - { - return; - } - - // xinef: those two mods should be multiplicative (Glyph of Renew) - if (mod->op == SPELLMOD_DAMAGE || mod->op == SPELLMOD_DOT) - { - totalmul *= CalculatePct(1.0f, 100.0f + mod->value); - } - else - { - totalmul += CalculatePct(1.0f, mod->value); - } - } - - DropModCharge(mod, spell); - }; - - // Drop charges for triggering spells instead of triggered ones - if (m_spellModTakingSpell) - { - spell = m_spellModTakingSpell; - } - - SpellModifier* chargedMod = nullptr; - for (auto mod : m_spellMods[op]) - { - // Charges can be set only for mods with auras - if (!mod->ownerAura) - { - ASSERT(!mod->charges); - } - - if (!IsAffectedBySpellmod(spellInfo, mod, spell)) - { - continue; - } - - if (mod->ownerAura->IsUsingCharges()) - { - if (!chargedMod || (chargedMod->ownerAura->GetSpellInfo()->SpellPriority < mod->ownerAura->GetSpellInfo()->SpellPriority)) - { - chargedMod = mod; - } - - continue; - } - - calculateSpellMod(mod); - } - - if (chargedMod) - { - calculateSpellMod(chargedMod); - } - - float diff = 0.0f; - if (op == SPELLMOD_CASTING_TIME || op == SPELLMOD_DURATION) - { - diff = ((float)basevalue + totalflat) * (totalmul - 1.0f) + (float)totalflat; - } - else - { - diff = (float)basevalue * (totalmul - 1.0f) + (float)totalflat; - } - - basevalue = T((float)basevalue + diff); - return T(diff); -} #endif diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 59624677f..b9e004722 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -16590,18 +16590,14 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u case SPELL_AURA_ADD_FLAT_MODIFIER: case SPELL_AURA_ADD_PCT_MODIFIER: { - if (SpellModifier* mod = triggeredByAura->GetSpellModifier()) + if (triggeredByAura->GetSpellModifier()) { - if (mod->op == SPELLMOD_CASTING_TIME && mod->value < 0 && procSpell) + // Do proc if mod is consumed by spell + if (!procSpell || procSpell->m_appliedMods.find(i->aura) != procSpell->m_appliedMods.end()) { - // Skip instant spells - if (procSpellInfo->CalcCastTime() <= 0 || (procSpell->GetTriggeredCastFlags() & TRIGGERED_CAST_DIRECTLY) != 0) - { - break; - } + takeCharges = true; } } - takeCharges = true; break; } default: From 44c1d9898c984dafb86213acaf4d5dc9775806b1 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Mon, 2 Jan 2023 20:59:02 +0100 Subject: [PATCH 43/66] fix(Scripts/Spells): Omen of Clarity should not proc from Revitalize. (#13867) --- src/server/scripts/Spells/spell_druid.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index d7f697a33..5f17b9633 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -63,6 +63,11 @@ enum DruidSpells SPELL_DRUID_ITEM_T10_FERAL_4P_BONUS = 70726, }; +enum DruidIcons +{ + SPELL_ICON_REVITALIZE = 2862 +}; + // 1178 - Bear Form (Passive) // 9635 - Dire Bear Form (Passive) class spell_dru_bear_form_passive : public AuraScript @@ -219,6 +224,12 @@ class spell_dru_omen_of_clarity : public AuraScript return false; } + // Revitalize + if (spellInfo->SpellIconID == SPELL_ICON_REVITALIZE) + { + return false; + } + return true; } From 5534455c3248ea88103abe1acb15d0a42ff9ae48 Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Mon, 2 Jan 2023 15:04:08 -0500 Subject: [PATCH 44/66] refactor(Core/player_levelstats): Split player_levelstats into class and race specific tables. (#14383) Co-authored-by: ahchxj2416 <64737877+ahchxj2416@users.noreply.github.com> Co-authored-by: Shauren Co-authored-by: funjoker --- .../pending_db_world/levelstats-squeesh.sql | 839 ++++++++++++++++++ src/server/game/Globals/ObjectMgr.cpp | 76 +- 2 files changed, 890 insertions(+), 25 deletions(-) create mode 100644 data/sql/updates/pending_db_world/levelstats-squeesh.sql diff --git a/data/sql/updates/pending_db_world/levelstats-squeesh.sql b/data/sql/updates/pending_db_world/levelstats-squeesh.sql new file mode 100644 index 000000000..0b6eafd4b --- /dev/null +++ b/data/sql/updates/pending_db_world/levelstats-squeesh.sql @@ -0,0 +1,839 @@ +DROP TABLE IF EXISTS `player_levelstats`; +DROP TABLE IF EXISTS `player_class_stats`; +CREATE TABLE IF NOT EXISTS `player_class_stats` ( + `Class` TINYINT unsigned NOT NULL, + `Level` TINYINT unsigned NOT NULL, + `Strength` INT unsigned NOT NULL DEFAULT '0', + `Agility` INT unsigned NOT NULL DEFAULT '0', + `Stamina` INT unsigned NOT NULL DEFAULT '0', + `Intellect` INT unsigned NOT NULL DEFAULT '0', + `Spirit` INT unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`Class`,`Level`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 PACK_KEYS=0 COMMENT='Stores levels stats.'; + +DELETE FROM `player_class_stats`; +INSERT INTO `player_class_stats` (`Class`, `Level`, `Strength`, `Agility`, `Stamina`, `Intellect`, `Spirit`) VALUES +(1, 1, 23, 20, 22, 20, 20), +(1, 2, 24, 21, 23, 20, 20), +(1, 3, 25, 21, 24, 20, 21), +(1, 4, 26, 22, 25, 20, 21), +(1, 5, 28, 23, 26, 20, 21), +(1, 6, 29, 24, 27, 21, 21), +(1, 7, 30, 24, 28, 21, 22), +(1, 8, 31, 25, 29, 21, 22), +(1, 9, 32, 26, 30, 21, 22), +(1, 10, 33, 26, 31, 21, 23), +(1, 11, 35, 27, 33, 21, 23), +(1, 12, 36, 28, 34, 21, 23), +(1, 13, 37, 29, 35, 21, 24), +(1, 14, 39, 30, 36, 22, 24), +(1, 15, 40, 30, 37, 22, 24), +(1, 16, 41, 31, 38, 22, 25), +(1, 17, 42, 32, 40, 22, 25), +(1, 18, 44, 33, 41, 22, 25), +(1, 19, 45, 34, 42, 22, 26), +(1, 20, 47, 35, 43, 22, 26), +(1, 21, 48, 35, 45, 23, 26), +(1, 22, 49, 36, 46, 23, 27), +(1, 23, 51, 37, 47, 23, 27), +(1, 24, 52, 38, 49, 23, 28), +(1, 25, 54, 39, 50, 23, 28), +(1, 26, 55, 40, 51, 23, 28), +(1, 27, 57, 41, 53, 23, 29), +(1, 28, 58, 42, 54, 24, 29), +(1, 29, 60, 43, 56, 24, 30), +(1, 30, 62, 44, 57, 24, 30), +(1, 31, 63, 45, 58, 24, 30), +(1, 32, 65, 46, 60, 24, 31), +(1, 33, 66, 47, 61, 24, 31), +(1, 34, 68, 48, 63, 25, 32), +(1, 35, 70, 49, 64, 25, 32), +(1, 36, 72, 50, 66, 25, 33), +(1, 37, 73, 51, 68, 25, 33), +(1, 38, 75, 52, 69, 25, 33), +(1, 39, 77, 53, 71, 26, 34), +(1, 40, 79, 54, 72, 26, 34), +(1, 41, 80, 56, 74, 26, 35), +(1, 42, 82, 57, 76, 26, 35), +(1, 43, 84, 58, 77, 26, 36), +(1, 44, 86, 59, 79, 26, 36), +(1, 45, 88, 60, 81, 27, 37), +(1, 46, 90, 61, 83, 27, 37), +(1, 47, 92, 63, 84, 27, 38), +(1, 48, 94, 64, 86, 27, 38), +(1, 49, 96, 65, 88, 28, 39), +(1, 50, 98, 66, 90, 28, 39), +(1, 51, 100, 68, 92, 28, 40), +(1, 52, 102, 69, 94, 28, 40), +(1, 53, 104, 70, 96, 28, 41), +(1, 54, 106, 72, 98, 29, 42), +(1, 55, 109, 73, 100, 29, 42), +(1, 56, 111, 74, 102, 29, 43), +(1, 57, 113, 76, 104, 29, 43), +(1, 58, 115, 77, 106, 30, 44), +(1, 59, 118, 79, 108, 30, 44), +(1, 60, 120, 80, 110, 30, 45), +(1, 61, 122, 81, 112, 30, 46), +(1, 62, 125, 83, 114, 30, 46), +(1, 63, 127, 84, 117, 31, 47), +(1, 64, 130, 86, 119, 31, 47), +(1, 65, 132, 88, 121, 31, 48), +(1, 66, 135, 89, 123, 32, 49), +(1, 67, 137, 91, 126, 32, 49), +(1, 68, 140, 92, 128, 32, 50), +(1, 69, 142, 94, 130, 32, 51), +(1, 70, 145, 96, 133, 33, 51), +(1, 71, 148, 97, 135, 33, 52), +(1, 72, 150, 99, 138, 33, 53), +(1, 73, 153, 101, 140, 33, 54), +(1, 74, 156, 102, 143, 34, 54), +(1, 75, 159, 104, 145, 34, 55), +(1, 76, 162, 106, 148, 34, 56), +(1, 77, 165, 108, 151, 35, 57), +(1, 78, 168, 109, 153, 35, 57), +(1, 79, 171, 111, 156, 35, 58), +(1, 80, 174, 113, 159, 36, 59), +(2, 1, 22, 20, 22, 20, 21), +(2, 2, 23, 21, 23, 21, 22), +(2, 3, 24, 21, 24, 21, 22), +(2, 4, 25, 22, 25, 22, 23), +(2, 5, 26, 22, 26, 22, 24), +(2, 6, 27, 23, 27, 23, 24), +(2, 7, 28, 23, 28, 24, 25), +(2, 8, 29, 24, 28, 24, 25), +(2, 9, 30, 24, 29, 25, 26), +(2, 10, 31, 25, 30, 25, 27), +(2, 11, 32, 25, 31, 26, 28), +(2, 12, 33, 26, 32, 27, 28), +(2, 13, 34, 27, 33, 27, 29), +(2, 14, 35, 27, 34, 28, 30), +(2, 15, 36, 28, 36, 29, 30), +(2, 16, 38, 28, 37, 29, 31), +(2, 17, 39, 29, 38, 30, 32), +(2, 18, 40, 30, 39, 31, 33), +(2, 19, 41, 30, 40, 31, 33), +(2, 20, 42, 31, 41, 32, 34), +(2, 21, 43, 32, 42, 33, 35), +(2, 22, 45, 32, 43, 34, 36), +(2, 23, 46, 33, 44, 34, 37), +(2, 24, 47, 34, 46, 35, 37), +(2, 25, 48, 34, 47, 36, 38), +(2, 26, 50, 35, 48, 37, 39), +(2, 27, 51, 36, 49, 37, 40), +(2, 28, 52, 36, 50, 38, 41), +(2, 29, 54, 37, 52, 39, 42), +(2, 30, 55, 38, 53, 40, 42), +(2, 31, 56, 39, 54, 41, 43), +(2, 32, 58, 39, 56, 42, 44), +(2, 33, 59, 40, 57, 42, 45), +(2, 34, 61, 41, 58, 43, 46), +(2, 35, 62, 42, 60, 44, 47), +(2, 36, 64, 43, 61, 45, 48), +(2, 37, 65, 43, 62, 46, 49), +(2, 38, 67, 44, 64, 47, 50), +(2, 39, 68, 45, 65, 48, 51), +(2, 40, 70, 46, 67, 49, 52), +(2, 41, 71, 47, 68, 50, 53), +(2, 42, 73, 47, 70, 51, 54), +(2, 43, 74, 48, 71, 52, 55), +(2, 44, 76, 49, 73, 52, 56), +(2, 45, 78, 50, 74, 53, 57), +(2, 46, 79, 51, 76, 54, 58), +(2, 47, 81, 52, 77, 56, 59), +(2, 48, 83, 53, 79, 57, 60), +(2, 49, 84, 54, 81, 58, 62), +(2, 50, 86, 55, 82, 59, 63), +(2, 51, 88, 56, 84, 60, 64), +(2, 52, 90, 57, 86, 61, 65), +(2, 53, 92, 58, 87, 62, 66), +(2, 54, 93, 59, 89, 63, 67), +(2, 55, 95, 60, 91, 64, 69), +(2, 56, 97, 61, 93, 65, 70), +(2, 57, 99, 62, 94, 66, 71), +(2, 58, 101, 63, 96, 68, 72), +(2, 59, 103, 64, 98, 69, 74), +(2, 60, 105, 65, 100, 70, 75), +(2, 61, 107, 66, 102, 71, 76), +(2, 62, 109, 67, 104, 72, 78), +(2, 63, 111, 68, 106, 74, 79), +(2, 64, 113, 69, 108, 75, 80), +(2, 65, 115, 71, 110, 76, 82), +(2, 66, 118, 72, 112, 78, 83), +(2, 67, 120, 73, 114, 79, 85), +(2, 68, 122, 74, 116, 80, 86), +(2, 69, 124, 75, 118, 82, 87), +(2, 70, 126, 77, 120, 83, 89), +(2, 71, 129, 78, 122, 84, 90), +(2, 72, 131, 79, 125, 86, 92), +(2, 73, 133, 80, 127, 87, 94), +(2, 74, 136, 82, 129, 89, 95), +(2, 75, 138, 83, 131, 90, 97), +(2, 76, 141, 84, 134, 92, 98), +(2, 77, 143, 86, 136, 93, 100), +(2, 78, 146, 87, 138, 95, 102), +(2, 79, 148, 88, 141, 96, 103), +(2, 80, 151, 90, 143, 98, 105), +(3, 1, 20, 23, 21, 20, 21), +(3, 2, 20, 24, 22, 21, 22), +(3, 3, 21, 25, 23, 21, 22), +(3, 4, 21, 27, 23, 22, 23), +(3, 5, 22, 28, 24, 22, 23), +(3, 6, 22, 29, 25, 23, 24), +(3, 7, 22, 30, 26, 23, 24), +(3, 8, 23, 31, 27, 24, 25), +(3, 9, 23, 33, 28, 24, 26), +(3, 10, 24, 34, 28, 25, 26), +(3, 11, 24, 35, 29, 25, 27), +(3, 12, 25, 37, 30, 26, 28), +(3, 13, 25, 38, 31, 27, 28), +(3, 14, 26, 39, 32, 27, 29), +(3, 15, 26, 41, 33, 28, 29), +(3, 16, 27, 42, 34, 28, 30), +(3, 17, 27, 43, 35, 29, 31), +(3, 18, 28, 45, 36, 30, 32), +(3, 19, 28, 46, 37, 30, 32), +(3, 20, 29, 48, 38, 31, 33), +(3, 21, 29, 49, 39, 32, 34), +(3, 22, 30, 51, 40, 32, 34), +(3, 23, 30, 52, 41, 33, 35), +(3, 24, 31, 54, 42, 34, 36), +(3, 25, 31, 55, 43, 34, 37), +(3, 26, 32, 57, 44, 35, 37), +(3, 27, 32, 59, 45, 36, 38), +(3, 28, 33, 60, 46, 36, 39), +(3, 29, 33, 62, 47, 37, 40), +(3, 30, 34, 64, 48, 38, 40), +(3, 31, 34, 65, 50, 39, 41), +(3, 32, 35, 67, 51, 39, 42), +(3, 33, 36, 69, 52, 40, 43), +(3, 34, 36, 70, 53, 41, 44), +(3, 35, 37, 72, 54, 42, 45), +(3, 36, 38, 74, 56, 43, 46), +(3, 37, 38, 76, 57, 43, 46), +(3, 38, 39, 78, 58, 44, 47), +(3, 39, 39, 80, 59, 45, 48), +(3, 40, 40, 81, 61, 46, 49), +(3, 41, 41, 83, 62, 47, 50), +(3, 42, 41, 85, 63, 47, 51), +(3, 43, 42, 87, 64, 48, 52), +(3, 44, 43, 89, 66, 49, 53), +(3, 45, 43, 91, 67, 50, 54), +(3, 46, 44, 93, 69, 51, 55), +(3, 47, 45, 95, 70, 52, 56), +(3, 48, 46, 98, 71, 53, 57), +(3, 49, 46, 100, 73, 54, 58), +(3, 50, 47, 102, 74, 55, 59), +(3, 51, 48, 104, 76, 56, 60), +(3, 52, 49, 106, 77, 57, 61), +(3, 53, 49, 108, 79, 58, 62), +(3, 54, 50, 111, 80, 59, 63), +(3, 55, 51, 113, 82, 60, 64), +(3, 56, 52, 115, 83, 61, 65), +(3, 57, 53, 118, 85, 62, 67), +(3, 58, 53, 120, 87, 63, 68), +(3, 59, 54, 123, 88, 64, 69), +(3, 60, 55, 125, 90, 65, 70), +(3, 61, 56, 127, 92, 66, 71), +(3, 62, 57, 130, 93, 67, 72), +(3, 63, 58, 133, 95, 68, 74), +(3, 64, 58, 135, 97, 69, 75), +(3, 65, 59, 138, 99, 71, 76), +(3, 66, 60, 140, 100, 72, 77), +(3, 67, 61, 143, 102, 73, 79), +(3, 68, 62, 146, 104, 74, 80), +(3, 69, 63, 149, 106, 75, 81), +(3, 70, 64, 151, 108, 77, 83), +(3, 71, 65, 154, 110, 78, 84), +(3, 72, 66, 157, 112, 79, 85), +(3, 73, 67, 160, 114, 80, 87), +(3, 74, 68, 163, 116, 82, 88), +(3, 75, 69, 166, 118, 83, 90), +(3, 76, 70, 169, 120, 84, 91), +(3, 77, 71, 172, 122, 86, 93), +(3, 78, 72, 175, 124, 87, 94), +(3, 79, 73, 178, 126, 88, 96), +(3, 80, 74, 181, 128, 90, 97), +(4, 1, 21, 23, 21, 20, 20), +(4, 2, 22, 24, 22, 20, 20), +(4, 3, 22, 25, 22, 20, 21), +(4, 4, 23, 27, 23, 21, 21), +(4, 5, 24, 28, 24, 21, 21), +(4, 6, 24, 29, 24, 21, 22), +(4, 7, 25, 31, 25, 21, 22), +(4, 8, 26, 32, 25, 21, 22), +(4, 9, 27, 33, 26, 21, 23), +(4, 10, 27, 35, 27, 22, 23), +(4, 11, 28, 36, 28, 22, 24), +(4, 12, 29, 37, 28, 22, 24), +(4, 13, 30, 39, 29, 22, 24), +(4, 14, 30, 40, 30, 22, 25), +(4, 15, 31, 42, 30, 23, 25), +(4, 16, 32, 43, 31, 23, 26), +(4, 17, 33, 44, 32, 23, 26), +(4, 18, 34, 46, 33, 23, 26), +(4, 19, 35, 48, 33, 23, 27), +(4, 20, 35, 49, 34, 24, 27), +(4, 21, 36, 51, 35, 24, 28), +(4, 22, 37, 52, 36, 24, 28), +(4, 23, 38, 54, 37, 24, 29), +(4, 24, 39, 55, 37, 25, 29), +(4, 25, 40, 57, 38, 25, 30), +(4, 26, 41, 59, 39, 25, 30), +(4, 27, 42, 60, 40, 25, 30), +(4, 28, 43, 62, 41, 25, 31), +(4, 29, 43, 64, 42, 26, 31), +(4, 30, 44, 66, 42, 26, 32), +(4, 31, 45, 67, 43, 26, 32), +(4, 32, 46, 69, 44, 26, 33), +(4, 33, 47, 71, 45, 27, 33), +(4, 34, 48, 73, 46, 27, 34), +(4, 35, 49, 75, 47, 27, 34), +(4, 36, 51, 77, 48, 28, 35), +(4, 37, 52, 78, 49, 28, 36), +(4, 38, 53, 80, 50, 28, 36), +(4, 39, 54, 82, 51, 28, 37), +(4, 40, 55, 84, 52, 29, 37), +(4, 41, 56, 86, 53, 29, 38), +(4, 42, 57, 88, 54, 29, 38), +(4, 43, 58, 90, 55, 29, 39), +(4, 44, 59, 93, 56, 30, 39), +(4, 45, 61, 95, 57, 30, 40), +(4, 46, 62, 97, 58, 30, 41), +(4, 47, 63, 99, 59, 31, 41), +(4, 48, 64, 101, 60, 31, 42), +(4, 49, 65, 103, 62, 31, 43), +(4, 50, 67, 106, 63, 32, 43), +(4, 51, 68, 108, 64, 32, 44), +(4, 52, 69, 110, 65, 32, 44), +(4, 53, 70, 113, 66, 33, 45), +(4, 54, 72, 115, 67, 33, 46), +(4, 55, 73, 117, 69, 33, 46), +(4, 56, 74, 120, 70, 34, 47), +(4, 57, 76, 122, 71, 34, 48), +(4, 58, 77, 125, 72, 34, 49), +(4, 59, 79, 127, 74, 35, 49), +(4, 60, 80, 130, 75, 35, 50), +(4, 61, 81, 133, 76, 35, 51), +(4, 62, 83, 135, 78, 36, 51), +(4, 63, 84, 138, 79, 36, 52), +(4, 64, 86, 141, 80, 36, 53), +(4, 65, 87, 143, 82, 37, 54), +(4, 66, 89, 146, 83, 37, 55), +(4, 67, 90, 149, 85, 38, 55), +(4, 68, 92, 152, 86, 38, 56), +(4, 69, 94, 155, 87, 38, 57), +(4, 70, 95, 158, 89, 39, 58), +(4, 71, 97, 161, 90, 39, 59), +(4, 72, 99, 164, 92, 40, 59), +(4, 73, 100, 167, 94, 40, 60), +(4, 74, 102, 170, 95, 41, 61), +(4, 75, 104, 173, 97, 41, 62), +(4, 76, 105, 176, 98, 41, 63), +(4, 77, 107, 179, 100, 42, 64), +(4, 78, 109, 183, 102, 42, 65), +(4, 79, 111, 186, 103, 43, 66), +(4, 80, 113, 189, 105, 43, 67), +(5, 1, 20, 20, 20, 22, 23), +(5, 2, 20, 20, 20, 23, 24), +(5, 3, 20, 20, 21, 24, 25), +(5, 4, 21, 21, 21, 25, 27), +(5, 5, 21, 21, 21, 27, 28), +(5, 6, 21, 21, 22, 28, 29), +(5, 7, 21, 21, 22, 29, 30), +(5, 8, 21, 22, 22, 30, 31), +(5, 9, 21, 22, 23, 31, 33), +(5, 10, 22, 22, 23, 33, 34), +(5, 11, 22, 22, 24, 34, 35), +(5, 12, 22, 23, 24, 35, 37), +(5, 13, 22, 23, 24, 36, 38), +(5, 14, 22, 23, 25, 38, 39), +(5, 15, 23, 23, 25, 39, 41), +(5, 16, 23, 24, 26, 40, 42), +(5, 17, 23, 24, 26, 42, 43), +(5, 18, 23, 24, 26, 43, 45), +(5, 19, 23, 25, 27, 44, 46), +(5, 20, 24, 25, 27, 46, 48), +(5, 21, 24, 25, 28, 47, 49), +(5, 22, 24, 25, 28, 49, 51), +(5, 23, 24, 26, 29, 50, 52), +(5, 24, 25, 26, 29, 52, 54), +(5, 25, 25, 26, 30, 53, 55), +(5, 26, 25, 27, 30, 55, 57), +(5, 27, 25, 27, 30, 56, 59), +(5, 28, 25, 27, 31, 58, 60), +(5, 29, 26, 28, 31, 59, 62), +(5, 30, 26, 28, 32, 61, 64), +(5, 31, 26, 28, 32, 63, 65), +(5, 32, 26, 29, 33, 64, 67), +(5, 33, 27, 29, 33, 66, 69), +(5, 34, 27, 29, 34, 68, 70), +(5, 35, 27, 30, 34, 69, 72), +(5, 36, 28, 30, 35, 71, 74), +(5, 37, 28, 30, 36, 73, 76), +(5, 38, 28, 31, 36, 75, 78), +(5, 39, 28, 31, 37, 76, 80), +(5, 40, 29, 31, 37, 78, 81), +(5, 41, 29, 32, 38, 80, 83), +(5, 42, 29, 32, 38, 82, 85), +(5, 43, 29, 33, 39, 84, 87), +(5, 44, 30, 33, 39, 86, 89), +(5, 45, 30, 33, 40, 88, 91), +(5, 46, 30, 34, 41, 90, 93), +(5, 47, 31, 34, 41, 92, 95), +(5, 48, 31, 35, 42, 94, 98), +(5, 49, 31, 35, 43, 96, 100), +(5, 50, 32, 35, 43, 98, 102), +(5, 51, 32, 36, 44, 100, 104), +(5, 52, 32, 36, 44, 102, 106), +(5, 53, 33, 37, 45, 104, 108), +(5, 54, 33, 37, 46, 106, 111), +(5, 55, 33, 38, 46, 109, 113), +(5, 56, 34, 38, 47, 111, 115), +(5, 57, 34, 39, 48, 113, 118), +(5, 58, 34, 39, 49, 115, 120), +(5, 59, 35, 40, 49, 118, 123), +(5, 60, 35, 40, 50, 120, 125), +(5, 61, 35, 40, 51, 122, 127), +(5, 62, 36, 41, 51, 125, 130), +(5, 63, 36, 41, 52, 127, 133), +(5, 64, 36, 42, 53, 130, 135), +(5, 65, 37, 43, 54, 132, 138), +(5, 66, 37, 43, 55, 135, 140), +(5, 67, 38, 44, 55, 137, 143), +(5, 68, 38, 44, 56, 140, 146), +(5, 69, 38, 45, 57, 143, 149), +(5, 70, 39, 45, 58, 145, 151), +(5, 71, 39, 46, 59, 148, 154), +(5, 72, 40, 46, 59, 151, 157), +(5, 73, 40, 47, 60, 154, 160), +(5, 74, 41, 47, 61, 156, 163), +(5, 75, 41, 48, 62, 159, 166), +(5, 76, 41, 49, 63, 162, 169), +(5, 77, 42, 49, 64, 165, 172), +(5, 78, 42, 50, 65, 168, 175), +(5, 79, 43, 50, 66, 171, 178), +(5, 80, 43, 51, 67, 174, 181), +(6, 1, 23, 20, 22, 20, 20), +(6, 2, 24, 21, 23, 20, 20), +(6, 3, 25, 21, 24, 20, 21), +(6, 4, 26, 22, 25, 20, 21), +(6, 5, 28, 23, 26, 20, 21), +(6, 6, 29, 24, 27, 21, 21), +(6, 7, 30, 24, 28, 21, 22), +(6, 8, 31, 25, 29, 21, 22), +(6, 9, 32, 26, 30, 21, 22), +(6, 10, 33, 26, 31, 21, 23), +(6, 11, 35, 27, 33, 21, 23), +(6, 12, 36, 28, 34, 21, 23), +(6, 13, 37, 29, 35, 21, 24), +(6, 14, 39, 30, 36, 22, 24), +(6, 15, 40, 30, 37, 22, 24), +(6, 16, 41, 31, 38, 22, 25), +(6, 17, 42, 32, 40, 22, 25), +(6, 18, 44, 33, 41, 22, 25), +(6, 19, 45, 34, 42, 22, 26), +(6, 20, 47, 35, 43, 22, 26), +(6, 21, 48, 35, 45, 23, 26), +(6, 22, 49, 36, 46, 23, 27), +(6, 23, 51, 37, 47, 23, 27), +(6, 24, 52, 38, 49, 23, 28), +(6, 25, 54, 39, 50, 23, 28), +(6, 26, 55, 40, 51, 23, 28), +(6, 27, 57, 41, 53, 23, 29), +(6, 28, 58, 42, 54, 24, 29), +(6, 29, 60, 43, 56, 24, 30), +(6, 30, 62, 44, 57, 24, 30), +(6, 31, 63, 45, 58, 24, 30), +(6, 32, 65, 46, 60, 24, 31), +(6, 33, 66, 47, 61, 24, 31), +(6, 34, 68, 48, 63, 25, 32), +(6, 35, 70, 49, 64, 25, 32), +(6, 36, 72, 50, 66, 25, 33), +(6, 37, 73, 51, 68, 25, 33), +(6, 38, 75, 52, 69, 25, 33), +(6, 39, 77, 53, 71, 26, 34), +(6, 40, 79, 54, 72, 26, 34), +(6, 41, 80, 56, 74, 26, 35), +(6, 42, 82, 57, 76, 26, 35), +(6, 43, 84, 58, 77, 26, 36), +(6, 44, 86, 59, 79, 26, 36), +(6, 45, 88, 60, 81, 27, 37), +(6, 46, 90, 61, 83, 27, 37), +(6, 47, 92, 63, 84, 27, 38), +(6, 48, 94, 64, 86, 27, 38), +(6, 49, 96, 65, 88, 28, 39), +(6, 50, 98, 66, 90, 28, 39), +(6, 51, 100, 68, 92, 28, 40), +(6, 52, 102, 69, 94, 28, 40), +(6, 53, 104, 70, 96, 28, 41), +(6, 54, 106, 72, 98, 29, 42), +(6, 55, 108, 73, 99, 29, 42), +(6, 56, 111, 75, 102, 29, 43), +(6, 57, 113, 76, 104, 29, 43), +(6, 58, 115, 77, 106, 30, 44), +(6, 59, 118, 79, 108, 30, 44), +(6, 60, 120, 80, 110, 30, 45), +(6, 61, 122, 81, 112, 30, 46), +(6, 62, 125, 83, 114, 30, 46), +(6, 63, 127, 84, 117, 31, 47), +(6, 64, 130, 86, 119, 31, 47), +(6, 65, 133, 87, 121, 31, 48), +(6, 66, 135, 89, 124, 31, 49), +(6, 67, 138, 90, 126, 32, 49), +(6, 68, 140, 92, 128, 32, 50), +(6, 69, 143, 93, 131, 32, 51), +(6, 70, 146, 95, 133, 32, 51), +(6, 71, 149, 97, 136, 33, 52), +(6, 72, 151, 98, 138, 33, 53), +(6, 73, 154, 100, 141, 33, 54), +(6, 74, 157, 102, 143, 33, 54), +(6, 75, 160, 103, 146, 34, 55), +(6, 76, 163, 105, 149, 34, 56), +(6, 77, 166, 107, 151, 34, 57), +(6, 78, 169, 108, 154, 34, 57), +(6, 79, 172, 110, 157, 35, 58), +(6, 80, 175, 112, 160, 35, 59), +(7, 1, 21, 20, 21, 21, 22), +(7, 2, 22, 20, 22, 22, 23), +(7, 3, 22, 21, 23, 23, 24), +(7, 4, 23, 21, 24, 23, 25), +(7, 5, 24, 22, 24, 24, 26), +(7, 6, 25, 22, 25, 25, 27), +(7, 7, 26, 22, 26, 26, 28), +(7, 8, 26, 23, 27, 27, 28), +(7, 9, 27, 23, 28, 28, 29), +(7, 10, 28, 24, 29, 28, 30), +(7, 11, 29, 24, 30, 29, 31), +(7, 12, 30, 25, 31, 30, 32), +(7, 13, 30, 25, 32, 31, 33), +(7, 14, 31, 26, 33, 32, 34), +(7, 15, 32, 26, 34, 33, 36), +(7, 16, 33, 27, 35, 34, 37), +(7, 17, 34, 27, 36, 35, 38), +(7, 18, 35, 28, 37, 36, 39), +(7, 19, 36, 28, 38, 37, 40), +(7, 20, 37, 29, 39, 38, 41), +(7, 21, 38, 29, 40, 39, 42), +(7, 22, 38, 30, 41, 40, 43), +(7, 23, 39, 30, 42, 41, 44), +(7, 24, 40, 31, 43, 42, 46), +(7, 25, 41, 31, 45, 43, 47), +(7, 26, 42, 32, 46, 44, 48), +(7, 27, 43, 32, 47, 45, 49), +(7, 28, 44, 33, 48, 46, 50), +(7, 29, 45, 33, 49, 47, 52), +(7, 30, 46, 34, 50, 48, 53), +(7, 31, 48, 34, 52, 50, 54), +(7, 32, 49, 35, 53, 51, 56), +(7, 33, 50, 36, 54, 52, 57), +(7, 34, 51, 36, 55, 53, 58), +(7, 35, 52, 37, 57, 54, 60), +(7, 36, 53, 38, 58, 56, 61), +(7, 37, 54, 38, 59, 57, 62), +(7, 38, 55, 39, 61, 58, 64), +(7, 39, 56, 39, 62, 59, 65), +(7, 40, 58, 40, 63, 61, 67), +(7, 41, 59, 41, 65, 62, 68), +(7, 42, 60, 41, 66, 63, 70), +(7, 43, 61, 42, 68, 64, 71), +(7, 44, 63, 43, 69, 66, 73), +(7, 45, 64, 43, 71, 67, 74), +(7, 46, 65, 44, 72, 69, 76), +(7, 47, 66, 45, 74, 70, 77), +(7, 48, 68, 46, 75, 71, 79), +(7, 49, 69, 46, 77, 73, 81), +(7, 50, 70, 47, 78, 74, 82), +(7, 51, 72, 48, 80, 76, 84), +(7, 52, 73, 49, 81, 77, 86), +(7, 53, 75, 49, 83, 79, 87), +(7, 54, 76, 50, 85, 80, 89), +(7, 55, 77, 51, 86, 82, 91), +(7, 56, 79, 52, 88, 83, 93), +(7, 57, 80, 53, 90, 85, 94), +(7, 58, 82, 53, 91, 87, 96), +(7, 59, 83, 54, 93, 88, 98), +(7, 60, 85, 55, 95, 90, 100), +(7, 61, 87, 56, 97, 92, 102), +(7, 62, 88, 57, 99, 93, 104), +(7, 63, 90, 58, 100, 95, 106), +(7, 64, 91, 58, 102, 97, 108), +(7, 65, 93, 59, 104, 99, 110), +(7, 66, 95, 60, 106, 100, 112), +(7, 67, 96, 61, 108, 102, 114), +(7, 68, 98, 62, 110, 104, 116), +(7, 69, 100, 63, 112, 106, 118), +(7, 70, 102, 64, 114, 108, 120), +(7, 71, 103, 65, 116, 110, 122), +(7, 72, 105, 66, 118, 112, 125), +(7, 73, 107, 67, 120, 114, 127), +(7, 74, 109, 68, 123, 116, 129), +(7, 75, 111, 69, 125, 118, 131), +(7, 76, 111, 70, 127, 120, 134), +(7, 77, 114, 71, 129, 122, 136), +(7, 78, 116, 72, 131, 124, 138), +(7, 79, 118, 73, 134, 126, 141), +(7, 80, 120, 74, 136, 128, 143), +(8, 1, 20, 20, 20, 23, 22), +(8, 2, 20, 20, 20, 24, 23), +(8, 3, 20, 20, 21, 25, 24), +(8, 4, 20, 21, 21, 27, 25), +(8, 5, 20, 21, 21, 28, 27), +(8, 6, 21, 21, 21, 29, 28), +(8, 7, 21, 21, 22, 30, 29), +(8, 8, 21, 21, 22, 31, 30), +(8, 9, 21, 21, 22, 33, 31), +(8, 10, 21, 22, 23, 34, 33), +(8, 11, 21, 22, 23, 35, 34), +(8, 12, 21, 22, 23, 37, 35), +(8, 13, 21, 22, 24, 38, 36), +(8, 14, 22, 22, 24, 39, 38), +(8, 15, 22, 23, 24, 41, 39), +(8, 16, 22, 23, 25, 42, 40), +(8, 17, 22, 23, 25, 43, 42), +(8, 18, 22, 23, 25, 45, 43), +(8, 19, 22, 23, 26, 46, 44), +(8, 20, 22, 24, 26, 48, 46), +(8, 21, 23, 24, 26, 49, 47), +(8, 22, 23, 24, 27, 51, 49), +(8, 23, 23, 24, 27, 52, 50), +(8, 24, 23, 25, 28, 54, 52), +(8, 25, 23, 25, 28, 55, 53), +(8, 26, 23, 25, 28, 57, 55), +(8, 27, 23, 25, 29, 59, 56), +(8, 28, 24, 25, 29, 60, 58), +(8, 29, 24, 26, 30, 62, 59), +(8, 30, 24, 26, 30, 64, 61), +(8, 31, 24, 26, 30, 65, 63), +(8, 32, 24, 26, 31, 67, 64), +(8, 33, 24, 27, 31, 69, 66), +(8, 34, 25, 27, 32, 70, 68), +(8, 35, 25, 27, 32, 72, 69), +(8, 36, 25, 28, 33, 74, 71), +(8, 37, 25, 28, 33, 76, 73), +(8, 38, 25, 28, 33, 78, 75), +(8, 39, 26, 28, 34, 80, 76), +(8, 40, 26, 29, 34, 81, 78), +(8, 41, 26, 29, 35, 83, 80), +(8, 42, 26, 29, 35, 85, 82), +(8, 43, 26, 29, 36, 87, 84), +(8, 44, 26, 30, 36, 89, 86), +(8, 45, 27, 30, 37, 91, 88), +(8, 46, 27, 30, 37, 93, 90), +(8, 47, 27, 31, 38, 95, 92), +(8, 48, 27, 31, 38, 98, 94), +(8, 49, 28, 31, 39, 100, 96), +(8, 50, 28, 32, 39, 102, 98), +(8, 51, 28, 32, 40, 104, 100), +(8, 52, 28, 32, 40, 106, 102), +(8, 53, 28, 33, 41, 108, 104), +(8, 54, 29, 33, 42, 111, 106), +(8, 55, 29, 33, 42, 113, 109), +(8, 56, 29, 34, 43, 115, 111), +(8, 57, 29, 34, 43, 118, 113), +(8, 58, 30, 34, 44, 120, 115), +(8, 59, 30, 35, 44, 123, 118), +(8, 60, 30, 35, 45, 125, 120), +(8, 61, 30, 35, 46, 127, 122), +(8, 62, 30, 36, 46, 130, 125), +(8, 63, 31, 36, 47, 133, 127), +(8, 64, 31, 36, 47, 135, 130), +(8, 65, 31, 37, 48, 138, 132), +(8, 66, 32, 37, 49, 140, 135), +(8, 67, 32, 38, 49, 143, 137), +(8, 68, 32, 38, 50, 146, 140), +(8, 69, 32, 38, 51, 149, 143), +(8, 70, 33, 39, 51, 151, 145), +(8, 71, 33, 39, 52, 154, 148), +(8, 72, 33, 40, 53, 157, 151), +(8, 73, 33, 40, 54, 160, 154), +(8, 74, 34, 41, 54, 163, 156), +(8, 75, 34, 41, 55, 166, 159), +(8, 76, 34, 41, 56, 169, 162), +(8, 77, 35, 42, 57, 172, 165), +(8, 78, 35, 42, 57, 175, 168), +(8, 79, 35, 43, 58, 178, 171), +(8, 80, 36, 43, 59, 181, 174), +(9, 1, 20, 20, 21, 22, 22), +(9, 2, 20, 20, 22, 23, 23), +(9, 3, 21, 21, 22, 24, 24), +(9, 4, 21, 21, 23, 25, 25), +(9, 5, 21, 21, 23, 26, 26), +(9, 6, 21, 22, 24, 27, 27), +(9, 7, 22, 22, 24, 28, 29), +(9, 8, 22, 22, 25, 29, 30), +(9, 9, 22, 23, 25, 30, 31), +(9, 10, 23, 23, 26, 31, 32), +(9, 11, 23, 24, 26, 33, 33), +(9, 12, 23, 24, 27, 34, 34), +(9, 13, 24, 24, 27, 35, 36), +(9, 14, 24, 25, 28, 36, 37), +(9, 15, 24, 25, 29, 37, 38), +(9, 16, 25, 26, 29, 38, 39), +(9, 17, 25, 26, 30, 40, 41), +(9, 18, 25, 26, 30, 41, 42), +(9, 19, 26, 27, 31, 42, 43), +(9, 20, 26, 27, 32, 43, 45), +(9, 21, 26, 28, 32, 45, 46), +(9, 22, 27, 28, 33, 46, 47), +(9, 23, 27, 29, 34, 47, 49), +(9, 24, 28, 29, 34, 49, 50), +(9, 25, 28, 30, 35, 50, 52), +(9, 26, 28, 30, 36, 51, 53), +(9, 27, 29, 30, 36, 53, 54), +(9, 28, 29, 31, 37, 54, 56), +(9, 29, 30, 31, 38, 56, 57), +(9, 30, 30, 32, 38, 57, 59), +(9, 31, 30, 32, 39, 58, 61), +(9, 32, 31, 33, 40, 60, 62), +(9, 33, 31, 33, 41, 61, 64), +(9, 34, 32, 34, 41, 63, 65), +(9, 35, 32, 34, 42, 64, 67), +(9, 36, 33, 35, 43, 66, 69), +(9, 37, 33, 36, 44, 68, 70), +(9, 38, 33, 36, 45, 69, 72), +(9, 39, 34, 37, 45, 71, 74), +(9, 40, 34, 37, 46, 72, 75), +(9, 41, 35, 38, 47, 74, 77), +(9, 42, 35, 38, 48, 76, 79), +(9, 43, 36, 39, 49, 77, 81), +(9, 44, 36, 39, 50, 79, 82), +(9, 45, 37, 40, 50, 81, 84), +(9, 46, 37, 41, 51, 83, 86), +(9, 47, 38, 41, 52, 84, 88), +(9, 48, 38, 42, 53, 86, 90), +(9, 49, 39, 43, 54, 88, 92), +(9, 50, 39, 43, 55, 90, 94), +(9, 51, 40, 44, 56, 92, 96), +(9, 52, 40, 44, 57, 94, 98), +(9, 53, 41, 45, 58, 96, 100), +(9, 54, 42, 46, 59, 98, 102), +(9, 55, 42, 46, 60, 100, 104), +(9, 56, 43, 47, 61, 102, 106), +(9, 57, 43, 48, 62, 104, 108), +(9, 58, 44, 49, 63, 106, 111), +(9, 59, 44, 49, 64, 108, 113), +(9, 60, 45, 50, 65, 110, 115), +(9, 61, 46, 51, 66, 112, 117), +(9, 62, 46, 51, 67, 114, 120), +(9, 63, 47, 52, 68, 117, 122), +(9, 64, 47, 53, 69, 119, 124), +(9, 65, 48, 54, 71, 121, 126), +(9, 66, 49, 55, 72, 123, 129), +(9, 67, 49, 55, 73, 126, 131), +(9, 68, 50, 56, 74, 128, 134), +(9, 69, 51, 57, 75, 130, 136), +(9, 70, 51, 58, 76, 133, 139), +(9, 71, 52, 59, 78, 135, 142), +(9, 72, 53, 59, 79, 138, 144), +(9, 73, 54, 60, 80, 140, 147), +(9, 74, 54, 61, 81, 143, 150), +(9, 75, 55, 62, 83, 145, 152), +(9, 76, 56, 63, 84, 148, 155), +(9, 77, 57, 64, 85, 151, 158), +(9, 78, 57, 65, 87, 153, 161), +(9, 79, 58, 66, 88, 156, 164), +(9, 80, 59, 67, 89, 159, 166), +(11, 1, 21, 20, 20, 22, 22), +(11, 2, 22, 20, 21, 23, 23), +(11, 3, 22, 21, 21, 24, 24), +(11, 4, 23, 21, 22, 25, 25), +(11, 5, 23, 22, 22, 26, 26), +(11, 6, 24, 22, 23, 27, 27), +(11, 7, 24, 23, 24, 28, 28), +(11, 8, 25, 23, 24, 28, 29), +(11, 9, 25, 24, 25, 29, 30), +(11, 10, 26, 24, 25, 30, 31), +(11, 11, 26, 25, 26, 31, 33), +(11, 12, 27, 25, 27, 32, 34), +(11, 13, 27, 26, 27, 33, 35), +(11, 14, 28, 26, 28, 34, 36), +(11, 15, 29, 27, 29, 36, 37), +(11, 16, 29, 27, 29, 37, 38), +(11, 17, 30, 28, 30, 38, 40), +(11, 18, 30, 29, 31, 39, 41), +(11, 19, 31, 29, 31, 40, 42), +(11, 20, 32, 30, 32, 41, 43), +(11, 21, 32, 30, 33, 42, 45), +(11, 22, 33, 31, 34, 43, 46), +(11, 23, 34, 32, 34, 44, 47), +(11, 24, 34, 32, 35, 46, 49), +(11, 25, 35, 33, 36, 47, 50), +(11, 26, 35, 33, 36, 48, 51), +(11, 27, 36, 34, 37, 49, 53), +(11, 28, 37, 35, 38, 50, 54), +(11, 29, 38, 35, 39, 52, 56), +(11, 30, 38, 36, 40, 53, 57), +(11, 31, 39, 37, 41, 54, 58), +(11, 32, 40, 37, 42, 56, 60), +(11, 33, 41, 38, 42, 57, 61), +(11, 34, 41, 39, 43, 58, 63), +(11, 35, 42, 39, 44, 60, 64), +(11, 36, 43, 40, 45, 61, 66), +(11, 37, 44, 41, 46, 62, 68), +(11, 38, 45, 41, 47, 64, 69), +(11, 39, 45, 42, 48, 65, 71), +(11, 40, 46, 43, 49, 67, 72), +(11, 41, 47, 44, 50, 68, 74), +(11, 42, 48, 44, 51, 70, 76), +(11, 43, 49, 45, 52, 71, 77), +(11, 44, 50, 46, 52, 73, 79), +(11, 45, 50, 47, 53, 74, 81), +(11, 46, 51, 48, 54, 76, 83), +(11, 47, 52, 48, 56, 77, 84), +(11, 48, 53, 49, 57, 79, 86), +(11, 49, 54, 50, 58, 81, 88), +(11, 50, 55, 51, 59, 82, 90), +(11, 51, 56, 52, 60, 84, 92), +(11, 52, 57, 53, 61, 86, 94), +(11, 53, 58, 54, 62, 87, 96), +(11, 54, 59, 54, 63, 89, 98), +(11, 55, 60, 55, 64, 91, 100), +(11, 56, 61, 56, 65, 93, 102), +(11, 57, 62, 57, 66, 94, 104), +(11, 58, 63, 58, 68, 96, 106), +(11, 59, 64, 59, 69, 98, 108), +(11, 60, 65, 60, 70, 100, 110), +(11, 61, 66, 61, 71, 102, 112), +(11, 62, 67, 62, 72, 104, 114), +(11, 63, 68, 63, 74, 106, 117), +(11, 64, 69, 64, 75, 108, 119), +(11, 65, 71, 65, 76, 110, 121), +(11, 66, 72, 66, 78, 112, 123), +(11, 67, 73, 67, 79, 114, 126), +(11, 68, 74, 68, 80, 116, 128), +(11, 69, 75, 69, 82, 118, 130), +(11, 70, 76, 70, 83, 120, 133), +(11, 71, 78, 71, 84, 122, 135), +(11, 72, 79, 73, 86, 125, 138), +(11, 73, 80, 74, 87, 127, 140), +(11, 74, 81, 75, 89, 129, 143), +(11, 75, 83, 76, 90, 131, 145), +(11, 76, 84, 77, 92, 134, 148), +(11, 77, 85, 78, 93, 136, 151), +(11, 78, 87, 80, 95, 138, 153), +(11, 79, 88, 81, 96, 141, 156), +(11, 80, 89, 82, 98, 143, 159); + +DROP TABLE IF EXISTS `player_race_stats`; +CREATE TABLE IF NOT EXISTS `player_race_stats` ( + `Race` TINYINT unsigned NOT NULL, + `Strength` INT NOT NULL DEFAULT '0', + `Agility` INT NOT NULL DEFAULT '0', + `Stamina` INT NOT NULL DEFAULT '0', + `Intellect` INT NOT NULL DEFAULT '0', + `Spirit` INT NOT NULL DEFAULT '0', + PRIMARY KEY (`Race`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 PACK_KEYS=0 COMMENT='Stores race stats.'; + +DELETE FROM `player_race_stats`; +INSERT INTO `player_race_stats` (`Race`, `Strength`, `Agility`, `Stamina`, `Intellect`, `Spirit`) VALUES +(1, 0, 0, 0, 0, 0), +(2, 3, -3, 1, -3, 2), +(3, 5, -4, 1, -1, -1), +(4, -4, 4, 0, 0, 0), +(5, -1, -2, 0, -2, 5), +(6, 5, -4, 1, -4, 2), +(7, -5, 2, 0, 3, 0), +(8, 1, 2, 0, -4, 1), +(10, -3, 2, 0, 3, -2), +(11, 1, -3, 0, 0, 2); diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index b755bfa58..7b892dd64 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -4016,15 +4016,47 @@ void ObjectMgr::LoadPlayerInfo() // Loading levels data (class/race dependent) LOG_INFO("server.loading", "Loading Player Create Level Stats Data..."); { + struct RaceStats + { + int16 StatModifier[MAX_STATS]; + }; + + std::array raceStatModifiers; + uint32 oldMSTime = getMSTime(); - // 0 1 2 3 4 5 6 7 - QueryResult result = WorldDatabase.Query("SELECT race, class, level, str, agi, sta, inte, spi FROM player_levelstats"); + // 0 1 2 3 4 5 + QueryResult raceStatsResult = WorldDatabase.Query("SELECT Race, Strength, Agility, Stamina, Intellect, Spirit FROM player_race_stats"); + + if (!raceStatsResult) + { + LOG_WARN("server.loading", ">> Loaded 0 race stats definitions. DB table `player_race_stats` is empty."); + LOG_INFO("server.loading", " "); + exit(1); + } + + do + { + Field* fields = raceStatsResult->Fetch(); + + uint32 current_race = fields[0].Get(); + if (current_race >= MAX_RACES) + { + LOG_ERROR("sql.sql", "Wrong race {} in `player_race_stats` table, ignoring.", current_race); + continue; + } + + for (uint32 i = 0; i < MAX_STATS; ++i) + raceStatModifiers[current_race].StatModifier[i] = fields[i + 1].Get(); + + } while (raceStatsResult->NextRow()); + + // 0 1 2 3 4 5 6 + QueryResult result = WorldDatabase.Query("SELECT Class, Level, Strength, Agility, Stamina, Intellect, Spirit FROM player_class_stats"); if (!result) { - LOG_WARN("server.loading", ">> Loaded 0 level stats definitions. DB table `player_levelstats` is empty."); - LOG_INFO("server.loading", " "); + LOG_ERROR("server.loading", ">> Loaded 0 level stats definitions. DB table `player_class_stats` is empty."); exit(1); } @@ -4034,41 +4066,35 @@ void ObjectMgr::LoadPlayerInfo() { Field* fields = result->Fetch(); - uint32 current_race = fields[0].Get(); - if (current_race >= MAX_RACES) - { - LOG_ERROR("sql.sql", "Wrong race {} in `player_levelstats` table, ignoring.", current_race); - continue; - } - - uint32 current_class = fields[1].Get(); + uint32 current_class = fields[0].Get(); if (current_class >= MAX_CLASSES) { - LOG_ERROR("sql.sql", "Wrong class {} in `player_levelstats` table, ignoring.", current_class); + LOG_ERROR("sql.sql", "Wrong class {} in `player_class_stats` table, ignoring.", current_class); continue; } - uint32 current_level = fields[2].Get(); + uint32 current_level = fields[1].Get(); if (current_level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { if (current_level > STRONG_MAX_LEVEL) // hardcoded level maximum - LOG_ERROR("sql.sql", "Wrong (> {}) level {} in `player_levelstats` table, ignoring.", STRONG_MAX_LEVEL, current_level); + LOG_ERROR("sql.sql", "Wrong (> {}) level {} in `player_class_stats` table, ignoring.", STRONG_MAX_LEVEL, current_level); else - { - LOG_DEBUG("sql.sql", "Unused (> MaxPlayerLevel in worldserver.conf) level {} in `player_levelstats` table, ignoring.", current_level); - ++count; // make result loading percent "expected" correct in case disabled detail mode for example. - } + LOG_DEBUG("sql.sql", "Unused (> MaxPlayerLevel in worldserver.conf) level {} in `player_class_stats` table, ignoring.", current_level); + continue; } - if (PlayerInfo* info = _playerInfo[current_race][current_class]) + for (std::size_t race = 0; race < raceStatModifiers.size(); ++race) { - if (!info->levelInfo) - info->levelInfo = new PlayerLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)]; + if (PlayerInfo* info = _playerInfo[race][current_class]) + { + if (!info->levelInfo) + info->levelInfo = new PlayerLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)]; - PlayerLevelInfo& levelInfo = info->levelInfo[current_level - 1]; - for (uint8 i = 0; i < MAX_STATS; i++) - levelInfo.stats[i] = fields[i + 3].Get(); + PlayerLevelInfo& levelInfo = info->levelInfo[current_level - 1]; + for (int i = 0; i < MAX_STATS; ++i) + levelInfo.stats[i] = fields[i + 2].Get() + raceStatModifiers[race].StatModifier[i]; + } } ++count; From 9b525d1cee9c00be5a8f46ffeecd792fe3d0b97a Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Mon, 2 Jan 2023 21:06:12 +0100 Subject: [PATCH 45/66] fix(Core/Gameobjects): Fixed LoS for traps summoned by creatures. (#13873) --- src/server/game/Grids/Notifiers/GridNotifiers.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index d14d20479..2b3b51b44 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -930,10 +930,7 @@ namespace Acore if (i_obj->GetTypeId() == TYPEID_GAMEOBJECT) { losChecks &= ~LINEOFSIGHT_CHECK_GOBJECT_M2; - if (i_owner->IsPlayer()) - { - collisionHeight = i_owner->GetCollisionHeight(); - } + collisionHeight = i_owner->GetCollisionHeight(); } if (!i_obj->IsWithinDistInMap(u, i_range) || !i_owner->IsValidAttackTarget(u) || From aae46cc8afebb113ccffc0c62722389ba2fe3991 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Mon, 2 Jan 2023 20:08:19 +0000 Subject: [PATCH 46/66] chore(DB): import pending files Referenced commit(s): 9b525d1cee9c00be5a8f46ffeecd792fe3d0b97a --- .../levelstats-squeesh.sql => db_world/2023_01_02_04.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/levelstats-squeesh.sql => db_world/2023_01_02_04.sql} (99%) diff --git a/data/sql/updates/pending_db_world/levelstats-squeesh.sql b/data/sql/updates/db_world/2023_01_02_04.sql similarity index 99% rename from data/sql/updates/pending_db_world/levelstats-squeesh.sql rename to data/sql/updates/db_world/2023_01_02_04.sql index 0b6eafd4b..52ffa6dcb 100644 --- a/data/sql/updates/pending_db_world/levelstats-squeesh.sql +++ b/data/sql/updates/db_world/2023_01_02_04.sql @@ -1,3 +1,4 @@ +-- DB update 2023_01_02_03 -> 2023_01_02_04 DROP TABLE IF EXISTS `player_levelstats`; DROP TABLE IF EXISTS `player_class_stats`; CREATE TABLE IF NOT EXISTS `player_class_stats` ( From 24fa3ba82852c4321b8a6bd9991f22a3f3246ebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Mauger?= Date: Mon, 2 Jan 2023 22:26:12 +0100 Subject: [PATCH 47/66] fix(MMAP/core/PathGenerator): Try to fix more water creatures (#13705) Co-authored-by: jackpoz --- src/common/Collision/Maps/MapDefines.h | 2 +- src/server/game/Entities/Unit/Unit.cpp | 2 +- .../MovementGenerators/PathGenerator.cpp | 26 ++++++++++--------- src/tools/mmaps_generator/TerrainBuilder.cpp | 4 +++ 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/common/Collision/Maps/MapDefines.h b/src/common/Collision/Maps/MapDefines.h index 84373b6d8..94f926c8c 100644 --- a/src/common/Collision/Maps/MapDefines.h +++ b/src/common/Collision/Maps/MapDefines.h @@ -13,7 +13,7 @@ #define SIZE_OF_GRIDS 533.3333f #define MMAP_MAGIC 0x4d4d4150 // 'MMAP' -#define MMAP_VERSION 15 +#define MMAP_VERSION 16 struct MmapTileHeader { diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index b9e004722..99ea6471c 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -4166,7 +4166,7 @@ bool Unit::isInAccessiblePlaceFor(Creature const* c) const } LiquidStatus liquidStatus = GetLiquidData().Status; - bool isInWater = (liquidStatus & MAP_LIQUID_STATUS_SWIMMING) != 0; + bool isInWater = (liquidStatus & MAP_LIQUID_STATUS_IN_CONTACT) != 0; // In water or jumping in water if (isInWater || (liquidStatus == LIQUID_MAP_ABOVE_WATER && (IsFalling() || (ToPlayer() && ToPlayer()->IsFalling())))) diff --git a/src/server/game/Movement/MovementGenerators/PathGenerator.cpp b/src/server/game/Movement/MovementGenerators/PathGenerator.cpp index b07a0c9e4..0a8bbb566 100644 --- a/src/server/game/Movement/MovementGenerators/PathGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/PathGenerator.cpp @@ -209,25 +209,29 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con // we just need to remove/normalize paths between 2 adjacent points if (startFarFromPoly || endFarFromPoly) { - bool buildShotrcut = false; + bool buildShortcut = false; - bool isUnderWaterStart = _source->GetMap()->IsUnderWater(_source->GetPhaseMask(), startPos.x, startPos.y, startPos.z, _source->GetCollisionHeight()); - bool isUnderWaterEnd = _source->GetMap()->IsUnderWater(_source->GetPhaseMask(), endPos.x, endPos.y, endPos.z, _source->GetCollisionHeight()); - bool isFarUnderWater = startFarFromPoly ? isUnderWaterStart : isUnderWaterEnd; + auto liquidDataStart = _source->GetMap()->GetLiquidData(_source->GetPhaseMask(), startPos.x, startPos.y, startPos.z, _source->GetCollisionHeight(), MAP_ALL_LIQUIDS); + auto liquidDataEnd = _source->GetMap()->GetLiquidData(_source->GetPhaseMask(), endPos.x, endPos.y, endPos.z, _source->GetCollisionHeight(), MAP_ALL_LIQUIDS); + bool startUnderWaterEndInWater = liquidDataStart.Status == LIQUID_MAP_UNDER_WATER && + (liquidDataEnd.Status & MAP_LIQUID_STATUS_IN_CONTACT) != 0; + bool startInWaterEndUnderWater = (liquidDataStart.Status & MAP_LIQUID_STATUS_IN_CONTACT) != 0 && + liquidDataEnd.Status == LIQUID_MAP_UNDER_WATER; + bool waterPath = startUnderWaterEndInWater || startInWaterEndUnderWater; Unit const* _sourceUnit = _source->ToUnit(); if (_sourceUnit) { - bool isUnderWater = (_sourceUnit->CanSwim() && isUnderWaterStart && isUnderWaterEnd) || (isFarUnderWater && _useRaycast); + bool isWater = (_sourceUnit->CanSwim() && waterPath); - if (isUnderWater || _sourceUnit->CanFly() || (_sourceUnit->IsFalling() && endPos.z < startPos.z)) + if (isWater || _sourceUnit->CanFly() || (_sourceUnit->IsFalling() && endPos.z < startPos.z)) { - buildShotrcut = true; + buildShortcut = true; } } - if (buildShotrcut) + if (buildShortcut) { BuildShortcut(); _type = PathType(PATHFIND_NORMAL | PATHFIND_NOT_USING_PATH); @@ -236,8 +240,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con return; } - - if (!isFarUnderWater) + else { float closestPoint[VERTEX_SIZE]; // we may want to use closestPointOnPolyBoundary instead @@ -679,12 +682,11 @@ void PathGenerator::UpdateFilter() NavTerrain PathGenerator::GetNavTerrain(float x, float y, float z) const { - LiquidData data; LiquidData const& liquidData = _source->GetMap()->GetLiquidData(_source->GetPhaseMask(), x, y, z, _source->GetCollisionHeight(), MAP_ALL_LIQUIDS); if (liquidData.Status == LIQUID_MAP_NO_WATER) return NAV_GROUND; - switch (data.Flags) + switch (liquidData.Flags) { case MAP_LIQUID_TYPE_WATER: case MAP_LIQUID_TYPE_OCEAN: diff --git a/src/tools/mmaps_generator/TerrainBuilder.cpp b/src/tools/mmaps_generator/TerrainBuilder.cpp index ce791f045..0e394488c 100644 --- a/src/tools/mmaps_generator/TerrainBuilder.cpp +++ b/src/tools/mmaps_generator/TerrainBuilder.cpp @@ -504,6 +504,10 @@ namespace MMAP minTLevel = h; } + // terrain under the liquid? + if (minLLevel > maxTLevel) + useTerrain = false; + //liquid under the terrain? if (minTLevel > maxLLevel) useLiquid = false; From f65d2298236a2c73800ddaa304ef7a06df185253 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Mon, 2 Jan 2023 18:27:22 -0300 Subject: [PATCH 48/66] =?UTF-8?q?Revert=20"fix(Core/Config):=20Set=20defau?= =?UTF-8?q?lt=20corpse=20decay=20for=20normal=20creatures=20to=205=20?= =?UTF-8?q?=E2=80=A6"=20(#14474)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/apps/worldserver/worldserver.conf.dist | 8 ++++---- src/server/game/World/World.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist index b18e57f72..74889c9e6 100644 --- a/src/server/apps/worldserver/worldserver.conf.dist +++ b/src/server/apps/worldserver/worldserver.conf.dist @@ -1691,13 +1691,13 @@ WorldBossLevelDiff = 3 # Corpse.Decay.RAREELITE # Corpse.Decay.WORLDBOSS # Description: Time (in seconds) until creature corpse will decay if not looted or skinned. -# Default: 300 - (5 Minutes, Corpse.Decay.NORMAL) +# Default: 60 - (1 Minute, Corpse.Decay.NORMAL) # 300 - (5 Minutes, Corpse.Decay.RARE) # 300 - (5 Minutes, Corpse.Decay.ELITE) # 300 - (5 Minutes, Corpse.Decay.RAREELITE) # 3600 - (1 Hour, Corpse.Decay.WORLDBOSS) -Corpse.Decay.NORMAL = 300 +Corpse.Decay.NORMAL = 60 Corpse.Decay.RARE = 300 Corpse.Decay.ELITE = 300 Corpse.Decay.RAREELITE = 300 @@ -1707,9 +1707,9 @@ Corpse.Decay.WORLDBOSS = 3600 # Rate.Corpse.Decay.Looted # Description: Multiplier for Corpse.Decay.* to configure how long creature corpses stay # after they have been looted. -# Default: 1.0 +# Default: 0.5 -Rate.Corpse.Decay.Looted = 1.0 +Rate.Corpse.Decay.Looted = 0.5 # # Rate.Creature.Normal.Damage diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 77998a6d9..9aa0286d6 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -582,7 +582,7 @@ void World::LoadConfigSettings(bool reload) rate_values[RATE_MOVESPEED] = 1.0f; } for (uint8 i = 0; i < MAX_MOVE_TYPE; ++i) playerBaseMoveSpeed[i] = baseMoveSpeed[i] * rate_values[RATE_MOVESPEED]; - rate_values[RATE_CORPSE_DECAY_LOOTED] = sConfigMgr->GetOption("Rate.Corpse.Decay.Looted", 1.0f); + rate_values[RATE_CORPSE_DECAY_LOOTED] = sConfigMgr->GetOption("Rate.Corpse.Decay.Looted", 0.5f); rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] = sConfigMgr->GetOption("TargetPosRecalculateRange", 1.5f); if (rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] < CONTACT_DISTANCE) @@ -1095,7 +1095,7 @@ void World::LoadConfigSettings(bool reload) m_int_configs[CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY] = sConfigMgr->GetOption("ChatStrictLinkChecking.Severity", 0); m_int_configs[CONFIG_CHAT_STRICT_LINK_CHECKING_KICK] = sConfigMgr->GetOption("ChatStrictLinkChecking.Kick", 0); - m_int_configs[CONFIG_CORPSE_DECAY_NORMAL] = sConfigMgr->GetOption("Corpse.Decay.NORMAL", 300); + m_int_configs[CONFIG_CORPSE_DECAY_NORMAL] = sConfigMgr->GetOption("Corpse.Decay.NORMAL", 60); m_int_configs[CONFIG_CORPSE_DECAY_RARE] = sConfigMgr->GetOption("Corpse.Decay.RARE", 300); m_int_configs[CONFIG_CORPSE_DECAY_ELITE] = sConfigMgr->GetOption("Corpse.Decay.ELITE", 300); m_int_configs[CONFIG_CORPSE_DECAY_RAREELITE] = sConfigMgr->GetOption("Corpse.Decay.RAREELITE", 300); From 9e18b86311432170700e8e5b31c5f777023c814d Mon Sep 17 00:00:00 2001 From: Angelo Venturini Date: Mon, 2 Jan 2023 20:43:20 -0300 Subject: [PATCH 49/66] =?UTF-8?q?fix(Core/Auras):=20SPELL=5FAURA=5FMOD=5FS?= =?UTF-8?q?CALE=20should=20scale=20additively=20instead=E2=80=A6=20(#14425?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...multiplicatively Co-authored-by: Shauren --- .../game/Entities/Creature/Creature.cpp | 7 +++- src/server/game/Entities/Creature/Creature.h | 1 + src/server/game/Entities/Pet/Pet.cpp | 35 +++++++++++-------- src/server/game/Entities/Pet/Pet.h | 1 + src/server/game/Entities/Unit/Unit.cpp | 8 +++++ src/server/game/Entities/Unit/Unit.h | 2 ++ .../game/Spells/Auras/SpellAuraEffects.cpp | 8 ++--- 7 files changed, 41 insertions(+), 21 deletions(-) diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index cf1663a8b..ef647feb5 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -474,7 +474,7 @@ bool Creature::InitEntry(uint32 Entry, const CreatureData* data) SetSpeed(MOVE_FLIGHT, cinfo->speed_flight); // Will set UNIT_FIELD_BOUNDINGRADIUS and UNIT_FIELD_COMBATREACH - SetObjectScale(cinfo->scale); + SetObjectScale(GetNativeObjectScale()); SetFloatValue(UNIT_FIELD_HOVERHEIGHT, cinfo->HoverHeight); @@ -3350,6 +3350,11 @@ void Creature::UpdateMovementFlags() SetSwim(CanSwim() && Swim); } +float Creature::GetNativeObjectScale() const +{ + return GetCreatureTemplate()->scale; +} + void Creature::SetObjectScale(float scale) { Unit::SetObjectScale(scale); diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 3303002ac..adf6bc68b 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -51,6 +51,7 @@ public: void AddToWorld() override; void RemoveFromWorld() override; + float GetNativeObjectScale() const override; void SetObjectScale(float scale) override; void SetDisplayId(uint32 modelId) override; diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index f8107478f..1a519a37a 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -1073,20 +1073,8 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0f); - //scale - CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family); - if (cFamily && cFamily->minScale > 0.0f && petType == HUNTER_PET) - { - float scale; - if (GetLevel() >= cFamily->maxScaleLevel) - scale = 1.0f; - else if (GetLevel() <= cFamily->minScaleLevel) - scale = 0.5f; - else - scale = 0.5f + 0.5f * float(GetLevel() - cFamily->minScaleLevel) / float(cFamily->maxScaleLevel - cFamily->minScaleLevel); - - SetObjectScale(scale); - } + // scale + SetObjectScale(GetNativeObjectScale()); // Resistance // xinef: hunter pets should not inherit template resistances @@ -2440,6 +2428,25 @@ Player* Pet::GetOwner() const return m_owner; } +float Pet::GetNativeObjectScale() const +{ + CreatureFamilyEntry const* creatureFamily = sCreatureFamilyStore.LookupEntry(GetCreatureTemplate()->family); + if (creatureFamily && creatureFamily->minScale > 0.0f && getPetType() == HUNTER_PET) + { + float scale; + if (GetLevel() >= creatureFamily->maxScaleLevel) + scale = creatureFamily->maxScale; + else if (GetLevel() <= creatureFamily->minScaleLevel) + scale = creatureFamily->minScale; + else + scale = creatureFamily->minScale + float(GetLevel() - creatureFamily->minScaleLevel) / creatureFamily->maxScaleLevel * (creatureFamily->maxScale - creatureFamily->minScale); + + return scale; + } + + return Guardian::GetNativeObjectScale(); +} + std::string Pet::GenerateActionBarData() const { std::ostringstream oss; diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h index 12086749d..329672d8c 100644 --- a/src/server/game/Entities/Pet/Pet.h +++ b/src/server/game/Entities/Pet/Pet.h @@ -45,6 +45,7 @@ public: void AddToWorld() override; void RemoveFromWorld() override; + float GetNativeObjectScale() const override; void SetDisplayId(uint32 modelId) override; PetType getPetType() const { return m_petType; } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 99ea6471c..4314fbcc5 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -16864,6 +16864,14 @@ bool Unit::IsPolymorphed() const return spellInfo->GetSpellSpecific() == SPELL_SPECIFIC_MAGE_POLYMORPH; } +void Unit::RecalculateObjectScale() +{ + int32 scaleAuras = GetTotalAuraModifier(SPELL_AURA_MOD_SCALE) + GetTotalAuraModifier(SPELL_AURA_MOD_SCALE_2); + float scale = GetNativeObjectScale() + CalculatePct(1.0f, scaleAuras); + float scaleMin = GetTypeId() == TYPEID_PLAYER ? 0.1f : 0.01f; + SetObjectScale(std::max(scale, scaleMin)); +} + void Unit::SetDisplayId(uint32 modelId) { SetUInt32Value(UNIT_FIELD_DISPLAYID, modelId); diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 4850d5323..2db7c364b 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -2162,6 +2162,8 @@ public: void AddInterruptMask(uint32 mask) { m_interruptMask |= mask; } void UpdateInterruptMask(); + virtual float GetNativeObjectScale() const { return 1.0f; } + virtual void RecalculateObjectScale(); [[nodiscard]] uint32 GetDisplayId() const { return GetUInt32Value(UNIT_FIELD_DISPLAYID); } virtual void SetDisplayId(uint32 modelId); [[nodiscard]] uint32 GetNativeDisplayId() const { return GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID); } diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 60f97bf15..8ec38060c 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -2349,16 +2349,12 @@ void AuraEffect::HandleAuraTransform(AuraApplication const* aurApp, uint8 mode, } } -void AuraEffect::HandleAuraModScale(AuraApplication const* aurApp, uint8 mode, bool apply) const +void AuraEffect::HandleAuraModScale(AuraApplication const* aurApp, uint8 mode, bool /*apply*/) const { if (!(mode & AURA_EFFECT_HANDLE_CHANGE_AMOUNT_SEND_FOR_CLIENT_MASK)) return; - Unit* target = aurApp->GetTarget(); - - float scale = target->GetObjectScale(); - ApplyPercentModFloatVar(scale, float(GetAmount()), apply); - target->SetObjectScale(scale); + aurApp->GetTarget()->RecalculateObjectScale(); } void AuraEffect::HandleAuraCloneCaster(AuraApplication const* aurApp, uint8 mode, bool apply) const From b7e002ebae31f2fbafd88a4711937ae6daf67feb Mon Sep 17 00:00:00 2001 From: Angelo Venturini Date: Mon, 2 Jan 2023 20:43:42 -0300 Subject: [PATCH 50/66] fix(Core/Scripts): Rewrite Hungarfen (#14426) --- .../rev_1672351799345921400.sql | 30 ++ .../underbog/boss_ghazan.cpp | 15 +- .../underbog/boss_hungarfen.cpp | 197 +++++++++++++ .../underbog/boss_the_black_stalker.cpp | 259 ++++++++---------- .../underbog/instance_the_underbog.cpp | 36 +-- .../CoilfangReservoir/underbog/the_underbog.h | 14 +- .../scripts/Outland/outland_script_loader.cpp | 6 +- 7 files changed, 376 insertions(+), 181 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1672351799345921400.sql create mode 100644 src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp diff --git a/data/sql/updates/pending_db_world/rev_1672351799345921400.sql b/data/sql/updates/pending_db_world/rev_1672351799345921400.sql new file mode 100644 index 000000000..d40945032 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672351799345921400.sql @@ -0,0 +1,30 @@ +-- +UPDATE `creature_template` SET `ScriptName` = 'boss_hungarfen', `AIName` = '' WHERE `entry` = 17770; +UPDATE `creature_template` SET `ScriptName` = 'npc_underbog_mushroom', `AIName` = '', `scale` = 1, `faction` = 14, `speed_walk` = 1 WHERE `entry` = 17990; +UPDATE `creature_template` SET `scale` = 1, `faction` = 14, `speed_walk` = 1 WHERE `entry` = 20189; +UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|33554432, `speed_walk` = 1, `speed_run` = 1.57143 WHERE `entry` IN (17770, 20169); + +DELETE FROM `smart_scripts` WHERE `entryorguid` = 17770 AND `source_type` = 0; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 17990 AND `source_type` = 0; + +DELETE FROM `creature_template_addon` WHERE `entry` IN (17990, 20189); +INSERT INTO `creature_template_addon` (`entry`, `auras`) VALUES +(17990, '31690'), +(20189, '31690'); + +DELETE FROM `creature_template_movement` WHERE `CreatureId` IN (17990, 20189); +INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`) VALUES +(17990, 0, 0, 0, 1, 0, 0), +(20189, 0, 0, 0, 1, 0, 0); + +UPDATE `spell_dbc` SET `Effect_1` = 28, `EffectMiscValueB_1` = 64 WHERE `ID` = 31692; + +DELETE FROM `spell_script_names` WHERE `spell_id` = 34168 AND `ScriptName` = 'spell_spore_cloud'; +DELETE FROM `spell_script_names` WHERE `spell_id` = 34874 AND `ScriptName` = 'spell_despawn_underbog_mushrooms'; +INSERT INTO `spell_script_names` VALUES +(34168, 'spell_spore_cloud'), +(34874, 'spell_despawn_underbog_mushrooms'); + +DELETE FROM `creature_text` WHERE `CreatureID` = 17770; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(17770, 0, 0, 'Hungarfen roars in pain.', 16, 0, 100, 0, 0, 0, 16594, 0, 'Hungarfen - On 20% EMOTE'); diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_ghazan.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_ghazan.cpp index a70bc4e04..96ac8a247 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_ghazan.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_ghazan.cpp @@ -35,9 +35,9 @@ enum eBlackStalker ACTION_MOVE_TO_PLATFORM = 1 }; -struct boss_ghazan : public ScriptedAI +struct boss_ghazan : public BossAI { - boss_ghazan(Creature* creature) : ScriptedAI(creature) + boss_ghazan(Creature* creature) : BossAI(creature, DATA_GHAZAN) { } @@ -50,19 +50,22 @@ struct boss_ghazan : public ScriptedAI void Reset() override { - events.Reset(); _enraged = false; if (!_reachedPlatform) { _movedToPlatform = false; } + + BossAI::Reset(); } - void EnterCombat(Unit*) override + void EnterCombat(Unit* who) override { events.ScheduleEvent(EVENT_ACID_BREATH, 3s); events.ScheduleEvent(EVENT_ACID_SPIT, 1s); events.ScheduleEvent(EVENT_TAIL_SWEEP, DUNGEON_MODE(5900ms, 10s)); + + BossAI::EnterCombat(who); } void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*type*/, SpellSchoolMask /*school*/) override @@ -106,6 +109,8 @@ struct boss_ghazan : public ScriptedAI { me->GetMotionMaster()->MoveRandom(12.f); } + + BossAI::JustReachedHome(); } void UpdateAI(uint32 diff) override @@ -164,7 +169,7 @@ public: { if (InstanceScript* instance = player->GetInstanceScript()) { - if (Creature* ghazan = ObjectAccessor::GetCreature(*player, instance->GetGuidData(NPC_GHAZAN))) + if (Creature* ghazan = instance->GetCreature(DATA_GHAZAN)) { ghazan->AI()->DoAction(ACTION_MOVE_TO_PLATFORM); return true; diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp new file mode 100644 index 000000000..a8e71dc16 --- /dev/null +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp @@ -0,0 +1,197 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "Player.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellScript.h" +#include "TaskScheduler.h" +#include "the_underbog.h" + +enum Spells +{ + // Hungarfen + SPELL_SPAWN_MUSHROOMS = 31692, + SPELL_DESPAWN_MUSHROOMS = 34874, + SPELL_FOUL_SPORES = 31673, + SPELL_ACID_GEYSER = 38739, + + // Underbog Mushroom + SPELL_SHRINK = 31691, + SPELL_GROW = 31698, + SPELL_SPORE_CLOUD = 34168 +}; + +enum Misc +{ + MAX_GROW_REPEAT = 9, + EMOTE_ROARS = 0 +}; + +struct boss_hungarfen : public BossAI +{ + boss_hungarfen(Creature* creature) : BossAI(creature, DATA_HUNGARFEN), _foul_spores(false) { } + + void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType, SpellSchoolMask) override + { + if (me->HealthBelowPctDamaged(20, damage) && !_foul_spores) + { + _foul_spores = true; + me->AddUnitState(UNIT_STATE_ROOT); + Talk(EMOTE_ROARS); + DoCastSelf(SPELL_FOUL_SPORES); + _scheduler.DelayAll(11s); + _scheduler.Schedule(11s, [this](TaskContext /*context*/) + { + me->ClearUnitState(UNIT_STATE_ROOT); + }); + } + } + + void Reset() override + { + BossAI::Reset(); + _foul_spores = false; + _scheduler.CancelAll(); + DoCastAOE(SPELL_DESPAWN_MUSHROOMS, true); + } + + void EnterCombat(Unit* who) override + { + BossAI::EnterCombat(who); + + _scheduler.Schedule(IsHeroic() ? randtime(2400ms, 3600ms) : 10s, [this](TaskContext context) + { + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0, true)) + { + target->CastSpell(target, SPELL_SPAWN_MUSHROOMS, true); + } + + context.Repeat(); + }); + + if (IsHeroic()) + { + _scheduler.Schedule(6s, [this](TaskContext context) + { + DoCastAOE(SPELL_ACID_GEYSER); + context.Repeat(8500ms, 11s); + }); + } + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + return; + + _scheduler.Update(diff, [this] + { + DoMeleeAttackIfReady(); + }); + } + +private: + TaskScheduler _scheduler; + bool _foul_spores; +}; + +struct npc_underbog_mushroom : public ScriptedAI +{ + npc_underbog_mushroom(Creature* creature) : ScriptedAI(creature) { } + + void InitializeAI() override + { + DoCastSelf(SPELL_SHRINK, true); + + _scheduler.Schedule(2s, [this](TaskContext context) + { + DoCastSelf(SPELL_GROW, true); + + if (context.GetRepeatCounter() == MAX_GROW_REPEAT) + { + DoCastSelf(SPELL_SPORE_CLOUD); + + context.Schedule(4s, [this](TaskContext /*context*/) + { + me->RemoveAurasDueToSpell(SPELL_GROW); + me->DespawnOrUnsummon(2000); + }); + } + else + context.Repeat(); + }); + } + + void UpdateAI(uint32 diff) override + { + _scheduler.Update(diff); + } + +protected: + TaskScheduler _scheduler; +}; + +class spell_spore_cloud : public AuraScript +{ + PrepareAuraScript(spell_spore_cloud); + + void HandlePeriodic(AuraEffect const* /*aurEff*/) + { + PreventDefaultAction(); + + if (Unit* caster = GetCaster()) + { + if (InstanceScript* instance = caster->GetInstanceScript()) + { + if (Creature* hungarfen = instance->GetCreature(DATA_HUNGARFEN)) + caster->CastSpell((Unit*)nullptr, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, true, nullptr, nullptr, hungarfen->GetGUID()); + } + } + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_spore_cloud::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } +}; + +class spell_despawn_underbog_mushrooms : public SpellScript +{ + PrepareSpellScript(spell_despawn_underbog_mushrooms); + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Unit* target = GetHitUnit()) + if (Creature* cTarget = target->ToCreature()) + if (cTarget->GetEntry() == NPC_UNDERBOG_MUSHROOM) + cTarget->DespawnOrUnsummon(); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_despawn_underbog_mushrooms::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + +void AddSC_boss_hungarfen() +{ + RegisterUnderbogCreatureAI(boss_hungarfen); + RegisterUnderbogCreatureAI(npc_underbog_mushroom); + RegisterSpellScript(spell_spore_cloud); + RegisterSpellScript(spell_despawn_underbog_mushrooms); +} diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp index 6d3344c9a..631060c1c 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp @@ -15,13 +15,6 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Boss_the_black_stalker -SD%Complete: 95 -SDComment: Timers may be incorrect -SDCategory: Coilfang Resevoir, Underbog -EndScriptData */ - #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" @@ -48,173 +41,147 @@ enum eBlackStalker ENTRY_SPORE_STRIDER = 22299 }; -class boss_the_black_stalker : public CreatureScript +struct boss_the_black_stalker : public BossAI { -public: - boss_the_black_stalker() : CreatureScript("boss_the_black_stalker") { } - - CreatureAI* GetAI(Creature* creature) const override + boss_the_black_stalker(Creature* creature) : BossAI(creature, DATA_BLACK_STALKER) { - return GetTheUnderbogAI(creature); } - struct boss_the_black_stalkerAI : public ScriptedAI + void Reset() override { - boss_the_black_stalkerAI(Creature* creature) : ScriptedAI(creature), summons(me) - { - } + lTarget.Clear(); + BossAI::Reset(); + } - EventMap events; - SummonList summons; - ObjectGuid lTarget; + void EnterCombat(Unit* who) override + { + events.ScheduleEvent(EVENT_LEVITATE, 12000); + events.ScheduleEvent(EVENT_SPELL_CHAIN, 6000); + events.ScheduleEvent(EVENT_SPELL_STATIC, 10000); + events.ScheduleEvent(EVENT_CHECK, 5000); + if (IsHeroic()) + events.ScheduleEvent(EVENT_SPELL_SPORES, urand(10000, 15000)); - void Reset() override - { - events.Reset(); - summons.DespawnAll(); - lTarget.Clear(); - } + BossAI::EnterCombat(who); + } - void EnterCombat(Unit*) override - { - events.ScheduleEvent(EVENT_LEVITATE, 12000); - events.ScheduleEvent(EVENT_SPELL_CHAIN, 6000); - events.ScheduleEvent(EVENT_SPELL_STATIC, 10000); - events.ScheduleEvent(EVENT_CHECK, 5000); - if (IsHeroic()) - events.ScheduleEvent(EVENT_SPELL_SPORES, urand(10000, 15000)); - } + void JustSummoned(Creature* summon) override + { + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1)) + summon->AI()->AttackStart(target); + else if (me->GetVictim()) + summon->AI()->AttackStart(me->GetVictim()); - void JustSummoned(Creature* summon) override - { - summons.Summon(summon); - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1)) - summon->AI()->AttackStart(target); - else if (me->GetVictim()) - summon->AI()->AttackStart(me->GetVictim()); - } + BossAI::JustSummoned(summon); + } - void SummonedCreatureDies(Creature* summon, Unit*) override + void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override + { + summons.Despawn(summon); + for (uint8 i = 0; i < 3; ++i) + me->CastSpell(me, SPELL_SUMMON_SPORE_STRIDER, false); + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + return; + + events.Update(diff); + switch (events.ExecuteEvent()) { - summons.Despawn(summon); - for (uint8 i = 0; i < 3; ++i) + case EVENT_CHECK: + float x, y, z, o; + me->GetHomePosition(x, y, z, o); + if (!me->IsWithinDist3d(x, y, z, 60)) + { + EnterEvadeMode(); + return; + } + events.RepeatEvent(5000); + break; + case EVENT_SPELL_SPORES: me->CastSpell(me, SPELL_SUMMON_SPORE_STRIDER, false); - } - - void JustDied(Unit*) override - { - summons.DespawnAll(); - } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - events.Update(diff); - switch (events.ExecuteEvent()) - { - case EVENT_CHECK: - float x, y, z, o; - me->GetHomePosition(x, y, z, o); - if (!me->IsWithinDist3d(x, y, z, 60)) + events.RepeatEvent(urand(10000, 15000)); + break; + case EVENT_SPELL_CHAIN: + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0)) + me->CastSpell(target, SPELL_CHAIN_LIGHTNING, false); + events.DelayEvents(3000); + events.RepeatEvent(9000); + break; + case EVENT_SPELL_STATIC: + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30, true)) + me->CastSpell(target, SPELL_STATIC_CHARGE, false); + events.RepeatEvent(10000); + break; + case EVENT_LEVITATE: + events.RepeatEvent(15000); + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1)) + { + me->CastSpell(target, SPELL_LEVITATE, false); + lTarget = target->GetGUID(); + events.DelayEvents(5000); + events.ScheduleEvent(EVENT_LEVITATE_TARGET_1, 2000); + } + break; + case EVENT_LEVITATE_TARGET_1: + if (Unit* target = ObjectAccessor::GetUnit(*me, lTarget)) + { + if (!target->HasAura(SPELL_LEVITATE)) + lTarget.Clear(); + else { - EnterEvadeMode(); - return; + target->CastSpell(target, SPELL_MAGNETIC_PULL, true); + events.ScheduleEvent(EVENT_LEVITATE_TARGET_2, 1500); } - events.RepeatEvent(5000); - break; - case EVENT_SPELL_SPORES: - me->CastSpell(me, SPELL_SUMMON_SPORE_STRIDER, false); - events.RepeatEvent(urand(10000, 15000)); - break; - case EVENT_SPELL_CHAIN: - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0)) - me->CastSpell(target, SPELL_CHAIN_LIGHTNING, false); - events.DelayEvents(3000); - events.RepeatEvent(9000); - break; - case EVENT_SPELL_STATIC: - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30, true)) - me->CastSpell(target, SPELL_STATIC_CHARGE, false); - events.RepeatEvent(10000); - break; - case EVENT_LEVITATE: - events.RepeatEvent(15000); - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1)) + } + break; + case EVENT_LEVITATE_TARGET_2: + if (Unit* target = ObjectAccessor::GetUnit(*me, lTarget)) + { + if (!target->HasAura(SPELL_LEVITATE)) + lTarget.Clear(); + else { - me->CastSpell(target, SPELL_LEVITATE, false); - lTarget = target->GetGUID(); - events.DelayEvents(5000); - events.ScheduleEvent(EVENT_LEVITATE_TARGET_1, 2000); + target->AddAura(SPELL_SUSPENSION, target); + lTarget.Clear(); } - break; - case EVENT_LEVITATE_TARGET_1: - if (Unit* target = ObjectAccessor::GetUnit(*me, lTarget)) - { - if (!target->HasAura(SPELL_LEVITATE)) - lTarget.Clear(); - else - { - target->CastSpell(target, SPELL_MAGNETIC_PULL, true); - events.ScheduleEvent(EVENT_LEVITATE_TARGET_2, 1500); - } - } - break; - case EVENT_LEVITATE_TARGET_2: - if (Unit* target = ObjectAccessor::GetUnit(*me, lTarget)) - { - if (!target->HasAura(SPELL_LEVITATE)) - lTarget.Clear(); - else - { - target->AddAura(SPELL_SUSPENSION, target); - lTarget.Clear(); - } - } - break; + } + break; } - DoMeleeAttackIfReady(); - } - }; + DoMeleeAttackIfReady(); + } + +private: + ObjectGuid lTarget; }; -class spell_gen_allergies : public SpellScriptLoader +class spell_gen_allergies : public AuraScript { -public: - spell_gen_allergies() : SpellScriptLoader("spell_gen_allergies") { } + PrepareAuraScript(spell_gen_allergies); - class spell_gen_allergies_AuraScript : public AuraScript + void CalcPeriodic(AuraEffect const* /*effect*/, bool& isPeriodic, int32& amplitude) { - PrepareAuraScript(spell_gen_allergies_AuraScript); + isPeriodic = true; + amplitude = urand(10 * IN_MILLISECONDS, 200 * IN_MILLISECONDS); + } - void CalcPeriodic(AuraEffect const* /*effect*/, bool& isPeriodic, int32& amplitude) - { - isPeriodic = true; - amplitude = urand(10 * IN_MILLISECONDS, 200 * IN_MILLISECONDS); - } - - void Update(AuraEffect* /*effect*/) - { - SetDuration(0); - } - - void Register() override - { - DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_gen_allergies_AuraScript::CalcPeriodic, EFFECT_0, SPELL_AURA_DUMMY); - OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_gen_allergies_AuraScript::Update, EFFECT_0, SPELL_AURA_DUMMY); - } - }; - - AuraScript* GetAuraScript() const override + void Update(AuraEffect* /*effect*/) { - return new spell_gen_allergies_AuraScript(); + SetDuration(0); + } + + void Register() override + { + DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_gen_allergies::CalcPeriodic, EFFECT_0, SPELL_AURA_DUMMY); + OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_gen_allergies::Update, EFFECT_0, SPELL_AURA_DUMMY); } }; void AddSC_boss_the_black_stalker() { - new boss_the_black_stalker(); - new spell_gen_allergies(); + RegisterUnderbogCreatureAI(boss_the_black_stalker); + RegisterSpellScript(spell_gen_allergies); } diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp index b30f1915c..a6e8c232d 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp @@ -20,6 +20,12 @@ #include "ScriptMgr.h" #include "the_underbog.h" +ObjectData const creatureData[] = +{ + { NPC_HUNGARFEN, DATA_HUNGARFEN }, + { NPC_GHAZAN, DATA_GHAZAN } +}; + class instance_the_underbog : public InstanceMapScript { public: @@ -34,35 +40,11 @@ public: { instance_the_underbog_InstanceMapScript(Map* map) : InstanceScript(map) { } - void OnCreatureCreate(Creature* creature) override + void Initialize() override { - InstanceScript::OnCreatureCreate(creature); - - switch (creature->GetEntry()) - { - case NPC_GHAZAN: - _ghazanGUID = creature->GetGUID(); - break; - default: - break; - } + SetBossNumber(MAX_ENCOUNTERS); + LoadObjectData(creatureData, nullptr); } - - ObjectGuid GetGuidData(uint32 type) const override - { - switch (type) - { - case NPC_GHAZAN: - return _ghazanGUID; - default: - break; - } - - return ObjectGuid::Empty; - } - - private: - ObjectGuid _ghazanGUID; }; }; diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/the_underbog.h b/src/server/scripts/Outland/CoilfangReservoir/underbog/the_underbog.h index 9b0a51b1d..b4230967a 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/the_underbog.h +++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/the_underbog.h @@ -22,9 +22,21 @@ #define TheUnderbogScriptName "instance_the_underbog" +enum Data +{ + DATA_HUNGARFEN = 0, + DATA_GHAZAN = 1, + DATA_MUSELEK = 2, + DATA_BLACK_STALKER = 3, + + MAX_ENCOUNTERS = 4 +}; + enum NPCs { - NPC_GHAZAN = 18105 + NPC_HUNGARFEN = 17770, + NPC_UNDERBOG_MUSHROOM = 17990, + NPC_GHAZAN = 18105 }; template diff --git a/src/server/scripts/Outland/outland_script_loader.cpp b/src/server/scripts/Outland/outland_script_loader.cpp index bacda01c0..310ee1e7a 100644 --- a/src/server/scripts/Outland/outland_script_loader.cpp +++ b/src/server/scripts/Outland/outland_script_loader.cpp @@ -50,8 +50,9 @@ void AddSC_boss_hydromancer_thespia(); //CR Steam Vault void AddSC_boss_mekgineer_steamrigger(); void AddSC_boss_warlord_kalithresh(); void AddSC_instance_steam_vault(); -void AddSC_boss_the_black_stalker(); //CR Underbog +void AddSC_boss_hungarfen(); //CR Underbog void AddSC_boss_ghazan(); +void AddSC_boss_the_black_stalker(); void AddSC_instance_the_underbog(); void AddSC_boss_ahune(); void AddSC_instance_the_slave_pens(); @@ -144,8 +145,9 @@ void AddOutlandScripts() AddSC_boss_mekgineer_steamrigger(); AddSC_boss_warlord_kalithresh(); AddSC_instance_steam_vault(); - AddSC_boss_the_black_stalker(); //CR Underbog + AddSC_boss_hungarfen(); //CR Underbog AddSC_boss_ghazan(); + AddSC_boss_the_black_stalker(); AddSC_instance_the_underbog(); AddSC_boss_ahune(); AddSC_instance_the_slave_pens(); From ada13bc8adc8cade1ada4405f9c1bcdde5dfe07c Mon Sep 17 00:00:00 2001 From: Samsequel <20357406+Samsequel@users.noreply.github.com> Date: Tue, 3 Jan 2023 00:44:58 +0100 Subject: [PATCH 51/66] fix(DB/Creature): Fel Cannon should be stationary and shoot (#14460) --- data/sql/updates/pending_db_world/felcannon.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 data/sql/updates/pending_db_world/felcannon.sql diff --git a/data/sql/updates/pending_db_world/felcannon.sql b/data/sql/updates/pending_db_world/felcannon.sql new file mode 100644 index 000000000..3bd10515b --- /dev/null +++ b/data/sql/updates/pending_db_world/felcannon.sql @@ -0,0 +1,6 @@ +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 19399; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 19399); +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 +(19399, 0, 0, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 41, 3000, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fel Cannon - On Just Died - Despawn In 3000 ms'), +(19399, 0, 1, 0, 1, 0, 100, 513, 1000, 1000, 1000, 1000, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Fel Cannon - Out of Combat - Disable Combat Movement (No Repeat)'), +(19399, 0, 2, 0, 0, 0, 100, 0, 0, 1000, 2500, 2500, 0, 11, 36238, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Fel Cannon - In Combat - Cast \'Fel Cannon Blast\''); From 942746736e1abcb9257db52964532fb5f1e4cd22 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Mon, 2 Jan 2023 23:47:04 +0000 Subject: [PATCH 52/66] chore(DB): import pending files Referenced commit(s): ada13bc8adc8cade1ada4405f9c1bcdde5dfe07c --- .../felcannon.sql => db_world/2023_01_02_05.sql} | 1 + .../rev_1672351799345921400.sql => db_world/2023_01_02_06.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/felcannon.sql => db_world/2023_01_02_05.sql} (96%) rename data/sql/updates/{pending_db_world/rev_1672351799345921400.sql => db_world/2023_01_02_06.sql} (97%) diff --git a/data/sql/updates/pending_db_world/felcannon.sql b/data/sql/updates/db_world/2023_01_02_05.sql similarity index 96% rename from data/sql/updates/pending_db_world/felcannon.sql rename to data/sql/updates/db_world/2023_01_02_05.sql index 3bd10515b..bb786b317 100644 --- a/data/sql/updates/pending_db_world/felcannon.sql +++ b/data/sql/updates/db_world/2023_01_02_05.sql @@ -1,3 +1,4 @@ +-- DB update 2023_01_02_04 -> 2023_01_02_05 UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 19399; DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 19399); 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 diff --git a/data/sql/updates/pending_db_world/rev_1672351799345921400.sql b/data/sql/updates/db_world/2023_01_02_06.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1672351799345921400.sql rename to data/sql/updates/db_world/2023_01_02_06.sql index d40945032..be12365d3 100644 --- a/data/sql/updates/pending_db_world/rev_1672351799345921400.sql +++ b/data/sql/updates/db_world/2023_01_02_06.sql @@ -1,3 +1,4 @@ +-- DB update 2023_01_02_05 -> 2023_01_02_06 -- UPDATE `creature_template` SET `ScriptName` = 'boss_hungarfen', `AIName` = '' WHERE `entry` = 17770; UPDATE `creature_template` SET `ScriptName` = 'npc_underbog_mushroom', `AIName` = '', `scale` = 1, `faction` = 14, `speed_walk` = 1 WHERE `entry` = 17990; From e35078a1f8cdfb3c95bc93a7273beaf76cfaa4de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Mauger?= Date: Tue, 3 Jan 2023 01:47:08 +0100 Subject: [PATCH 53/66] fix(Core/Loot) Fix master looter invisible quest items (#14103) --- src/server/game/Loot/LootMgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index c01d46c98..2be3a9a69 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -419,7 +419,7 @@ bool LootItem::AllowedForPlayer(Player const* player, ObjectGuid source) const if (!sConditionMgr->IsObjectMeetToConditions(const_cast(player), conditions)) { // Master Looter can see conditioned recipes - if (isMasterLooter && follow_loot_rules && !is_underthreshold) + if (isMasterLooter && (!follow_loot_rules || !is_underthreshold)) { if ((pProto->Flags & ITEM_FLAG_HIDE_UNUSABLE_RECIPE) || (pProto->Class == ITEM_CLASS_RECIPE && pProto->Bonding == BIND_WHEN_PICKED_UP && pProto->Spells[1].SpellId != 0)) { @@ -442,7 +442,7 @@ bool LootItem::AllowedForPlayer(Player const* player, ObjectGuid source) const } // Master looter can see all items even if the character can't loot them - if (isMasterLooter && follow_loot_rules && !is_underthreshold) + if (isMasterLooter && (!follow_loot_rules || !is_underthreshold)) { return true; } From ed43140b3ca9e8a802b082db63e96c4ef4727c51 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Mon, 2 Jan 2023 21:57:45 -0300 Subject: [PATCH 54/66] fix(DB/creature_template): Remove Bleed Immunity from Elementals (#13734) Create rev_1667880044146058600.sql --- data/sql/updates/pending_db_world/rev_1667880044146058600.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1667880044146058600.sql diff --git a/data/sql/updates/pending_db_world/rev_1667880044146058600.sql b/data/sql/updates/pending_db_world/rev_1667880044146058600.sql new file mode 100644 index 000000000..2cc021ccc --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1667880044146058600.sql @@ -0,0 +1,2 @@ +-- Remove Bleed Immunity from Elementals +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`&~16384 WHERE `type`=4 AND `entry` IN (92, 329, 510, 575, 691, 764, 765, 766, 832, 1039, 1040, 1041, 1081, 1244, 1812, 1813, 1851, 1953, 1954, 1955, 1956, 1964, 2022, 2025, 2027, 2029, 2030, 2156, 2157, 2166, 2258, 2359, 2551, 2592, 2723, 2735, 2745, 2751, 2752, 2755, 2760, 2761, 2762, 2776, 2791, 2794, 2887, 2919, 3417, 3535, 3569, 3570, 3780, 3781, 3782, 3783, 3784, 3834, 3917, 3919, 3931, 3950, 4028, 4029, 4030, 4034, 4035, 4036, 4037, 4038, 4120, 4382, 4385, 4386, 4387, 4423, 4499, 4526, 4528, 4661, 4857, 4860, 4978, 5055, 5354, 5461, 5462, 5465, 5481, 5485, 5490, 5761, 5775, 5806, 5850, 5852, 5853, 5855, 5881, 5889, 5890, 5891, 5893, 5894, 5895, 5896, 5897, 5898, 5902, 6047, 6220, 6239, 6509, 6510, 6511, 6512, 6517, 6518, 6519, 6520, 6521, 6527, 6550, 6560, 6748, 6932, 7031, 7032, 7039, 7079, 7100, 7101, 7104, 7132, 7138, 7139, 7149, 7206, 7226, 7266, 7364, 7365, 7409, 7584, 7738, 8278, 8279, 8281, 8384, 8441, 8519, 8520, 8521, 8522, 8667, 8837, 8905, 8906, 8908, 8909, 8910, 8911, 8923, 8981, 8982, 9017, 9025, 9026, 9178, 9376, 9377, 9396, 9397, 9453, 9502, 9599, 9601, 9816, 9878, 9879, 10120, 10641, 10642, 10756, 10757, 10955, 11256, 11321, 11447, 11458, 11461, 11462, 11464, 11465, 11480, 11483, 11484, 11489, 11491, 11576, 11577, 11578, 11744, 11745, 11746, 11747, 11777, 11778, 11781, 11782, 11783, 11784, 11862, 12143, 12201, 12219, 12220, 12223, 12224, 12237, 12258, 12759, 12876, 13021, 13022, 13141, 13142, 13196, 13197, 13256, 13278, 13279, 13280, 13285, 13322, 13456, 13696, 13736, 13743, 14061, 14062, 14063, 14184, 14231, 14241, 14269, 14303, 14350, 14362, 14397, 14399, 14400, 14424, 14435, 14448, 14454, 14455, 14457, 14458, 14460, 14461, 14462, 14464, 14478, 15338, 15428, 15527, 16043, 17003, 22848, 32357); From 82b707c45b87f03eb0ce8ec7408cc1c685e5a469 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Tue, 3 Jan 2023 00:59:44 +0000 Subject: [PATCH 55/66] chore(DB): import pending files Referenced commit(s): ed43140b3ca9e8a802b082db63e96c4ef4727c51 --- .../rev_1667880044146058600.sql => db_world/2023_01_03_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1667880044146058600.sql => db_world/2023_01_03_00.sql} (97%) diff --git a/data/sql/updates/pending_db_world/rev_1667880044146058600.sql b/data/sql/updates/db_world/2023_01_03_00.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1667880044146058600.sql rename to data/sql/updates/db_world/2023_01_03_00.sql index 2cc021ccc..b2d87ceaa 100644 --- a/data/sql/updates/pending_db_world/rev_1667880044146058600.sql +++ b/data/sql/updates/db_world/2023_01_03_00.sql @@ -1,2 +1,3 @@ +-- DB update 2023_01_02_06 -> 2023_01_03_00 -- Remove Bleed Immunity from Elementals UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`&~16384 WHERE `type`=4 AND `entry` IN (92, 329, 510, 575, 691, 764, 765, 766, 832, 1039, 1040, 1041, 1081, 1244, 1812, 1813, 1851, 1953, 1954, 1955, 1956, 1964, 2022, 2025, 2027, 2029, 2030, 2156, 2157, 2166, 2258, 2359, 2551, 2592, 2723, 2735, 2745, 2751, 2752, 2755, 2760, 2761, 2762, 2776, 2791, 2794, 2887, 2919, 3417, 3535, 3569, 3570, 3780, 3781, 3782, 3783, 3784, 3834, 3917, 3919, 3931, 3950, 4028, 4029, 4030, 4034, 4035, 4036, 4037, 4038, 4120, 4382, 4385, 4386, 4387, 4423, 4499, 4526, 4528, 4661, 4857, 4860, 4978, 5055, 5354, 5461, 5462, 5465, 5481, 5485, 5490, 5761, 5775, 5806, 5850, 5852, 5853, 5855, 5881, 5889, 5890, 5891, 5893, 5894, 5895, 5896, 5897, 5898, 5902, 6047, 6220, 6239, 6509, 6510, 6511, 6512, 6517, 6518, 6519, 6520, 6521, 6527, 6550, 6560, 6748, 6932, 7031, 7032, 7039, 7079, 7100, 7101, 7104, 7132, 7138, 7139, 7149, 7206, 7226, 7266, 7364, 7365, 7409, 7584, 7738, 8278, 8279, 8281, 8384, 8441, 8519, 8520, 8521, 8522, 8667, 8837, 8905, 8906, 8908, 8909, 8910, 8911, 8923, 8981, 8982, 9017, 9025, 9026, 9178, 9376, 9377, 9396, 9397, 9453, 9502, 9599, 9601, 9816, 9878, 9879, 10120, 10641, 10642, 10756, 10757, 10955, 11256, 11321, 11447, 11458, 11461, 11462, 11464, 11465, 11480, 11483, 11484, 11489, 11491, 11576, 11577, 11578, 11744, 11745, 11746, 11747, 11777, 11778, 11781, 11782, 11783, 11784, 11862, 12143, 12201, 12219, 12220, 12223, 12224, 12237, 12258, 12759, 12876, 13021, 13022, 13141, 13142, 13196, 13197, 13256, 13278, 13279, 13280, 13285, 13322, 13456, 13696, 13736, 13743, 14061, 14062, 14063, 14184, 14231, 14241, 14269, 14303, 14350, 14362, 14397, 14399, 14400, 14424, 14435, 14448, 14454, 14455, 14457, 14458, 14460, 14461, 14462, 14464, 14478, 15338, 15428, 15527, 16043, 17003, 22848, 32357); From e1fb8f67d9e609fb4b6c2b3e95de52110ad8b719 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Tue, 3 Jan 2023 02:30:15 +0100 Subject: [PATCH 56/66] fix(DB/SAI): Fixed Fallen Hero's Spirits not giving kill credit. (#14443) Fixes #14395 --- data/sql/updates/pending_db_world/rev_1672481631730954800.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1672481631730954800.sql diff --git a/data/sql/updates/pending_db_world/rev_1672481631730954800.sql b/data/sql/updates/pending_db_world/rev_1672481631730954800.sql new file mode 100644 index 000000000..c9bd27271 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672481631730954800.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `action_param2`=2 WHERE `entryorguid`=32149 AND `source_type`=0 AND `id` IN (0,1); From 9b6325772af3e59be985b5025ceedf409767e25d Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Tue, 3 Jan 2023 01:32:18 +0000 Subject: [PATCH 57/66] chore(DB): import pending files Referenced commit(s): e1fb8f67d9e609fb4b6c2b3e95de52110ad8b719 --- .../rev_1672481631730954800.sql => db_world/2023_01_03_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1672481631730954800.sql => db_world/2023_01_03_01.sql} (71%) diff --git a/data/sql/updates/pending_db_world/rev_1672481631730954800.sql b/data/sql/updates/db_world/2023_01_03_01.sql similarity index 71% rename from data/sql/updates/pending_db_world/rev_1672481631730954800.sql rename to data/sql/updates/db_world/2023_01_03_01.sql index c9bd27271..30f58d231 100644 --- a/data/sql/updates/pending_db_world/rev_1672481631730954800.sql +++ b/data/sql/updates/db_world/2023_01_03_01.sql @@ -1,2 +1,3 @@ +-- DB update 2023_01_03_00 -> 2023_01_03_01 -- UPDATE `smart_scripts` SET `action_param2`=2 WHERE `entryorguid`=32149 AND `source_type`=0 AND `id` IN (0,1); From 234b79a18cf7578c46895de1d2e8570a9d35f52b Mon Sep 17 00:00:00 2001 From: mpfans Date: Tue, 3 Jan 2023 09:47:03 +0800 Subject: [PATCH 58/66] fix(DB/gameobject): Duskwood gameobject pool (#14200) *fix `Duskwood` gameobject pool --- .../rev_1670863713710473091.sql | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1670863713710473091.sql diff --git a/data/sql/updates/pending_db_world/rev_1670863713710473091.sql b/data/sql/updates/pending_db_world/rev_1670863713710473091.sql new file mode 100644 index 000000000..fba830493 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1670863713710473091.sql @@ -0,0 +1,62 @@ +-- XYZ:-11092.80 -1157.22 55.19 map 0 +DELETE FROM pool_gameobject WHERE guid IN (74125,74126,74127,74128,74129) AND pool_entry = 4505; +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(74125, 4505, 0, 'Spawn Point 106 - Copper'), +(74126, 4505, 0, 'Spawn Point 106 - Tin'), +(74127, 4505, 0, 'Spawn Point 106 - Iron'), +(74128, 4505, 10, 'Spawn Point 106 - Silver'), +(74129, 4505, 10, 'Spawn Point 106 - Gold'); + +-- XYZ:-11080.60 -1109.60 45.51 map 0 +DELETE FROM pool_gameobject WHERE guid IN (74150,74151,74152,74153,74154) AND pool_entry = 4510; +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(74150, 4510, 0, 'Spawn Point 111 - Copper'), +(74151, 4510, 0, 'Spawn Point 111 - Tin'), +(74152, 4510, 0, 'Spawn Point 111 - Iron'), +(74153, 4510, 10, 'Spawn Point 111 - Silver'), +(74154, 4510, 10, 'Spawn Point 111 - Gold'); + +-- XYZ:-11080.00 -1109.00 44.76 map 0 +DELETE FROM pool_gameobject WHERE guid IN (73650,73651,73652,73653,73654) AND pool_entry = 4410; +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(73650, 4410, 0, 'Spawn Point 11 - Copper'), +(73651, 4410, 0, 'Spawn Point 11 - Tin'), +(73652, 4410, 0, 'Spawn Point 11 - Iron'), +(73653, 4410, 10, 'Spawn Point 11 - Silver'), +(73654, 4410, 10, 'Spawn Point 11 - Gold'); + +-- XYZ:-11104.10 -1087.41 63.20 map 0 +DELETE FROM pool_gameobject WHERE guid IN (73870,73871,73872,73873,73874) AND pool_entry = 4454; +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(73870, 4454, 0, 'Spawn Point 55 - Copper'), +(73871, 4454, 0, 'Spawn Point 55 - Tin'), +(73872, 4454, 0, 'Spawn Point 55 - Iron'), +(73873, 4454, 10, 'Spawn Point 55 - Silver'), +(73874, 4454, 10, 'Spawn Point 55 - Gold'); + +-- XYZ:-11099.10 -1155.55 42.44 map 0 +DELETE FROM pool_gameobject WHERE guid IN (73940,73941,73942,73943,73944) AND pool_entry = 4468; +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(73940, 4468, 0, 'Spawn Point 69 - Copper'), +(73941, 4468, 0, 'Spawn Point 69 - Tin'), +(73942, 4468, 0, 'Spawn Point 69 - Iron'), +(73943, 4468, 10, 'Spawn Point 69 - Silver'), +(73944, 4468, 10, 'Spawn Point 69 - Gold'); + +-- XYZ:-11123.50 -1165.56 44.41 map 0 +DELETE FROM pool_gameobject WHERE guid IN (74080,74081,74082,74083,74084) AND pool_entry = 4496; +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(74080, 4496, 0, 'Spawn Point 97 - Copper'), +(74081, 4496, 0, 'Spawn Point 97 - Tin'), +(74082, 4496, 0, 'Spawn Point 97 - Iron'), +(74083, 4496, 10, 'Spawn Point 97 - Silver'), +(74084, 4496, 10, 'Spawn Point 97 - Gold'); + +-- XYZ:-11129.10 -1153.68 45.12 map 0 +DELETE FROM pool_gameobject WHERE guid IN (73755,73756,73757,73758,73759) AND pool_entry = 4431; +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(73755, 4431, 0, 'Spawn Point 32 - Copper'), +(73756, 4431, 0, 'Spawn Point 32 - Tin'), +(73757, 4431, 0, 'Spawn Point 32 - Iron'), +(73758, 4431, 10, 'Spawn Point 32 - Silver'), +(73759, 4431, 10, 'Spawn Point 32 - Gold'); From 3ad652d8ab96b6d9cefe9c998bc6d19b1d448e18 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Tue, 3 Jan 2023 01:49:08 +0000 Subject: [PATCH 59/66] chore(DB): import pending files Referenced commit(s): 234b79a18cf7578c46895de1d2e8570a9d35f52b --- .../rev_1670863713710473091.sql => db_world/2023_01_03_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1670863713710473091.sql => db_world/2023_01_03_02.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1670863713710473091.sql b/data/sql/updates/db_world/2023_01_03_02.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1670863713710473091.sql rename to data/sql/updates/db_world/2023_01_03_02.sql index fba830493..1544e7062 100644 --- a/data/sql/updates/pending_db_world/rev_1670863713710473091.sql +++ b/data/sql/updates/db_world/2023_01_03_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_01_03_01 -> 2023_01_03_02 -- XYZ:-11092.80 -1157.22 55.19 map 0 DELETE FROM pool_gameobject WHERE guid IN (74125,74126,74127,74128,74129) AND pool_entry = 4505; INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES From 6a5a6e24533aabe7f14bce58b342567b43964f1b Mon Sep 17 00:00:00 2001 From: M'Dic Date: Tue, 3 Jan 2023 15:54:41 -0500 Subject: [PATCH 60/66] fix (db): EOTS BG StartMaxDist (#14489) this fixes the StartMaxDist to the appropiate size of 10 instead of default which will never flag the player for being outside the start spot before the bg starts (exploit) and there fore will never tele them back into place after 9 seconds. --- data/sql/updates/pending_db_world/eots-maxdist.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/sql/updates/pending_db_world/eots-maxdist.sql diff --git a/data/sql/updates/pending_db_world/eots-maxdist.sql b/data/sql/updates/pending_db_world/eots-maxdist.sql new file mode 100644 index 000000000..c672f26ea --- /dev/null +++ b/data/sql/updates/pending_db_world/eots-maxdist.sql @@ -0,0 +1,3 @@ +DELETE FROM `battleground_template` WHERE `ID`=7; +INSERT INTO `battleground_template` (`ID`, `MinPlayersPerTeam`, `MaxPlayersPerTeam`, `MinLvl`, `MaxLvl`, `AllianceStartLoc`, `AllianceStartO`, `HordeStartLoc`, `HordeStartO`, `StartMaxDist`, `Weight`, `ScriptName`, `Comment`) VALUES +(7, 8, 15, 61, 80, 1103, 3.03123, 1104, 0.055761, 10, 1, '', 'Eye of The Storm (battleground)'); From 1b8c9216ba75a4d83ef23935818502f7637fa5d2 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Tue, 3 Jan 2023 20:56:45 +0000 Subject: [PATCH 61/66] chore(DB): import pending files Referenced commit(s): 6a5a6e24533aabe7f14bce58b342567b43964f1b --- .../eots-maxdist.sql => db_world/2023_01_03_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/eots-maxdist.sql => db_world/2023_01_03_03.sql} (89%) diff --git a/data/sql/updates/pending_db_world/eots-maxdist.sql b/data/sql/updates/db_world/2023_01_03_03.sql similarity index 89% rename from data/sql/updates/pending_db_world/eots-maxdist.sql rename to data/sql/updates/db_world/2023_01_03_03.sql index c672f26ea..fccbcb786 100644 --- a/data/sql/updates/pending_db_world/eots-maxdist.sql +++ b/data/sql/updates/db_world/2023_01_03_03.sql @@ -1,3 +1,4 @@ +-- DB update 2023_01_03_02 -> 2023_01_03_03 DELETE FROM `battleground_template` WHERE `ID`=7; INSERT INTO `battleground_template` (`ID`, `MinPlayersPerTeam`, `MaxPlayersPerTeam`, `MinLvl`, `MaxLvl`, `AllianceStartLoc`, `AllianceStartO`, `HordeStartLoc`, `HordeStartO`, `StartMaxDist`, `Weight`, `ScriptName`, `Comment`) VALUES (7, 8, 15, 61, 80, 1103, 3.03123, 1104, 0.055761, 10, 1, '', 'Eye of The Storm (battleground)'); From b4080ed0f1ff34afb96f457aed9dbd8a254de39c Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Wed, 4 Jan 2023 10:44:42 -0300 Subject: [PATCH 62/66] revert "fix(Core/Formations): Implemented new creature formation flag: GROUP_AI_FLAG_ACQUIRE_NEW_TARGET_ON_EVADE." (#14494) --- .../rev_1672806531310531500.sql | 2 + .../game/Entities/Creature/CreatureGroups.cpp | 64 ++++--------------- .../game/Entities/Creature/CreatureGroups.h | 28 ++++---- src/server/game/Entities/Unit/Unit.cpp | 10 --- 4 files changed, 27 insertions(+), 77 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1672806531310531500.sql diff --git a/data/sql/updates/pending_db_world/rev_1672806531310531500.sql b/data/sql/updates/pending_db_world/rev_1672806531310531500.sql new file mode 100644 index 000000000..539bf2f60 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672806531310531500.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_formations` SET `groupAI`=`groupAI`&~0x020 WHERE `leaderGUID` IN (84634,84648); diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp index 7eca4ad92..871101b2b 100644 --- a/src/server/game/Entities/Creature/CreatureGroups.cpp +++ b/src/server/game/Entities/Creature/CreatureGroups.cpp @@ -200,72 +200,32 @@ void CreatureGroup::MemberEngagingTarget(Creature* member, Unit* target) return; } } + else if (!(groupAI & std::underlying_type_t(GroupAIFlags::GROUP_AI_FLAG_LEADER_ASSIST_MEMBER))) + { + return; + } for (auto const& itr : m_members) { Creature* pMember = itr.first; - if (!pMember) - { - continue; - } + if (m_leader) // avoid crash if leader was killed and reset. + LOG_DEBUG("entities.unit", "GROUP ATTACK: group instance id {} calls member instid {}", m_leader->GetInstanceId(), member->GetInstanceId()); - if (pMember == member || !pMember->IsAlive() || pMember->GetVictim()) - { + //Skip one check + if (pMember == member) continue; - } - if (pMember == m_leader && !(groupAI & std::underlying_type_t(GroupAIFlags::GROUP_AI_FLAG_LEADER_ASSIST_MEMBER))) - { + if (!pMember->IsAlive()) + continue; + + if (pMember->GetVictim()) continue; - } if (pMember->IsValidAttackTarget(target) && pMember->AI()) - { pMember->AI()->AttackStart(target); - } } } -Unit* CreatureGroup::GetNewTargetForMember(Creature* member) -{ - uint8 const groupAI = sFormationMgr->CreatureGroupMap[member->GetSpawnId()].groupAI; - if (!(groupAI & std::underlying_type_t(GroupAIFlags::GROUP_AI_FLAG_ACQUIRE_NEW_TARGET_ON_EVADE))) - { - return nullptr; - } - - if (member == m_leader && !(groupAI & std::underlying_type_t(GroupAIFlags::GROUP_AI_FLAG_LEADER_ASSIST_MEMBER))) - { - return nullptr; - } - - for (auto const& itr : m_members) - { - Creature* pMember = itr.first; - if (!pMember) - { - continue; - } - - if (pMember == member || !pMember->IsAlive() || !pMember->GetVictim()) - { - continue; - } - - if (pMember == m_leader && !(groupAI & std::underlying_type_t(GroupAIFlags::GROUP_AI_FLAG_MEMBER_ASSIST_LEADER))) - { - continue; - } - - if (member->IsValidAttackTarget(pMember->GetVictim())) - { - return pMember->GetVictim(); - } - } - - return nullptr; -} - void CreatureGroup::MemberEvaded(Creature* member) { uint8 const groupAI = sFormationMgr->CreatureGroupMap[member->GetSpawnId()].groupAI; diff --git a/src/server/game/Entities/Creature/CreatureGroups.h b/src/server/game/Entities/Creature/CreatureGroups.h index b424b3503..c3a9fc13a 100644 --- a/src/server/game/Entities/Creature/CreatureGroups.h +++ b/src/server/game/Entities/Creature/CreatureGroups.h @@ -28,23 +28,22 @@ class CreatureGroup; enum class GroupAIFlags : uint16 { - GROUP_AI_FLAG_MEMBER_ASSIST_LEADER = 0x001, - GROUP_AI_FLAG_LEADER_ASSIST_MEMBER = 0x002, - GROUP_AI_FLAG_EVADE_TOGETHER = 0x004, - GROUP_AI_FLAG_RESPAWN_ON_EVADE = 0x008, - GROUP_AI_FLAG_DONT_RESPAWN_LEADER_ON_EVADE = 0x010, - GROUP_AI_FLAG_ACQUIRE_NEW_TARGET_ON_EVADE = 0x020, - //GROUP_AI_FLAG_UNK5 = 0x040, - //GROUP_AI_FLAG_UNK6 = 0x080, - //GROUP_AI_FLAG_UNK7 = 0x100, - GROUP_AI_FLAG_FOLLOW_LEADER = 0x200, + GROUP_AI_FLAG_MEMBER_ASSIST_LEADER = 0x001, + GROUP_AI_FLAG_LEADER_ASSIST_MEMBER = 0x002, + GROUP_AI_FLAG_EVADE_TOGETHER = 0x004, + GROUP_AI_FLAG_RESPAWN_ON_EVADE = 0x008, + GROUP_AI_FLAG_DONT_RESPAWN_LEADER_ON_EVADE = 0x010, + //GROUP_AI_FLAG_UNK3 = 0x010, + //GROUP_AI_FLAG_UNK4 = 0x020, + //GROUP_AI_FLAG_UNK5 = 0x040, + //GROUP_AI_FLAG_UNK6 = 0x080, + //GROUP_AI_FLAG_UNK7 = 0x100, + GROUP_AI_FLAG_FOLLOW_LEADER = 0x200, - GROUP_AI_FLAG_ASSIST_MASK = GROUP_AI_FLAG_MEMBER_ASSIST_LEADER | GROUP_AI_FLAG_LEADER_ASSIST_MEMBER, - GROUP_AI_FLAG_EVADE_MASK = GROUP_AI_FLAG_EVADE_TOGETHER | GROUP_AI_FLAG_RESPAWN_ON_EVADE, + GROUP_AI_FLAG_EVADE_MASK = GROUP_AI_FLAG_EVADE_TOGETHER | GROUP_AI_FLAG_RESPAWN_ON_EVADE, // Used to verify valid and usable flags - GROUP_AI_FLAG_SUPPORTED = GROUP_AI_FLAG_ASSIST_MASK | GROUP_AI_FLAG_EVADE_MASK | GROUP_AI_FLAG_DONT_RESPAWN_LEADER_ON_EVADE | - GROUP_AI_FLAG_FOLLOW_LEADER | GROUP_AI_FLAG_ACQUIRE_NEW_TARGET_ON_EVADE + GROUP_AI_FLAG_SUPPORTED = GROUP_AI_FLAG_MEMBER_ASSIST_LEADER | GROUP_AI_FLAG_LEADER_ASSIST_MEMBER | GROUP_AI_FLAG_EVADE_MASK | GROUP_AI_FLAG_FOLLOW_LEADER }; struct FormationInfo @@ -109,7 +108,6 @@ public: void LeaderMoveTo(float x, float y, float z, bool run); void MemberEngagingTarget(Creature* member, Unit* target); - Unit* GetNewTargetForMember(Creature* member); void MemberEvaded(Creature* member); void RespawnFormation(bool force = false); [[nodiscard]] bool IsFormationInCombat(); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 4314fbcc5..2cef6e643 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -14676,16 +14676,6 @@ Unit* Creature::SelectVictim() return nullptr; } - // Last chance: creature group - if (CreatureGroup* group = GetFormation()) - { - if (Unit* groupTarget = group->GetNewTargetForMember(this)) - { - SetInFront(groupTarget); - return groupTarget; - } - } - // enter in evade mode in other case AI()->EnterEvadeMode(); From f9c159cf81df9389052706c9857052b8869bf001 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 4 Jan 2023 13:46:51 +0000 Subject: [PATCH 63/66] chore(DB): import pending files Referenced commit(s): b4080ed0f1ff34afb96f457aed9dbd8a254de39c --- .../rev_1672806531310531500.sql => db_world/2023_01_04_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1672806531310531500.sql => db_world/2023_01_04_00.sql} (69%) diff --git a/data/sql/updates/pending_db_world/rev_1672806531310531500.sql b/data/sql/updates/db_world/2023_01_04_00.sql similarity index 69% rename from data/sql/updates/pending_db_world/rev_1672806531310531500.sql rename to data/sql/updates/db_world/2023_01_04_00.sql index 539bf2f60..160d71a6b 100644 --- a/data/sql/updates/pending_db_world/rev_1672806531310531500.sql +++ b/data/sql/updates/db_world/2023_01_04_00.sql @@ -1,2 +1,3 @@ +-- DB update 2023_01_03_03 -> 2023_01_04_00 -- UPDATE `creature_formations` SET `groupAI`=`groupAI`&~0x020 WHERE `leaderGUID` IN (84634,84648); From 2ec522be16a2028d03e64833500361f6e317722d Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Wed, 4 Jan 2023 12:44:33 -0300 Subject: [PATCH 64/66] fix(DB/gameobject): Rebuild gameobjects for the remaining Auchindoun instances (#14491) Create rev_1672780892044441400.sql --- .../rev_1672780892044441400.sql | 501 ++++++++++++++++++ 1 file changed, 501 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1672780892044441400.sql diff --git a/data/sql/updates/pending_db_world/rev_1672780892044441400.sql b/data/sql/updates/pending_db_world/rev_1672780892044441400.sql new file mode 100644 index 000000000..22ba83210 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672780892044441400.sql @@ -0,0 +1,501 @@ +-- +DELETE FROM `gameobject` WHERE `id` IN (181278, 181556, 181557, 181569) AND `map` IN (555, 556, 558) AND `guid` IN (21567,21568,21569,21570,21571,21572,21911,21912,61346,61347,61348,61350,61355,61356,61357,61388,61393,61415,61416,61417,61418,61886,61898,61899,61901,61908,61958,63196); + +SET @GUID := 105022; -- 161 +SET @POOL := 13335; -- 34 +SET @POOLMOTHER := 8332; -- 21 + +DELETE FROM `gameobject` WHERE `id` IN (181278, 181556, 181557, 181569) AND `map` IN (555, 556, 558) AND `guid` BETWEEN @GUID+0 AND @GUID+160; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`) VALUES +-- AUCHENAI CRYPTS +-- Adamantite Group 1 +(@GUID+0 , 181556, 558, 3790, 3790, 3, 1, 173.916, 17.9607, -1.26987, 6.00393, 0, 0, -0.139173, 0.990268, 86400, 255, 1, '', 46741), +(@GUID+3 , 181556, 558, 3790, 3790, 3, 1, 119.337, 12.9238, -1.99939, 0.523598, 0, 0, 0.258819, 0.965926, 86400, 255, 1, '', 46741), +(@GUID+6 , 181556, 558, 3790, 3790, 3, 1, 231.433, -16.9698, 2.86235, 3.63029, 0, 0, -0.970295, 0.241925, 86400, 255, 1, '', 46741), +(@GUID+9 , 181556, 558, 3790, 3790, 3, 1, 213.983, -2.98043, 27.1587, 0.663223, 0, 0, 0.325567, 0.945519, 86400, 255, 1, '', 46741), +(@GUID+12, 181556, 558, 3790, 3790, 3, 1, 177.472, -9.88348, -0.765356, 6.10865, 0, 0, -0.0871553, 0.996195, 86400, 255, 1, '', 46741), +(@GUID+15, 181556, 558, 3790, 3790, 3, 1, 245.748, -182.614, 30.4494, 4.13643, 0, 0, -0.878817, 0.47716, 86400, 255, 1, '', 46741), +-- Rich Adamantite +(@GUID+1 , 181569, 558, 3790, 3790, 3, 1, 173.916, 17.9607, -1.26987, 6.00393, 0, 0, -0.139173, 0.990268, 86400, 255, 1, '', 46741), +(@GUID+4 , 181569, 558, 3790, 3790, 3, 1, 119.337, 12.9238, -1.99939, 0.523598, 0, 0, 0.258819, 0.965926, 86400, 255, 1, '', 46741), +(@GUID+7 , 181569, 558, 3790, 3790, 3, 1, 231.433, -16.9698, 2.86235, 3.63029, 0, 0, -0.970295, 0.241925, 86400, 255, 1, '', 46741), +(@GUID+10, 181569, 558, 3790, 3790, 3, 1, 213.983, -2.98043, 27.1587, 0.663223, 0, 0, 0.325567, 0.945519, 86400, 255, 1, '', 46741), +(@GUID+13, 181569, 558, 3790, 3790, 3, 1, 177.472, -9.88348, -0.765356, 6.10865, 0, 0, -0.0871553, 0.996195, 86400, 255, 1, '', 46741), +(@GUID+16, 181569, 558, 3790, 3790, 3, 1, 245.748, -182.614, 30.4494, 4.13643, 0, 0, -0.878817, 0.47716, 86400, 255, 1, '', 46741), +-- Khorium +(@GUID+2 , 181557, 558, 3790, 3790, 3, 1, 173.916, 17.9607, -1.26987, 6.00393, 0, 0, -0.139173, 0.990268, 86400, 255, 1, '', 46741), +(@GUID+5 , 181557, 558, 3790, 3790, 3, 1, 119.337, 12.9238, -1.99939, 0.523598, 0, 0, 0.258819, 0.965926, 86400, 255, 1, '', 46741), +(@GUID+8 , 181557, 558, 3790, 3790, 3, 1, 231.433, -16.9698, 2.86235, 3.63029, 0, 0, -0.970295, 0.241925, 86400, 255, 1, '', 46741), +(@GUID+11, 181557, 558, 3790, 3790, 3, 1, 213.983, -2.98043, 27.1587, 0.663223, 0, 0, 0.325567, 0.945519, 86400, 255, 1, '', 46741), +(@GUID+14, 181557, 558, 3790, 3790, 3, 1, 177.472, -9.88348, -0.765356, 6.10865, 0, 0, -0.0871553, 0.996195, 86400, 255, 1, '', 46741), +(@GUID+17, 181557, 558, 3790, 3790, 3, 1, 245.748, -182.614, 30.4494, 4.13643, 0, 0, -0.878817, 0.47716, 86400, 255, 1, '', 46741), +-- Adamantite Group 2 +(@GUID+18, 181556, 558, 3790, 3790, 3, 1, -153.854, -290.526, 24.5789, 5.42797, 0, 0, -0.414693, 0.909961, 86400, 255, 1, '', 46741), +(@GUID+21, 181556, 558, 3790, 3790, 3, 1, 93.3528, -393.116, 27.1238, 5.2709, 0, 0, -0.484809, 0.87462, 86400, 255, 1, '', 46741), +(@GUID+24, 181556, 558, 3790, 3790, 3, 1, -154.215, -256.825, 24.384, 5.14872, 0, 0, -0.537299, 0.843392, 86400, 255, 1, '', 46741), +(@GUID+27, 181556, 558, 3790, 3790, 3, 1, -133.902, -287.211, 25.8914, 1.23918, 0, 0, 0.580703, 0.814116, 86400, 255, 1, '', 46741), +-- Rich Adamantite +(@GUID+19, 181569, 558, 3790, 3790, 3, 1, -153.854, -290.526, 24.5789, 5.42797, 0, 0, -0.414693, 0.909961, 86400, 255, 1, '', 46741), +(@GUID+22, 181569, 558, 3790, 3790, 3, 1, 93.3528, -393.116, 27.1238, 5.2709, 0, 0, -0.484809, 0.87462, 86400, 255, 1, '', 46741), +(@GUID+25, 181569, 558, 3790, 3790, 3, 1, -154.215, -256.825, 24.384, 5.14872, 0, 0, -0.537299, 0.843392, 86400, 255, 1, '', 46741), +(@GUID+28, 181569, 558, 3790, 3790, 3, 1, -133.902, -287.211, 25.8914, 1.23918, 0, 0, 0.580703, 0.814116, 86400, 255, 1, '', 46741), +-- Khorium +(@GUID+20, 181557, 558, 3790, 3790, 3, 1, -153.854, -290.526, 24.5789, 5.42797, 0, 0, -0.414693, 0.909961, 86400, 255, 1, '', 46741), +(@GUID+23, 181557, 558, 3790, 3790, 3, 1, 93.3528, -393.116, 27.1238, 5.2709, 0, 0, -0.484809, 0.87462, 86400, 255, 1, '', 46741), +(@GUID+26, 181557, 558, 3790, 3790, 3, 1, -154.215, -256.825, 24.384, 5.14872, 0, 0, -0.537299, 0.843392, 86400, 255, 1, '', 46741), +(@GUID+29, 181557, 558, 3790, 3790, 3, 1, -133.902, -287.211, 25.8914, 1.23918, 0, 0, 0.580703, 0.814116, 86400, 255, 1, '', 46741), +-- Lichen Group 1 +(@GUID+30, 181278, 558, 3790, 3790, 3, 1, 94.1284, -41.6325, 4.26136, 2.53072, 0, 0, 0.953716, 0.300708, 86400, 255, 1, '', 46741), +(@GUID+31, 181278, 558, 3790, 3790, 3, 1, 142.376, 42.363, 4.26119, 3.94445, 0, 0, -0.920505, 0.390732, 86400, 255, 1, '', 46741), +(@GUID+32, 181278, 558, 3790, 3790, 3, 1, 81.3718, 39.9704, 4.26169, 2.46091, 0, 0, 0.942641, 0.333808, 86400, 255, 1, '', 46741), +(@GUID+33, 181278, 558, 3790, 3790, 3, 1, 147.044, -17.3046, 7.97811, 5.14872, 0, 0, -0.537299, 0.843392, 86400, 255, 1, '', 46741), +-- Lichen Group 2 +(@GUID+34, 181278, 558, 3790, 3790, 3, 1, 228.891, -161.939, 26.5913, 5.09636, 0, 0, -0.559193, 0.829038, 86400, 255, 1, '', 46741), +(@GUID+35, 181278, 558, 3790, 3790, 3, 1, 227.291, 19.9092, -0.064963, 2.37364, 0, 0, 0.927183, 0.374608, 86400, 255, 1, '', 46741), +(@GUID+36, 181278, 558, 3790, 3790, 3, 1, 238.11, -21.5713, -0.103546, 1.97222, 0, 0, 0.833885, 0.551938, 86400, 255, 1, '', 46741), +-- Lichen Group 3 +(@GUID+37, 181278, 558, 3790, 3790, 3, 1, -125.759, -306.731, 26.8307, 4.88692, 0, 0, -0.642787, 0.766045, 86400, 255, 1, '', 46741), +(@GUID+38, 181278, 558, 3790, 3790, 3, 1, -131.895, -251.102, 26.4101, 1.71042, 0, 0, 0.754709, 0.656059, 86400, 255, 1, '', 46741), +(@GUID+39, 181278, 558, 3790, 3790, 3, 1, -170.729, -270.22, 31.6304, 4.60767, 0, 0, -0.743144, 0.669131, 86400, 255, 1, '', 46741), +-- Lichen Group 4 +(@GUID+40, 181278, 558, 3790, 3790, 3, 1, 11.4308, -382.646, 19.4112, -2.60053, 0, 0, 0, 1, 86400, 255, 1, '', 0), +(@GUID+41, 181278, 558, 3790, 3790, 3, 1, -57.6584, -360.292, 26.6024, 5.58505, 0, 0, -0.34202, 0.939693, 86400, 255, 1, '', 46741), +(@GUID+42, 181278, 558, 3790, 3790, 3, 1, -18.5816, -360.279, 26.5888, 3.85718, 0, 0, -0.936671, 0.35021, 86400, 255, 1, '', 46741), +(@GUID+43, 181278, 558, 3790, 3790, 3, 1, 31.0407, -359.303, 26.5985, 5.61996, 0, 0, -0.325567, 0.945519, 86400, 255, 1, '', 46741), +(@GUID+44, 181278, 558, 3790, 3790, 3, 1, -51.5901, -414.033, 26.5885, 3.75246, 0, 0, -0.953716, 0.300708, 86400, 255, 1, '', 46741), +(@GUID+45, 181278, 558, 3790, 3790, 3, 1, 29.3026, -409.006, 26.5865, 5.42797, 0, 0, -0.414693, 0.909961, 86400, 255, 1, '', 46741), +-- SETHEKK HALLS +-- ORE GROUP 1 +(@GUID+46, 181556, 556, 3791, 3791, 3, 1, -59.9727, 84.91, 1.11623, 2.84488, 0, 0, 0.989016, 0.147811, 86400, 255, 1, '', 47187), +(@GUID+49, 181556, 556, 3791, 3791, 3, 1, -84.1449, 83.7513, 1.94966, 2.33874, 0, 0, 0.920505, 0.390732, 86400, 255, 1, '', 47187), +(@GUID+52, 181556, 556, 3791, 3791, 3, 1, 57.1795, 115.444, -3.00431, 2.87979, 0, 0, 0.991445, 0.130528, 86400, 255, 1, '', 47187), +(@GUID+55, 181556, 556, 3791, 3791, 3, 1, -114.993, 103.73, 2.62569, 5.77704, 0, 0, -0.25038, 0.968148, 86400, 255, 1, '', 47187), +(@GUID+58, 181556, 556, 3791, 3791, 3, 1, 24.3, 114.706, 0.058363, 4.69494, 0, 0, -0.71325, 0.70091, 86400, 255, 1, '', 47187), +(@GUID+61, 181556, 556, 3791, 3791, 3, 1, 103.381, 105.561, 2.53604, 4.15388, 0, 0, -0.874619, 0.48481, 86400, 255, 1, '', 47187), +-- Rich Adamantite +(@GUID+47, 181569, 556, 3791, 3791, 3, 1, -59.9727, 84.91, 1.11623, 2.84488, 0, 0, 0.989016, 0.147811, 86400, 255, 1, '', 47187), +(@GUID+50, 181569, 556, 3791, 3791, 3, 1, -84.1449, 83.7513, 1.94966, 2.33874, 0, 0, 0.920505, 0.390732, 86400, 255, 1, '', 47187), +(@GUID+53, 181569, 556, 3791, 3791, 3, 1, 57.1795, 115.444, -3.00431, 2.87979, 0, 0, 0.991445, 0.130528, 86400, 255, 1, '', 47187), +(@GUID+56, 181569, 556, 3791, 3791, 3, 1, -114.993, 103.73, 2.62569, 5.77704, 0, 0, -0.25038, 0.968148, 86400, 255, 1, '', 47187), +(@GUID+59, 181569, 556, 3791, 3791, 3, 1, 24.3, 114.706, 0.058363, 4.69494, 0, 0, -0.71325, 0.70091, 86400, 255, 1, '', 47187), +(@GUID+62, 181569, 556, 3791, 3791, 3, 1, 103.381, 105.561, 2.53604, 4.15388, 0, 0, -0.874619, 0.48481, 86400, 255, 1, '', 47187), +-- Khorium +(@GUID+48, 181557, 556, 3791, 3791, 3, 1, -59.9727, 84.91, 1.11623, 2.84488, 0, 0, 0.989016, 0.147811, 86400, 255, 1, '', 47187), +(@GUID+51, 181557, 556, 3791, 3791, 3, 1, -84.1449, 83.7513, 1.94966, 2.33874, 0, 0, 0.920505, 0.390732, 86400, 255, 1, '', 47187), +(@GUID+54, 181557, 556, 3791, 3791, 3, 1, 57.1795, 115.444, -3.00431, 2.87979, 0, 0, 0.991445, 0.130528, 86400, 255, 1, '', 47187), +(@GUID+57, 181557, 556, 3791, 3791, 3, 1, -114.993, 103.73, 2.62569, 5.77704, 0, 0, -0.25038, 0.968148, 86400, 255, 1, '', 47187), +(@GUID+60, 181557, 556, 3791, 3791, 3, 1, 24.3, 114.706, 0.058363, 4.69494, 0, 0, -0.71325, 0.70091, 86400, 255, 1, '', 47187), +(@GUID+63, 181557, 556, 3791, 3791, 3, 1, 103.381, 105.561, 2.53604, 4.15388, 0, 0, -0.874619, 0.48481, 86400, 255, 1, '', 47187), +-- ORE GROUP 2 +(@GUID+64, 181556, 556, 3791, 3791, 3, 1, -194.833, 339.823, 25.4777, 1.95477, 0, 0, 0.829038, 0.559193, 86400, 255, 1, '', 47187), +(@GUID+67, 181556, 556, 3791, 3791, 3, 1, -233.406, 200.359, 1.84191, 0.558504, 0, 0, 0.275637, 0.961262, 86400, 255, 1, '', 47187), +(@GUID+70, 181556, 556, 3791, 3791, 3, 1, -228.518, 199.721, 24.8284, 4.60767, 0, 0, -0.743144, 0.669131, 86400, 255, 1, '', 47187), +(@GUID+73, 181556, 556, 3791, 3791, 3, 1, -230.139, 291.997, 32.156, 1.65806, 0, 0, 0.737277, 0.675591, 86400, 255, 1, '', 47187), +(@GUID+76, 181556, 556, 3791, 3791, 3, 1, -221.732, 151.383, 1.69546, 1.5708, 0, 0, 0.707107, 0.707107, 86400, 255, 1, '', 47187), +(@GUID+79, 181556, 556, 3791, 3791, 3, 1, -196.522, 294.837, 30.829, 4.85202, 0, 0, -0.656058, 0.75471, 86400, 255, 1, '', 47187), +(@GUID+82, 181556, 556, 3791, 3791, 3, 1, -80.9439, 307.453, 24.743, 2.84488, 0, 0, 0.989016, 0.147811, 86400, 255, 1, '', 47187), +(@GUID+85, 181556, 556, 3791, 3791, 3, 1, -100.66, 273.158, 23.1322, 3.56047, 0, 0, -0.978148, 0.207912, 86400, 255, 1, '', 47187), +-- Rich Adamantite +(@GUID+65, 181569, 556, 3791, 3791, 3, 1, -194.833, 339.823, 25.4777, 1.95477, 0, 0, 0.829038, 0.559193, 86400, 255, 1, '', 47187), +(@GUID+68, 181569, 556, 3791, 3791, 3, 1, -233.406, 200.359, 1.84191, 0.558504, 0, 0, 0.275637, 0.961262, 86400, 255, 1, '', 47187), +(@GUID+71, 181569, 556, 3791, 3791, 3, 1, -228.518, 199.721, 24.8284, 4.60767, 0, 0, -0.743144, 0.669131, 86400, 255, 1, '', 47187), +(@GUID+74, 181569, 556, 3791, 3791, 3, 1, -230.139, 291.997, 32.156, 1.65806, 0, 0, 0.737277, 0.675591, 86400, 255, 1, '', 47187), +(@GUID+77, 181569, 556, 3791, 3791, 3, 1, -221.732, 151.383, 1.69546, 1.5708, 0, 0, 0.707107, 0.707107, 86400, 255, 1, '', 47187), +(@GUID+80, 181569, 556, 3791, 3791, 3, 1, -196.522, 294.837, 30.829, 4.85202, 0, 0, -0.656058, 0.75471, 86400, 255, 1, '', 47187), +(@GUID+83, 181569, 556, 3791, 3791, 3, 1, -80.9439, 307.453, 24.743, 2.84488, 0, 0, 0.989016, 0.147811, 86400, 255, 1, '', 47187), +(@GUID+86, 181569, 556, 3791, 3791, 3, 1, -100.66, 273.158, 23.1322, 3.56047, 0, 0, -0.978148, 0.207912, 86400, 255, 1, '', 47187), +-- Khorium +(@GUID+66, 181557, 556, 3791, 3791, 3, 1, -194.833, 339.823, 25.4777, 1.95477, 0, 0, 0.829038, 0.559193, 86400, 255, 1, '', 47187), +(@GUID+69, 181557, 556, 3791, 3791, 3, 1, -233.406, 200.359, 1.84191, 0.558504, 0, 0, 0.275637, 0.961262, 86400, 255, 1, '', 47187), +(@GUID+72, 181557, 556, 3791, 3791, 3, 1, -228.518, 199.721, 24.8284, 4.60767, 0, 0, -0.743144, 0.669131, 86400, 255, 1, '', 47187), +(@GUID+75, 181557, 556, 3791, 3791, 3, 1, -230.139, 291.997, 32.156, 1.65806, 0, 0, 0.737277, 0.675591, 86400, 255, 1, '', 47187), +(@GUID+78, 181557, 556, 3791, 3791, 3, 1, -221.732, 151.383, 1.69546, 1.5708, 0, 0, 0.707107, 0.707107, 86400, 255, 1, '', 47187), +(@GUID+81, 181557, 556, 3791, 3791, 3, 1, -196.522, 294.837, 30.829, 4.85202, 0, 0, -0.656058, 0.75471, 86400, 255, 1, '', 47187), +(@GUID+84, 181557, 556, 3791, 3791, 3, 1, -80.9439, 307.453, 24.743, 2.84488, 0, 0, 0.989016, 0.147811, 86400, 255, 1, '', 47187), +(@GUID+87, 181557, 556, 3791, 3791, 3, 1, -100.66, 273.158, 23.1322, 3.56047, 0, 0, -0.978148, 0.207912, 86400, 255, 1, '', 47187), +-- LICHEN GROUP 1 +(@GUID+88, 181278, 556, 3791, 3791, 3, 1, 7.98955, 112.229, 0.348708, 4.4855, 0, 0, -0.782608, 0.622515, 86400, 255, 1, '', 47187), +(@GUID+89, 181278, 556, 3791, 3791, 3, 1, 87.8129, 116.028, 0.353684, 0.59341, 0, 0, 0.292371, 0.956305, 86400, 255, 1, '', 47187), +-- LICHEN GROUP 2 +(@GUID+90, 181278, 556, 3791, 3791, 3, 1, -63.2795, 178.564, 0.01084, 1.25664, 0, 0, 0.587785, 0.809017, 86400, 255, 1, '', 47187), +(@GUID+91, 181278, 556, 3791, 3791, 3, 1, -91.2256, 110.526, 0.005229, 2.63544, 0, 0, 0.968147, 0.250381, 86400, 255, 1, '', 47187), +(@GUID+92, 181278, 556, 3791, 3791, 3, 1, -75.1794, 75.9373, 0.006448, 4.83456, 0, 0, -0.66262, 0.748956, 86400, 255, 1, '', 47187), +-- LICHEN GROUP 3 +(@GUID+93, 181278, 556, 3791, 3791, 3, 1, -279.839, 193.427, 0.057562, 1.88495, 0, 0, 0.809016, 0.587786, 86400, 255, 1, '', 47187), +(@GUID+94, 181278, 556, 3791, 3791, 3, 1, -246.083, 147.564, 0.062782, 1.76278, 0, 0, 0.771625, 0.636078, 86400, 255, 1, '', 47187), +(@GUID+95, 181278, 556, 3791, 3791, 3, 1, -237.488, 203.8, -0.051845, 1.85005, 0, 0, 0.798635, 0.601815, 86400, 255, 1, '', 47187), +-- LICHEN GROUP 4 +(@GUID+96, 181278, 556, 3791, 3791, 3, 1, -200.026, 351.062, 26.6361, 5.61996, 0, 0, -0.325567, 0.945519, 86400, 255, 1, '', 47187), +(@GUID+97, 181278, 556, 3791, 3791, 3, 1, -175.854, 340.07, 27.4297, 6.16101, 0, 0, -0.0610485, 0.998135, 86400, 255, 1, '', 47187), +(@GUID+98, 181278, 556, 3791, 3791, 3, 1, -190.816, 273.533, 26.7324, 5.5676, 0, 0, -0.350207, 0.936672, 86400, 255, 1, '', 47187), +(@GUID+99, 181278, 556, 3791, 3791, 3, 1, -242.4, 351.192, 26.7369, 5.74214, 0, 0, -0.267238, 0.963631, 86400, 255, 1, '', 47187), +-- LICHEN GROUP 5 +(@GUID+100, 181278, 556, 3791, 3791, 3, 1, -99.0857, 314.553, 26.552, 2.42601, 0, 0, 0.936672, 0.350207, 86400, 255, 1, '', 47187), +(@GUID+101, 181278, 556, 3791, 3791, 3, 1, -74.5162, 270.936, 26.7079, 2.91469, 0, 0, 0.993571, 0.113208, 86400, 255, 1, '', 47187), +(@GUID+102, 181278, 556, 3791, 3791, 3, 1, -117.02, 260.386, 26.8177, 3.24635, 0, 0, -0.998629, 0.0523532, 86400, 255, 1, '', 47187), +(@GUID+103, 181278, 556, 3791, 3791, 3, 1, -58.4746, 314.138, 27.3705, 5.34071, 0, 0, -0.45399, 0.891007, 86400, 255, 1, '', 47187), +-- SHADOW LABYRINTH +-- ORE GROUP 1 +(@GUID+104, 181556, 555, 3789, 3789, 3, 1, -444.706, -134.04, 9.70979, 2.87979, 0, 0, 0.991445, 0.130528, 86400, 255, 1, '', 47187), +(@GUID+107, 181556, 555, 3789, 3789, 3, 1, -280.173, -288.205, 15.7102, 1.51844, 0, 0, 0.688354, 0.725374, 86400, 255, 1, '', 47187), +(@GUID+110, 181556, 555, 3789, 3789, 3, 1, -413.967, -148.752, 12.0902, 1.71042, 0, 0, 0.754709, 0.656059, 86400, 255, 1, '', 47187), +(@GUID+113, 181556, 555, 3789, 3789, 3, 1, -461.452, -168.93, 21.1669, 3.61284, 0, 0, -0.972369, 0.233448, 86400, 255, 1, '', 47187), +(@GUID+116, 181556, 555, 3789, 3789, 3, 1, -343.013, -289.625, 18.6538, 3.927, 0, 0, -0.923879, 0.382686, 86400, 255, 1, '', 47187), +-- Rich Adamantite +(@GUID+105, 181569, 555, 3789, 3789, 3, 1, -444.706, -134.04, 9.70979, 2.87979, 0, 0, 0.991445, 0.130528, 86400, 255, 1, '', 47187), +(@GUID+108, 181569, 555, 3789, 3789, 3, 1, -280.173, -288.205, 15.7102, 1.51844, 0, 0, 0.688354, 0.725374, 86400, 255, 1, '', 47187), +(@GUID+111, 181569, 555, 3789, 3789, 3, 1, -413.967, -148.752, 12.0902, 1.71042, 0, 0, 0.754709, 0.656059, 86400, 255, 1, '', 47187), +(@GUID+114, 181569, 555, 3789, 3789, 3, 1, -461.452, -168.93, 21.1669, 3.61284, 0, 0, -0.972369, 0.233448, 86400, 255, 1, '', 47187), +(@GUID+117, 181569, 555, 3789, 3789, 3, 1, -343.013, -289.625, 18.6538, 3.927, 0, 0, -0.923879, 0.382686, 86400, 255, 1, '', 47187), +-- Khorium +(@GUID+106, 181557, 555, 3789, 3789, 3, 1, -444.706, -134.04, 9.70979, 2.87979, 0, 0, 0.991445, 0.130528, 86400, 255, 1, '', 47187), +(@GUID+109, 181557, 555, 3789, 3789, 3, 1, -280.173, -288.205, 15.7102, 1.51844, 0, 0, 0.688354, 0.725374, 86400, 255, 1, '', 47187), +(@GUID+112, 181557, 555, 3789, 3789, 3, 1, -413.967, -148.752, 12.0902, 1.71042, 0, 0, 0.754709, 0.656059, 86400, 255, 1, '', 47187), +(@GUID+115, 181557, 555, 3789, 3789, 3, 1, -461.452, -168.93, 21.1669, 3.61284, 0, 0, -0.972369, 0.233448, 86400, 255, 1, '', 47187), +(@GUID+118, 181557, 555, 3789, 3789, 3, 1, -343.013, -289.625, 18.6538, 3.927, 0, 0, -0.923879, 0.382686, 86400, 255, 1, '', 47187), +-- ORE GROUP 2 +(@GUID+119, 181556, 555, 3789, 3789, 3, 1, -67.3891, 37.0473, 1.74518, -1.22173, 0, 0, 0.573576, -0.819152, 86400, 255, 1, '', 0), +(@GUID+122, 181556, 555, 3789, 3789, 3, 1, -352.19, -60.7045, 17.7109, 5.75959, 0, 0, -0.258819, 0.965926, 86400, 255, 1, '', 47187), +(@GUID+125, 181556, 555, 3789, 3789, 3, 1, -235.529, 17.4544, 14.6202, 3.01941, 0, 0, 0.998135, 0.0610518, 86400, 255, 1, '', 47187), +(@GUID+128, 181556, 555, 3789, 3789, 3, 1, -362.041, -24.6519, 16.788, 1.83259, 0, 0, 0.793353, 0.608762, 86400, 255, 1, '', 47187), +(@GUID+131, 181556, 555, 3789, 3789, 3, 1, -234.062, -97.6057, 15.5083, 0.750491, 0, 0, 0.366501, 0.930418, 86400, 255, 1, '', 47187), +-- Rich Adamantite +(@GUID+120, 181569, 555, 3789, 3789, 3, 1, -67.3891, 37.0473, 1.74518, -1.22173, 0, 0, 0.573576, -0.819152, 86400, 255, 1, '', 0), +(@GUID+123, 181569, 555, 3789, 3789, 3, 1, -352.19, -60.7045, 17.7109, 5.75959, 0, 0, -0.258819, 0.965926, 86400, 255, 1, '', 47187), +(@GUID+126, 181569, 555, 3789, 3789, 3, 1, -235.529, 17.4544, 14.6202, 3.01941, 0, 0, 0.998135, 0.0610518, 86400, 255, 1, '', 47187), +(@GUID+129, 181569, 555, 3789, 3789, 3, 1, -362.041, -24.6519, 16.788, 1.83259, 0, 0, 0.793353, 0.608762, 86400, 255, 1, '', 47187), +(@GUID+132, 181569, 555, 3789, 3789, 3, 1, -234.062, -97.6057, 15.5083, 0.750491, 0, 0, 0.366501, 0.930418, 86400, 255, 1, '', 47187), +-- Khorium +(@GUID+121, 181557, 555, 3789, 3789, 3, 1, -67.3891, 37.0473, 1.74518, -1.22173, 0, 0, 0.573576, -0.819152, 86400, 255, 1, '', 0), +(@GUID+124, 181557, 555, 3789, 3789, 3, 1, -352.19, -60.7045, 17.7109, 5.75959, 0, 0, -0.258819, 0.965926, 86400, 255, 1, '', 47187), +(@GUID+127, 181557, 555, 3789, 3789, 3, 1, -235.529, 17.4544, 14.6202, 3.01941, 0, 0, 0.998135, 0.0610518, 86400, 255, 1, '', 47187), +(@GUID+130, 181557, 555, 3789, 3789, 3, 1, -362.041, -24.6519, 16.788, 1.83259, 0, 0, 0.793353, 0.608762, 86400, 255, 1, '', 47187), +(@GUID+133, 181557, 555, 3789, 3789, 3, 1, -234.062, -97.6057, 15.5083, 0.750491, 0, 0, 0.366501, 0.930418, 86400, 255, 1, '', 47187), +-- LICHEN GROUP 1 +(@GUID+134, 181278, 555, 3789, 3789, 3, 1, -94.8835, 11.1668, -1.12819, 2.28638, 0, 0, 0.909961, 0.414694, 86400, 255, 1, '', 47187), +(@GUID+135, 181278, 555, 3789, 3789, 3, 1, -77.7761, -44.3547, -1.12827, 1.71042, 0, 0, 0.754709, 0.656059, 86400, 255, 1, '', 47187), +(@GUID+136, 181278, 555, 3789, 3789, 3, 1, -34.7484, -90.9532, -1.1283, 3.17653, 0, 0, -0.999847, 0.0174693, 86400, 255, 1, '', 47187), +(@GUID+137, 181278, 555, 3789, 3789, 3, 1, -89.5791, -84.7791, -1.1283, 5.58505, 0, 0, -0.34202, 0.939693, 86400, 255, 1, '', 47187), +-- LICHEN GROUP 2 +(@GUID+138, 181278, 555, 3789, 3789, 3, 1, -169.086, 5.50827, 8.07305, 2.60054, 0, 0, 0.96363, 0.267238, 86400, 255, 1, '', 0), +(@GUID+139, 181278, 555, 3789, 3789, 3, 1, -142.808, 4.1791, 8.07297, 5.23599, 0, 0, -0.5, 0.866025, 86400, 255, 1, '', 47187), +(@GUID+140, 181278, 555, 3789, 3789, 3, 1, -145.144, -71.5597, 8.06785, 0.506145, 0, 0, 0.25038, 0.968148, 86400, 255, 1, '', 47187), +(@GUID+141, 181278, 555, 3789, 3789, 3, 1, -161.71, -14.5394, 8.0731, 4.57276, 0, 0, -0.754709, 0.656059, 86400, 255, 1, '', 47187), +(@GUID+142, 181278, 555, 3789, 3789, 3, 1, -170.012, -70.4493, 8.06785, 3.38594, 0, 0, -0.992546, 0.12187, 86400, 255, 1, '', 47187), +(@GUID+143, 181278, 555, 3789, 3789, 3, 1, -153.173, -52.8355, 8.07305, 3.4034, 0, 0, -0.991445, 0.130528, 86400, 255, 1, '', 47187), +-- LICHEN GROUP 3 +(@GUID+144, 181278, 555, 3789, 3789, 3, 1, -267.485, -79.3793, 8.07292, 5.88176, 0, 0, -0.199368, 0.979925, 86400, 255, 1, '', 47187), +(@GUID+145, 181278, 555, 3789, 3789, 3, 1, -269.214, -0.495546, 8.07293, 2.35619, 0, 0, 0.92388, 0.382683, 86400, 255, 1, '', 47187), +(@GUID+146, 181278, 555, 3789, 3789, 3, 1, -292.68, 19.5516, 8.07305, 0.0174525, 0, 0, 0.00872612, 0.999962, 86400, 255, 1, '', 47187), +(@GUID+147, 181278, 555, 3789, 3789, 3, 1, -284.108, -102.021, 8.07298, 5.46288, 0, 0, -0.398748, 0.91706, 86400, 255, 1, '', 47187), +-- LICHEN GROUP 4 +(@GUID+148, 181278, 555, 3789, 3789, 3, 1, -411.712, -203.084, 12.7605, 2.26893, 0, 0, 0.906307, 0.422619, 86400, 255, 1, '', 47187), +(@GUID+149, 181278, 555, 3789, 3789, 3, 1, -442.793, -123.579, 13.2556, 4.45059, 0, 0, -0.793353, 0.608762, 86400, 255, 1, '', 47187), +(@GUID+150, 181278, 555, 3789, 3789, 3, 1, -457.128, -195.439, 12.6891, 4.95674, 0, 0, -0.615661, 0.788011, 86400, 255, 1, '', 47187), +-- LICHEN GROUP 5 +(@GUID+151, 181278, 555, 3789, 3789, 3, 1, -286.216, -240.003, 12.6827, 2.28638, 0, 0, 0.909961, 0.414693, 86400, 255, 1, '', 0), +(@GUID+152, 181278, 555, 3789, 3789, 3, 1, -329.27, -303.466, 25.1034, 4.4855, 0, 0, -0.782608, 0.622515, 86400, 255, 1, '', 47187), +(@GUID+153, 181278, 555, 3789, 3789, 3, 1, -298.782, -304.974, 25.183, 5.11382, 0, 0, -0.551936, 0.833886, 86400, 255, 1, '', 47187), +(@GUID+154, 181278, 555, 3789, 3789, 3, 1, -326.735, -244.62, 12.6846, 4.59022, 0, 0, -0.748956, 0.66262, 86400, 255, 1, '', 47187), +-- LICHEN GROUP 6 +(@GUID+155, 181278, 555, 3789, 3789, 3, 1, -139.013, -396.985, 17.08, 2.82743, 0, 0, 0.987688, 0.156436, 86400, 255, 1, '', 47187), +(@GUID+156, 181278, 555, 3789, 3789, 3, 1, -170.229, -386.925, 17.0808, 5.14872, 0, 0, -0.537299, 0.843392, 86400, 255, 1, '', 47187), +(@GUID+157, 181278, 555, 3789, 3789, 3, 1, -170.759, -350.168, 17.0826, 4.64258, 0, 0, -0.731354, 0.681998, 86400, 255, 1, '', 47187), +(@GUID+158, 181278, 555, 3789, 3789, 3, 1, -137.353, -406.701, 17.08, 3.68265, 0, 0, -0.96363, 0.267241, 86400, 255, 1, '', 47187), +(@GUID+159, 181278, 555, 3789, 3789, 3, 1, -139.072, -443.655, 17.0795, 0.087266, 0, 0, 0.0436192, 0.999048, 86400, 255, 1, '', 47187), +(@GUID+160, 181278, 555, 3789, 3789, 3, 1, -174.217, -435.155, 17.0785, 2.28638, 0, 0, 0.909961, 0.414694, 86400, 255, 1, '', 47187); + +DELETE FROM `pool_template` WHERE `description` LIKE '%Auchenai Crypts%' AND `entry` BETWEEN @POOLMOTHER+0 AND @POOLMOTHER+5; +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@POOLMOTHER+0, 1, 'Auchenai Crypts - Ores - Group 1'), +(@POOLMOTHER+1, 1, 'Auchenai Crypts - Ores - Group 2'), +(@POOLMOTHER+2, 1, 'Auchenai Crypts - Ancient Lichen - Group 1'), +(@POOLMOTHER+3, 1, 'Auchenai Crypts - Ancient Lichen - Group 2'), +(@POOLMOTHER+4, 1, 'Auchenai Crypts - Ancient Lichen - Group 3'), +(@POOLMOTHER+5, 1, 'Auchenai Crypts - Ancient Lichen - Group 4'); + +DELETE FROM `pool_template` WHERE `description` LIKE '%Sethekk Halls%' AND `entry` BETWEEN @POOLMOTHER+6 AND @POOLMOTHER+12; +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@POOLMOTHER+6 , 1, 'Sethekk Halls - Ores - Group 1'), +(@POOLMOTHER+7 , 1, 'Sethekk Halls - Ores - Group 2'), +(@POOLMOTHER+8 , 1, 'Sethekk Halls - Ancient Lichen - Group 1'), +(@POOLMOTHER+9 , 1, 'Sethekk Halls - Ancient Lichen - Group 2'), +(@POOLMOTHER+10, 1, 'Sethekk Halls - Ancient Lichen - Group 3'), +(@POOLMOTHER+11, 1, 'Sethekk Halls - Ancient Lichen - Group 4'), +(@POOLMOTHER+12, 1, 'Sethekk Halls - Ancient Lichen - Group 5'); + +DELETE FROM `pool_template` WHERE `description` LIKE '%Shadow Labyrinth%' AND `entry` BETWEEN @POOLMOTHER+13 AND @POOLMOTHER+20; +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@POOLMOTHER+13, 1, 'Shadow Labyrinth - Ores - Group 1'), +(@POOLMOTHER+14, 1, 'Shadow Labyrinth - Ores - Group 2'), +(@POOLMOTHER+15, 1, 'Shadow Labyrinth - Ancient Lichen - Group 1'), +(@POOLMOTHER+16, 1, 'Shadow Labyrinth - Ancient Lichen - Group 2'), +(@POOLMOTHER+17, 1, 'Shadow Labyrinth - Ancient Lichen - Group 3'), +(@POOLMOTHER+18, 1, 'Shadow Labyrinth - Ancient Lichen - Group 4'), +(@POOLMOTHER+19, 1, 'Shadow Labyrinth - Ancient Lichen - Group 5'), +(@POOLMOTHER+20, 1, 'Shadow Labyrinth - Ancient Lichen - Group 6'); + +DELETE FROM `pool_gameobject` WHERE `description`='Ancient Lichen - Auchenai Crypts' AND `guid` BETWEEN @GUID+30 AND @GUID+45 AND `pool_entry` BETWEEN @POOLMOTHER+2 AND @POOLMOTHER+5; +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@GUID+30, @POOLMOTHER+2, 0, 'Ancient Lichen - Auchenai Crypts'), +(@GUID+31, @POOLMOTHER+2, 0, 'Ancient Lichen - Auchenai Crypts'), +(@GUID+32, @POOLMOTHER+2, 0, 'Ancient Lichen - Auchenai Crypts'), +(@GUID+33, @POOLMOTHER+2, 0, 'Ancient Lichen - Auchenai Crypts'), +(@GUID+34, @POOLMOTHER+3, 0, 'Ancient Lichen - Auchenai Crypts'), +(@GUID+35, @POOLMOTHER+3, 0, 'Ancient Lichen - Auchenai Crypts'), +(@GUID+36, @POOLMOTHER+3, 0, 'Ancient Lichen - Auchenai Crypts'), +(@GUID+37, @POOLMOTHER+4, 0, 'Ancient Lichen - Auchenai Crypts'), +(@GUID+38, @POOLMOTHER+4, 0, 'Ancient Lichen - Auchenai Crypts'), +(@GUID+39, @POOLMOTHER+4, 0, 'Ancient Lichen - Auchenai Crypts'), +(@GUID+40, @POOLMOTHER+5, 0, 'Ancient Lichen - Auchenai Crypts'), +(@GUID+41, @POOLMOTHER+5, 0, 'Ancient Lichen - Auchenai Crypts'), +(@GUID+42, @POOLMOTHER+5, 0, 'Ancient Lichen - Auchenai Crypts'), +(@GUID+43, @POOLMOTHER+5, 0, 'Ancient Lichen - Auchenai Crypts'), +(@GUID+44, @POOLMOTHER+5, 0, 'Ancient Lichen - Auchenai Crypts'), +(@GUID+45, @POOLMOTHER+5, 0, 'Ancient Lichen - Auchenai Crypts'); + +DELETE FROM `pool_gameobject` WHERE `description`='Ancient Lichen - Sethekk Halls' AND `guid` BETWEEN @GUID+88 AND @GUID+103 AND `pool_entry` BETWEEN @POOLMOTHER+8 AND @POOLMOTHER+12; +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@GUID+88 , @POOLMOTHER+8 , 0, 'Ancient Lichen - Sethekk Halls'), +(@GUID+89 , @POOLMOTHER+8 , 0, 'Ancient Lichen - Sethekk Halls'), +(@GUID+90 , @POOLMOTHER+9 , 0, 'Ancient Lichen - Sethekk Halls'), +(@GUID+91 , @POOLMOTHER+9 , 0, 'Ancient Lichen - Sethekk Halls'), +(@GUID+92 , @POOLMOTHER+9 , 0, 'Ancient Lichen - Sethekk Halls'), +(@GUID+93 , @POOLMOTHER+10, 0, 'Ancient Lichen - Sethekk Halls'), +(@GUID+94 , @POOLMOTHER+10, 0, 'Ancient Lichen - Sethekk Halls'), +(@GUID+95 , @POOLMOTHER+10, 0, 'Ancient Lichen - Sethekk Halls'), +(@GUID+96 , @POOLMOTHER+11, 0, 'Ancient Lichen - Sethekk Halls'), +(@GUID+97 , @POOLMOTHER+11, 0, 'Ancient Lichen - Sethekk Halls'), +(@GUID+98 , @POOLMOTHER+11, 0, 'Ancient Lichen - Sethekk Halls'), +(@GUID+99 , @POOLMOTHER+11, 0, 'Ancient Lichen - Sethekk Halls'), +(@GUID+100, @POOLMOTHER+12, 0, 'Ancient Lichen - Sethekk Halls'), +(@GUID+101, @POOLMOTHER+12, 0, 'Ancient Lichen - Sethekk Halls'), +(@GUID+102, @POOLMOTHER+12, 0, 'Ancient Lichen - Sethekk Halls'), +(@GUID+103, @POOLMOTHER+12, 0, 'Ancient Lichen - Sethekk Halls'); + +DELETE FROM `pool_gameobject` WHERE `description`='Ancient Lichen - Shadow Labyrinth' AND `guid` BETWEEN @GUID+134 AND @GUID+160 AND `pool_entry` BETWEEN @POOLMOTHER+15 AND @POOLMOTHER+20; +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@GUID+134, @POOLMOTHER+15, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+135, @POOLMOTHER+15, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+136, @POOLMOTHER+15, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+137, @POOLMOTHER+15, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+138, @POOLMOTHER+16, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+139, @POOLMOTHER+16, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+140, @POOLMOTHER+16, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+141, @POOLMOTHER+16, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+142, @POOLMOTHER+16, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+143, @POOLMOTHER+16, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+144, @POOLMOTHER+17, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+145, @POOLMOTHER+17, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+146, @POOLMOTHER+17, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+147, @POOLMOTHER+17, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+148, @POOLMOTHER+18, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+149, @POOLMOTHER+18, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+150, @POOLMOTHER+18, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+151, @POOLMOTHER+19, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+152, @POOLMOTHER+19, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+153, @POOLMOTHER+19, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+154, @POOLMOTHER+19, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+155, @POOLMOTHER+20, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+156, @POOLMOTHER+20, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+157, @POOLMOTHER+20, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+158, @POOLMOTHER+20, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+159, @POOLMOTHER+20, 0, 'Ancient Lichen - Shadow Labyrinth'), +(@GUID+160, @POOLMOTHER+20, 0, 'Ancient Lichen - Shadow Labyrinth'); + +DELETE FROM `pool_gameobject` WHERE `description`='Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein' AND `guid` BETWEEN @GUID+0 AND @GUID+29 AND `pool_entry` BETWEEN @POOL+0 AND @POOL+9; +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@GUID+0 , @POOL+0, 0 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+3 , @POOL+1, 0 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+6 , @POOL+2, 0 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+9 , @POOL+3, 0 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+12, @POOL+4, 0 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+15, @POOL+5, 0 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+1 , @POOL+0, 40, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+4 , @POOL+1, 40, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+7 , @POOL+2, 40, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+10, @POOL+3, 40, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+13, @POOL+4, 40, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+16, @POOL+5, 40, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+2 , @POOL+0, 5 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+5 , @POOL+1, 5 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+8 , @POOL+2, 5 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+11, @POOL+3, 5 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+14, @POOL+4, 5 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+17, @POOL+5, 5 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+18, @POOL+6, 0 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+21, @POOL+7, 0 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+24, @POOL+8, 0 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+27, @POOL+9, 0 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+19, @POOL+6, 40, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+22, @POOL+7, 40, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+25, @POOL+8, 40, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+28, @POOL+9, 40, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+20, @POOL+6, 5 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+23, @POOL+7, 5 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+26, @POOL+8, 5 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+29, @POOL+9, 5 , 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'); + +DELETE FROM `pool_template` WHERE `description`='Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein' AND `entry` BETWEEN @POOL+0 AND @POOL+9; +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@POOL+0, 1, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+1, 1, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+2, 1, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+3, 1, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+4, 1, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+5, 1, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+6, 1, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+7, 1, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+8, 1, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+9, 1, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'); + +DELETE FROM `pool_pool` WHERE `description` LIKE '%Auchenai Crypts%' AND `pool_id` BETWEEN @POOL+0 AND @POOL+9 AND `mother_pool` BETWEEN @POOLMOTHER+0 AND @POOLMOTHER+1; +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`) VALUES +(@POOL+0, @POOLMOTHER+0, 0, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+1, @POOLMOTHER+0, 0, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+2, @POOLMOTHER+0, 0, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+3, @POOLMOTHER+0, 0, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+4, @POOLMOTHER+0, 0, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+5, @POOLMOTHER+0, 0, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+6, @POOLMOTHER+1, 0, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'), +(@POOL+7, @POOLMOTHER+1, 0, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'), +(@POOL+8, @POOLMOTHER+1, 0, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'), +(@POOL+9, @POOLMOTHER+1, 0, 'Auchenai Crypts - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'); + +DELETE FROM `pool_gameobject` WHERE `description`='Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein' AND `guid` BETWEEN @GUID+46 AND @GUID+87 AND `pool_entry` BETWEEN @POOL+10 AND @POOL+23; +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@GUID+46, @POOL+10, 0 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+49, @POOL+11, 0 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+52, @POOL+12, 0 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+55, @POOL+13, 0 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+58, @POOL+14, 0 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+61, @POOL+15, 0 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+47, @POOL+10, 40, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+50, @POOL+11, 40, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+53, @POOL+12, 40, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+56, @POOL+13, 40, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+59, @POOL+14, 40, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+62, @POOL+15, 40, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+48, @POOL+10, 5 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+51, @POOL+11, 5 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+54, @POOL+12, 5 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+57, @POOL+13, 5 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+60, @POOL+14, 5 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+63, @POOL+15, 5 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+64, @POOL+16, 0 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+67, @POOL+17, 0 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+70, @POOL+18, 0 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+73, @POOL+19, 0 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+76, @POOL+20, 0 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+79, @POOL+21, 0 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+82, @POOL+22, 0 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+85, @POOL+23, 0 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+65, @POOL+16, 40, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+68, @POOL+17, 40, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+71, @POOL+18, 40, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+74, @POOL+19, 40, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+77, @POOL+20, 40, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+80, @POOL+21, 40, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+83, @POOL+22, 40, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+86, @POOL+23, 40, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+66, @POOL+16, 5 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+69, @POOL+17, 5 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+72, @POOL+18, 5 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+75, @POOL+19, 5 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+78, @POOL+20, 5 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+81, @POOL+21, 5 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+84, @POOL+22, 5 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+87, @POOL+23, 5 , 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'); + +DELETE FROM `pool_template` WHERE `description`='Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein' AND `entry` BETWEEN @POOL+10 AND @POOL+23; +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@POOL+10, 1, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+11, 1, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+12, 1, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+13, 1, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+14, 1, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+15, 1, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+16, 1, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+17, 1, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+18, 1, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+19, 1, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+20, 1, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+21, 1, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+22, 1, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+23, 1, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'); + +DELETE FROM `pool_pool` WHERE `description` LIKE '%Sethekk Halls%' AND `pool_id` BETWEEN @POOL+10 AND @POOL+23 AND `mother_pool` BETWEEN @POOLMOTHER+6 AND @POOLMOTHER+7; +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`) VALUES +(@POOL+10, @POOLMOTHER+6, 0, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+11, @POOLMOTHER+6, 0, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+12, @POOLMOTHER+6, 0, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+13, @POOLMOTHER+6, 0, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+14, @POOLMOTHER+6, 0, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+15, @POOLMOTHER+6, 0, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+16, @POOLMOTHER+7, 0, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'), +(@POOL+17, @POOLMOTHER+7, 0, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'), +(@POOL+18, @POOLMOTHER+7, 0, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'), +(@POOL+19, @POOLMOTHER+7, 0, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'), +(@POOL+20, @POOLMOTHER+7, 0, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'), +(@POOL+21, @POOLMOTHER+7, 0, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'), +(@POOL+22, @POOLMOTHER+7, 0, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'), +(@POOL+23, @POOLMOTHER+7, 0, 'Sethekk Halls - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'); + +DELETE FROM `pool_gameobject` WHERE `description`='Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein' AND `guid` BETWEEN @GUID+104 AND @GUID+133 AND `pool_entry` BETWEEN @POOL+24 AND @POOL+33; +INSERT INTO `pool_gameobject` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@GUID+104, @POOL+24, 0 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+107, @POOL+25, 0 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+110, @POOL+26, 0 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+113, @POOL+27, 0 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+116, @POOL+28, 0 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+105, @POOL+24, 40, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+108, @POOL+25, 40, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+111, @POOL+26, 40, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+114, @POOL+27, 40, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+117, @POOL+28, 40, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+106, @POOL+24, 5 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+109, @POOL+25, 5 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+112, @POOL+26, 5 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+115, @POOL+27, 5 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+118, @POOL+28, 5 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+119, @POOL+29, 0 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+122, @POOL+30, 0 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+125, @POOL+31, 0 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+128, @POOL+32, 0 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+131, @POOL+33, 0 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+120, @POOL+29, 40, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+123, @POOL+30, 40, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+126, @POOL+31, 40, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+129, @POOL+32, 40, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+132, @POOL+33, 40, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+121, @POOL+29, 5 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+124, @POOL+30, 5 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+127, @POOL+31, 5 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+130, @POOL+32, 5 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@GUID+133, @POOL+33, 5 , 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'); + +DELETE FROM `pool_template` WHERE `description`='Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein' AND `entry` BETWEEN @POOL+24 AND @POOL+33; +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@POOL+24, 1, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+25, 1, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+26, 1, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+27, 1, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+28, 1, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+29, 1, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+30, 1, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+31, 1, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+32, 1, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'), +(@POOL+33, 1, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein'); + +DELETE FROM `pool_pool` WHERE `description` LIKE '%Shadow Labyrinth%' AND `pool_id` BETWEEN @POOL+24 AND @POOL+33 AND `mother_pool` BETWEEN @POOLMOTHER+13 AND @POOLMOTHER+14; +INSERT INTO `pool_pool` (`pool_id`, `mother_pool`, `chance`, `description`) VALUES +(@POOL+24, @POOLMOTHER+13, 0, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+25, @POOLMOTHER+13, 0, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+26, @POOLMOTHER+13, 0, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+27, @POOLMOTHER+13, 0, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+28, @POOLMOTHER+13, 0, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 1'), +(@POOL+29, @POOLMOTHER+14, 0, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'), +(@POOL+30, @POOLMOTHER+14, 0, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'), +(@POOL+31, @POOLMOTHER+14, 0, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'), +(@POOL+32, @POOLMOTHER+14, 0, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'), +(@POOL+33, @POOLMOTHER+14, 0, 'Shadow Labyrinth - Adamantite Deposit / Rich Adamantite Deposit / Khorium Vein - Group 2'); From 9d667658f02e1a6edd48b303251d9f32577f210e Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Wed, 4 Jan 2023 12:44:48 -0300 Subject: [PATCH 65/66] fix(DB/SmartAI): Implement Hal McAllister and Nat Pagle event in Old Southshore (#14493) * attempt 1 * Update rev_1672333160913910400.sql * remove leftover --- .../rev_1672333160913910400.sql | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1672333160913910400.sql diff --git a/data/sql/updates/pending_db_world/rev_1672333160913910400.sql b/data/sql/updates/pending_db_world/rev_1672333160913910400.sql new file mode 100644 index 000000000..476eb4260 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672333160913910400.sql @@ -0,0 +1,126 @@ +-- Fix Positions +UPDATE `creature` SET `position_x`=1735.767578125, `position_y`=1072.0616455078125, `position_z`=6.96295166015625, `orientation`=3.246312379837036132, `VerifiedBuild`=47187 WHERE `id1`=20342; +UPDATE `creature` SET `position_x`=1735.560546875, `position_y`=1074.1854248046875, `position_z`=6.96295166015625, `orientation`=3.193952560424804687, `VerifiedBuild`=47187 WHERE `id1`=20342; + +-- Fix EmoteState +DELETE FROM `creature_template_addon` WHERE (`entry` IN (20342, 20344)); +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(20342, 0, 0, 0, 1, 379, 0, ''), +(20344, 0, 0, 0, 1, 379, 0, ''); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20344); +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 +(20344, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Reset - Set Event Phase 1'), +(20344, 0, 1, 0, 60, 1, 100, 0, 120000, 120000, 120000, 120000, 0, 80, 2034400, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Update - Run Script (Phase 1)'), +(20344, 0, 2, 0, 60, 2, 100, 0, 2800, 2800, 2800, 2800, 0, 80, 2034401, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Update - Run Script (Phase 2)'), +(20344, 0, 3, 0, 60, 4, 100, 0, 2800, 2800, 2800, 2800, 0, 80, 2034402, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Update - Run Script (Phase 3)'), +(20344, 0, 4, 0, 60, 8, 100, 0, 2800, 2800, 2800, 2800, 0, 80, 2034403, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Update - Run Script (Phase 4)'), +(20344, 0, 5, 0, 60, 16, 100, 0, 2800, 2800, 2800, 2800, 0, 80, 2034404, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Update - Run Script (Phase 5)'), +(20344, 0, 6, 0, 60, 32, 100, 0, 2800, 2800, 2800, 2800, 0, 80, 2034405, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Update - Run Script (Phase 6)'), +(20344, 0, 7, 0, 60, 64, 100, 0, 2800, 2800, 2800, 2800, 0, 80, 2034406, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Update - Run Script (Phase 7)'), +(20344, 0, 8, 0, 60, 128, 100, 0, 2800, 2800, 2800, 2800, 0, 80, 2034407, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Update - Run Script (Phase 8)'); + +DELETE FROM `smart_scripts` WHERE ((`entryorguid` BETWEEN 2034400 AND 2034407) 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 +(2034400, 9, 0, 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, 'Nat Pagle - On Script - Say Line \'Hal...\''), +(2034400, 9, 1, 0, 0, 0, 100, 0, 2500, 2500, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 20342, 10, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Trigger Hal \'Yea, Nat?\''), +(2034400, 9, 2, 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, 'Nat Pagle - On Script - Say Line \'Had that dream again last night...\''), +(2034400, 9, 3, 0, 0, 0, 100, 0, 5500, 5500, 0, 0, 0, 45, 1, 2, 0, 0, 0, 0, 19, 20342, 10, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Trigger Hal \'Which one?\''), +(2034400, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 31, 2, 8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Set Phase Random Between 2-8'), + +(2034401, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Restore Event Phase 1'), +(2034401, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 1'), +(2034401, 9, 2, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 2'), +(2034401, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 3'), +(2034401, 9, 4, 0, 0, 0, 100, 0, 8500, 8500, 0, 0, 0, 45, 1, 3, 0, 0, 0, 0, 19, 20342, 10, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Trigger Closing Line'), + +(2034402, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Restore Event Phase 1'), +(2034402, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 1'), +(2034402, 9, 2, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 2'), +(2034402, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 3'), +(2034402, 9, 4, 0, 0, 0, 100, 0, 8500, 8500, 0, 0, 0, 45, 1, 3, 0, 0, 0, 0, 19, 20342, 10, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Trigger Closing Line'), + +(2034403, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Restore Event Phase 1'), +(2034403, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 8 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 1'), +(2034403, 9, 2, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 9 , 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 2'), +(2034403, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 3'), +(2034403, 9, 4, 0, 0, 0, 100, 0, 8500, 8500, 0, 0, 0, 45, 1, 3, 0, 0, 0, 0, 19, 20342, 10, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Trigger Closing Line'), + +(2034404, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Restore Event Phase 1'), +(2034404, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 1'), +(2034404, 9, 2, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 12, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 2'), +(2034404, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 13, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 3'), +(2034404, 9, 4, 0, 0, 0, 100, 0, 8500, 8500, 0, 0, 0, 45, 1, 3, 0, 0, 0, 0, 19, 20342, 10, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Trigger Closing Line'), + +(2034405, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Restore Event Phase 1'), +(2034405, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 1'), +(2034405, 9, 2, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 15, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 2'), +(2034405, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 16, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 3'), +(2034405, 9, 4, 0, 0, 0, 100, 0, 8500, 8500, 0, 0, 0, 45, 1, 3, 0, 0, 0, 0, 19, 20342, 10, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Trigger Closing Line'), + +(2034406, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Restore Event Phase 1'), +(2034406, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 17, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 1'), +(2034406, 9, 2, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 18, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 2'), +(2034406, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 19, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 3'), +(2034406, 9, 4, 0, 0, 0, 100, 0, 8500, 8500, 0, 0, 0, 45, 1, 3, 0, 0, 0, 0, 19, 20342, 10, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Trigger Closing Line'), + +(2034407, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Restore Event Phase 1'), +(2034407, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 20, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 1'), +(2034407, 9, 2, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 21, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 2'), +(2034407, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 22, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Say Part 3'), +(2034407, 9, 4, 0, 0, 0, 100, 0, 8500, 8500, 0, 0, 0, 45, 1, 3, 0, 0, 0, 0, 19, 20342, 10, 0, 0, 0, 0, 0, 0, 'Nat Pagle - On Script - Trigger Closing Line'); + +DELETE FROM `creature_text` WHERE `CreatureID`=20344; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `BroadcastTextId`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `TextRange`, `comment`) VALUES +(20344, 0 , 0, 17966, 'Hal...', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), + +(20344, 1 , 0, 17968, 'Had that dream again last night...', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), + +(20344, 2 , 0, 17970, 'That one dream... The crazy one. Remember?', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), +(20344, 3 , 0, 17971, 'Tarren Mill is destroyed by some crazy force of undead and forever more becomes an enemy to Southshore.', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), +(20344, 4 , 0, 17972, 'Could ya imagine such a thing, Hal? Could ya?', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), + +(20344, 5 , 0, 17973, 'That one where I\'m in Durnholde and that one orc that Blackmoore keeps as his personal slave breaks out...', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), +(20344, 6 , 0, 17974, 'He ends up destroying the whole keep, freeing all the orcs we\'re keeping in the camps, and rising to power as the king of orcs... Warchief or somethin\'.', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), +(20344, 7 , 0, 17975, 'Crazy, isn\'t it?', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), + +(20344, 8 , 0, 17976, 'So I\'m on some mountain with some big ol\' tree. Bunch of elves runnin\' around all over...', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), +(20344, 9 , 0, 17977, 'Out of nowhere, some 300 foot tall demon or somethin\' walks up and starts climbin\' the tree...', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), +(20344, 10, 0, 17978, 'And if that weren\'t crazy enough, that big demon gets killed by a bunch of little floating light things... Oh, I was also a female elf in that one... Yep...', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), + +(20344, 11, 0, 17979, 'In this dream, I was fishin\' master of the world. I moved to some place called Kalimdor...', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), +(20344, 12, 0, 17980, 'And people from all over the world come to me to pay homage... and learn to fish.', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), +(20344, 13, 0, 17981, 'I\'m like some kind of fishing god...', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), + +(20344, 14, 0, 17982, 'I can\'t even believe this one... You know those two loud-mouthed ruffians, Foror and Tigule?', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), +(20344, 15, 0, 17983, 'Well in this dream, they somehow end up inventing something called ice-cream and flavoring it with strawberries... Well, long story short, they end up striking it rich!', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), +(20344, 16, 0, 17984, 'If that weren\'t crazy enough, they decide to quit the ice-cream business and become adventurers... They travel all over the place and finally disappear into some portal. I woke up in a cold sweat after that one...', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), + +(20344, 17, 0, 17985, 'This one\'s real grim... So the king\'s kid, Arthas... Well he goes out to battle evil, along with Uther... *Nat pats his brow dry*', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), +(20344, 18, 0, 17986, 'But tragically, Arthas is consumed by the evil and becomes evil himself...', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), +(20344, 19, 0, 17987, 'Well, he comes back to the king all pretendin\' to be nice, draws his sword, and runs the king through, elbow to ... well you know... kills him on the spot.', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), + +(20344, 20, 0, 18060, 'That one where thousands of people are all watching us from up in the sky...', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), +(20344, 21, 0, 18061, 'We\'re like their puppets - we dance and cry and fight and say silly things for their amusement.\n', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'), +(20344, 22, 0, 18062, 'Sometimes, even when I\'m awake, I think they\'re watching us. Maybe they\'re watching us right now...', 12, 0, 100, 0, 0, 0, 0, 'Nat Pagle'); + +DELETE FROM `creature_text` WHERE `CreatureID`=20342; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `BroadcastTextId`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `TextRange`, `comment`) VALUES +(20342, 0, 0, 17967, 'Yea, Nat?', 12, 0, 100, 0, 0, 0, 0, 'Hal McAllister'), + +(20342, 1, 0, 17969, 'Which one?', 12, 0, 100, 0, 0, 0, 0, 'Hal McAllister'), + +(20342, 2, 0, 17988, 'It\'ll never happen, Nat.\n', 12, 0, 100, 0, 0, 0, 0, 'Hal McAllister'), +(20342, 2, 1, 17989, 'Impossible!\n', 12, 0, 100, 0, 0, 0, 0, 'Hal McAllister'), +(20342, 2, 2, 17990, 'I worry about you sometimes, Nat.', 12, 0, 100, 0, 0, 0, 0, 'Hal McAllister'), +(20342, 2, 3, 17991, 'No way.\n', 12, 0, 100, 0, 0, 0, 0, 'Hal McAllister'), +(20342, 2, 4, 17992, 'Nat, I\'ve heard a whopper or two in my day but that one takes the cake.\n', 12, 0, 100, 0, 0, 0, 0, 'Hal McAllister'), +(20342, 2, 5, 17993, 'What you got in that pipe, Nat?\n', 12, 0, 100, 0, 0, 0, 0, 'Hal McAllister'), +(20342, 2, 6, 17994, '*Hal shakes his head* Nat, Nat, Nat...\n', 12, 0, 100, 0, 0, 0, 0, 'Hal McAllister'), +(20342, 2, 7, 17995, 'Shut up and fish, Nat.\n', 12, 0, 100, 0, 0, 0, 0, 'Hal McAllister'); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 20342) 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 +(20342, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hal McAllister - On Data Set 1 1 - Say \'Yea, Nat?\''), +(20342, 0, 1, 0, 38, 0, 100, 0, 1, 2, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hal McAllister - On Data Set 1 2 - Say \'Which one?\''), +(20342, 0, 2, 0, 38, 0, 100, 0, 1, 3, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Hal McAllister - On Data Set 1 3 - Say Closing Line'); From 28d190c82cb35222ea92b137b2e0f5ad6c91c456 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 4 Jan 2023 15:46:49 +0000 Subject: [PATCH 66/66] chore(DB): import pending files Referenced commit(s): 9d667658f02e1a6edd48b303251d9f32577f210e --- .../rev_1672333160913910400.sql => db_world/2023_01_04_01.sql} | 1 + .../rev_1672780892044441400.sql => db_world/2023_01_04_02.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/rev_1672333160913910400.sql => db_world/2023_01_04_01.sql} (99%) rename data/sql/updates/{pending_db_world/rev_1672780892044441400.sql => db_world/2023_01_04_02.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1672333160913910400.sql b/data/sql/updates/db_world/2023_01_04_01.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1672333160913910400.sql rename to data/sql/updates/db_world/2023_01_04_01.sql index 476eb4260..e489bed86 100644 --- a/data/sql/updates/pending_db_world/rev_1672333160913910400.sql +++ b/data/sql/updates/db_world/2023_01_04_01.sql @@ -1,3 +1,4 @@ +-- DB update 2023_01_04_00 -> 2023_01_04_01 -- Fix Positions UPDATE `creature` SET `position_x`=1735.767578125, `position_y`=1072.0616455078125, `position_z`=6.96295166015625, `orientation`=3.246312379837036132, `VerifiedBuild`=47187 WHERE `id1`=20342; UPDATE `creature` SET `position_x`=1735.560546875, `position_y`=1074.1854248046875, `position_z`=6.96295166015625, `orientation`=3.193952560424804687, `VerifiedBuild`=47187 WHERE `id1`=20342; diff --git a/data/sql/updates/pending_db_world/rev_1672780892044441400.sql b/data/sql/updates/db_world/2023_01_04_02.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1672780892044441400.sql rename to data/sql/updates/db_world/2023_01_04_02.sql index 22ba83210..d3cb3ab6c 100644 --- a/data/sql/updates/pending_db_world/rev_1672780892044441400.sql +++ b/data/sql/updates/db_world/2023_01_04_02.sql @@ -1,3 +1,4 @@ +-- DB update 2023_01_04_01 -> 2023_01_04_02 -- DELETE FROM `gameobject` WHERE `id` IN (181278, 181556, 181557, 181569) AND `map` IN (555, 556, 558) AND `guid` IN (21567,21568,21569,21570,21571,21572,21911,21912,61346,61347,61348,61350,61355,61356,61357,61388,61393,61415,61416,61417,61418,61886,61898,61899,61901,61908,61958,63196);