From 50b85220a0c3e785507ff616b9de45d669bcc6c6 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 27 Dec 2022 15:05:08 -0300 Subject: [PATCH 01/32] fix(Core/AI): Fix target selectors logic when accounting for tanks (#14368) --- src/server/game/AI/CoreAI/UnitAI.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h index d5288c4e4..0d9cc7c66 100644 --- a/src/server/game/AI/CoreAI/UnitAI.h +++ b/src/server/game/AI/CoreAI/UnitAI.h @@ -52,7 +52,7 @@ struct DefaultTargetSelector : public Acore::unary_function // playerOnly: self explaining // withMainTank: allow current tank to be selected // aura: if 0: ignored, if > 0: the target shall have the aura, if < 0, the target shall NOT have the aura - DefaultTargetSelector(Unit const* unit, float dist, bool playerOnly, bool withMainTank, int32 aura) : me(unit), m_dist(dist), except(withMainTank ? me->GetThreatMgr().GetCurrentVictim() : nullptr), m_playerOnly(playerOnly), m_aura(aura) {} + DefaultTargetSelector(Unit const* unit, float dist, bool playerOnly, bool withMainTank, int32 aura) : me(unit), m_dist(dist), except(!withMainTank ? me->GetThreatMgr().GetCurrentVictim() : nullptr), m_playerOnly(playerOnly), m_aura(aura) {} bool operator()(Unit const* target) const { From 2eb374c6e47ccb86a61fa53b84503b68942c531f Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 27 Dec 2022 20:38:00 -0300 Subject: [PATCH 02/32] =?UTF-8?q?fix(Core/Totem):=20Implement=20casting=20?= =?UTF-8?q?delay=20for=20the=20Fire=20Totem=20used=20by=20c=E2=80=A6=20(#1?= =?UTF-8?q?4276)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Core/Totem): Implement casting delay for the Fire Totem used by creatures * clear debug * Update src/server/game/Entities/Totem/Totem.h * fix build * Update Totem.cpp --- src/server/game/Entities/Totem/Totem.cpp | 22 ++++++++++++++++++---- src/server/game/Entities/Totem/Totem.h | 7 ++++++- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp index 172cf5fd6..76bac1473 100644 --- a/src/server/game/Entities/Totem/Totem.cpp +++ b/src/server/game/Entities/Totem/Totem.cpp @@ -82,14 +82,28 @@ void Totem::InitSummon() Minion::InitSummon(); if (m_type == TOTEM_PASSIVE && GetSpell()) - CastSpell(this, GetSpell(), true); + { + if (TotemSpellIds(GetUInt32Value(UNIT_CREATED_BY_SPELL)) == TotemSpellIds::FireTotemSpell) + { + m_Events.AddEventAtOffset([this]() + { + CastSpell(this, GetSpell(), true); + }, 4s); + } + else + { + CastSpell(this, GetSpell(), true); + } + } // Some totems can have both instant effect and passive spell - if(GetSpell(1)) + if (GetSpell(1)) + { CastSpell(this, GetSpell(1), true); + } // xinef: this is better than the script, 100% sure to work - if(GetEntry() == SENTRY_TOTEM_ENTRY) + if (GetEntry() == SENTRY_TOTEM_ENTRY) { SetReactState(REACT_AGGRESSIVE); GetOwner()->CastSpell(this, 6277, true); @@ -132,7 +146,7 @@ void Totem::UnSummon(uint32 msTime) // Remove Sentry Totem Aura if (GetEntry() == SENTRY_TOTEM_ENTRY) - owner->RemoveAurasDueToSpell(SENTRY_TOTEM_SPELLID); + owner->RemoveAurasDueToSpell(static_cast(TotemSpellIds::SentryTotemSpell)); //remove aura all party members too if (Player* player = owner->ToPlayer()) diff --git a/src/server/game/Entities/Totem/Totem.h b/src/server/game/Entities/Totem/Totem.h index cbfa6f3f0..fcaabf91d 100644 --- a/src/server/game/Entities/Totem/Totem.h +++ b/src/server/game/Entities/Totem/Totem.h @@ -27,7 +27,12 @@ enum TotemType TOTEM_STATUE = 2 // copied straight from moongose, may need more implementation to work }; // Some Totems cast spells that are not in creature DB -#define SENTRY_TOTEM_SPELLID 6495 + +enum class TotemSpellIds : uint32 +{ + SentryTotemSpell = 6495, + FireTotemSpell = 32062 +}; #define SENTRY_TOTEM_ENTRY 3968 #define EARTHBIND_TOTEM_ENTRY 2630 From 6345958769911ff8238e32c80d1a1e286724a472 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Wed, 28 Dec 2022 01:43:12 +0100 Subject: [PATCH 03/32] =?UTF-8?q?fix(Core/Loot):=20Disenchanted,=20milled?= =?UTF-8?q?=20or=20prospected=20items=20should=20be=20se=E2=80=A6=20(#1427?= =?UTF-8?q?3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/Loot): Disenchanted, milled or prospected items should be sent as retrieval mail in case of full bags. Fixes #10798 --- src/server/game/Entities/Player/Player.cpp | 21 +++++++++++++-------- src/server/game/Entities/Player/Player.h | 2 +- src/server/game/Handlers/LootHandler.cpp | 11 ++++++++++- src/server/game/Loot/LootMgr.cpp | 5 ++++- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index e17d7ffd4..3522577ab 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -13250,18 +13250,19 @@ void Player::AutoStoreLoot(uint8 bag, uint8 slot, uint32 loot_id, LootStore cons } } -void Player::StoreLootItem(uint8 lootSlot, Loot* loot) +LootItem* Player::StoreLootItem(uint8 lootSlot, Loot* loot, InventoryResult& msg) { QuestItem* qitem = nullptr; QuestItem* ffaitem = nullptr; QuestItem* conditem = nullptr; - LootItem* item = loot->LootItemInSlot(lootSlot, this, &qitem, &ffaitem, &conditem); + msg = EQUIP_ERR_OK; + LootItem* item = loot->LootItemInSlot(lootSlot, this, &qitem, &ffaitem, &conditem); if (!item || item->is_looted) { SendEquipError(EQUIP_ERR_ALREADY_LOOTED, nullptr, nullptr); - return; + return nullptr; } // Xinef: exploit protection, dont allow to loot normal items if player is not master loot and not below loot threshold @@ -13270,31 +13271,31 @@ void Player::StoreLootItem(uint8 lootSlot, Loot* loot) if (!qitem && !ffaitem && !conditem) { SendLootRelease(GetLootGUID()); - return; + return nullptr; } if (!item->AllowedForPlayer(this, loot->sourceWorldObjectGUID)) { SendLootRelease(GetLootGUID()); - return; + return nullptr; } // questitems use the blocked field for other purposes if (!qitem && item->is_blocked) { SendLootRelease(GetLootGUID()); - return; + return nullptr; } // xinef: dont allow protected item to be looted by someone else if (item->rollWinnerGUID && item->rollWinnerGUID != GetGUID()) { SendLootRelease(GetLootGUID()); - return; + return nullptr; } ItemPosCountVec dest; - InventoryResult msg = CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, item->itemid, item->count); + msg = CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, item->itemid, item->count); if (msg == EQUIP_ERR_OK) { AllowedLooterSet looters = item->GetAllowedLooters(); @@ -13342,7 +13343,11 @@ void Player::StoreLootItem(uint8 lootSlot, Loot* loot) sScriptMgr->OnLootItem(this, newitem, item->count, this->GetLootGUID()); } else + { SendEquipError(msg, nullptr, nullptr, item->itemid); + } + + return item; } uint32 Player::CalculateTalentsPoints() const diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index b50471700..f2d7907b7 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1280,7 +1280,7 @@ public: bool StoreNewItemInBestSlots(uint32 item_id, uint32 item_count); void AutoStoreLoot(uint8 bag, uint8 slot, uint32 loot_id, LootStore const& store, bool broadcast = false); void AutoStoreLoot(uint32 loot_id, LootStore const& store, bool broadcast = false) { AutoStoreLoot(NULL_BAG, NULL_SLOT, loot_id, store, broadcast); } - void StoreLootItem(uint8 lootSlot, Loot* loot); + LootItem* StoreLootItem(uint8 lootSlot, Loot* loot, InventoryResult& msg); void UpdateLootAchievements(LootItem* item, Loot* loot); void UpdateTitansGrip(); diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp index 41044a07c..d28613080 100644 --- a/src/server/game/Handlers/LootHandler.cpp +++ b/src/server/game/Handlers/LootHandler.cpp @@ -93,7 +93,16 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket& recvData) loot = &creature->loot; } - player->StoreLootItem(lootSlot, loot); + InventoryResult msg; + LootItem* lootItem = player->StoreLootItem(lootSlot, loot, msg); + if (msg != EQUIP_ERR_OK && lguid.IsItem() && loot->loot_type != LOOT_CORPSE) + { + lootItem->is_looted = true; + loot->NotifyItemRemoved(lootItem->itemIndex); + loot->unlootedCount--; + + player->SendItemRetrievalMail(lootItem->itemid, lootItem->count); + } // If player is removing the last LootItem, delete the empty container. if (loot->isLooted() && lguid.IsItem()) diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 6e5d25669..c01d46c98 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -627,7 +627,10 @@ void Loot::FillNotNormalLootFor(Player* player) if (!item->is_looted && item->freeforall && item->AllowedForPlayer(player, sourceWorldObjectGUID)) if (ItemTemplate const* proto = sObjectMgr->GetItemTemplate(item->itemid)) if (proto->IsCurrencyToken()) - player->StoreLootItem(i, this); + { + InventoryResult msg; + player->StoreLootItem(i, this, msg); + } } } From 00570aac3d1bf3717d89c2790e8fe8902d032606 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Tue, 27 Dec 2022 23:48:52 -0300 Subject: [PATCH 04/32] fix(DB/GameObject): Add rope lines in Scryer's Tier library (#14248) --- .../rev_1671239130922024100.sql | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1671239130922024100.sql diff --git a/data/sql/updates/pending_db_world/rev_1671239130922024100.sql b/data/sql/updates/pending_db_world/rev_1671239130922024100.sql new file mode 100644 index 000000000..b9dce31fc --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1671239130922024100.sql @@ -0,0 +1,23 @@ +-- +SET @OGUID := 50675; + +DELETE FROM `gameobject` WHERE `id` IN (178764, 178765) AND `ZoneId`=3703 AND `guid` BETWEEN @OGUID+0 AND @OGUID+47; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) VALUES +(@OGUID+0 , 178764, 530, 3703, 3703, 1, 1, -2271.068603515625, 5565.81103515625, 67.00568389892578125, 2.792518377304077148, 0, 0, 0.984807014465332031, 0.173652306199073791, 120, 255, 1, 46902), +(@OGUID+1 , 178764, 530, 3703, 3703, 1, 1, -2267.534912109375, 5573.65673828125, 67.00290679931640625, 2.740161895751953125, 0, 0, 0.979924201965332031, 0.199370384216308593, 120, 255, 1, 46902), +(@OGUID+2 , 178765, 530, 3703, 3703, 1, 1, -2269.834228515625, 5568.56982421875, 67.004913330078125, 0, 0, 0, 0, 1, 120, 255, 1, 46902), +(@OGUID+3 , 178764, 530, 3703, 3703, 1, 1, -2272.033203125, 5563.20556640625, 67.00420379638671875, 2.827429771423339843, 0, 0, 0.987688064575195312, 0.156436234712600708, 120, 255, 1, 46902), +(@OGUID+4 , 178764, 530, 3703, 3703, 1, 1, -2264.985107421875, 5572.4501953125, 67.0045166015625, 1.169368624687194824, 0, 0, 0.551936149597167968, 0.833886384963989257, 120, 255, 1, 46902), +(@OGUID+5 , 178764, 530, 3703, 3703, 1, 1, -2268.71142578125, 5571.01953125, 67.00385284423828125, 2.740161895751953125, 0, 0, 0.979924201965332031, 0.199370384216308593, 120, 255, 1, 46902), +(@OGUID+6 , 178764, 530, 3703, 3703, 1, 1, -2272.909423828125, 5560.52978515625, 67.00284576416015625, 4.310965538024902343, 0, 0, -0.83388519287109375, 0.55193793773651123, 120, 255, 1, 46902), +(@OGUID+7 , 178764, 530, 3703, 3703, 1, 1, -2270.34814453125, 5559.4482421875, 67.005462646484375, 4.310965538024902343, 0, 0, -0.83388519287109375, 0.55193793773651123, 120, 255, 1, 46902), +(@OGUID+8 , 178764, 530, 3703, 3703, 1, 1, -2262.407470703125, 5571.27783203125, 67.0049285888671875, 1.169368624687194824, 0, 0, 0.551936149597167968, 0.833886384963989257, 120, 255, 1, 46902), +(@OGUID+9 , 178765, 530, 3703, 3703, 1, 1, -2260.2587890625, 5561.38916015625, 67.01305389404296875, 0, 0, 0, 0, 1, 120, 255, 1, 46902), +(@OGUID+10, 178764, 530, 3703, 3703, 1, 1, -2265.07421875, 5557.19189453125, 67.00565338134765625, 4.310965538024902343, 0, 0, -0.83388519287109375, 0.55193793773651123, 120, 255, 1, 46902), +(@OGUID+11, 178764, 530, 3703, 3703, 1, 1, -2257.212158203125, 5569.00244140625, 67.00687408447265625, 1.169368624687194824, 0, 0, 0.551936149597167968, 0.833886384963989257, 120, 255, 1, 46902), +(@OGUID+12, 178764, 530, 3703, 3703, 1, 1, -2259.40283203125, 5563.6630859375, 67.01308441162109375, 5.89921426773071289, 0, 0, -0.19080829620361328, 0.981627285480499267, 120, 255, 1, 46902), +(@OGUID+13, 178764, 530, 3703, 3703, 1, 1, -2259.855712890625, 5570.13671875, 67.0053253173828125, 1.169368624687194824, 0, 0, 0.551936149597167968, 0.833886384963989257, 120, 255, 1, 46902), +(@OGUID+14, 178764, 530, 3703, 3703, 1, 1, -2261.313720703125, 5558.73876953125, 67.00978851318359375, 5.89921426773071289, 0, 0, -0.19080829620361328, 0.981627285480499267, 120, 255, 1, 46902), +(@OGUID+15, 178764, 530, 3703, 3703, 1, 1, -2267.728271484375, 5558.32666015625, 67.00565338134765625, 4.310965538024902343, 0, 0, -0.83388519287109375, 0.55193793773651123, 120, 255, 1, 46902), +(@OGUID+16, 178764, 530, 3703, 3703, 1, 1, -2262.440673828125, 5556.1025390625, 67.0064697265625, 5.89921426773071289, 0, 0, -0.19080829620361328, 0.981627285480499267, 120, 255, 1, 46902), +(@OGUID+17, 178764, 530, 3703, 3703, 1, 1, -2258.307861328125, 5566.337890625, 67.00997161865234375, 5.89921426773071289, 0, 0, -0.19080829620361328, 0.981627285480499267, 120, 255, 1, 46902); From 2a90a72839fa00881db2eab21e91ac0b36f8819a Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 28 Dec 2022 02:51:06 +0000 Subject: [PATCH 05/32] chore(DB): import pending files Referenced commit(s): 00570aac3d1bf3717d89c2790e8fe8902d032606 --- .../rev_1671239130922024100.sql => db_world/2022_12_28_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1671239130922024100.sql => db_world/2022_12_28_00.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1671239130922024100.sql b/data/sql/updates/db_world/2022_12_28_00.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1671239130922024100.sql rename to data/sql/updates/db_world/2022_12_28_00.sql index b9dce31fc..204c826f4 100644 --- a/data/sql/updates/pending_db_world/rev_1671239130922024100.sql +++ b/data/sql/updates/db_world/2022_12_28_00.sql @@ -1,3 +1,4 @@ +-- DB update 2022_12_27_01 -> 2022_12_28_00 -- SET @OGUID := 50675; From c111cb168b39b03335a2f090afa9ecc26f93d2eb Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Tue, 27 Dec 2022 23:51:25 -0300 Subject: [PATCH 06/32] fix(DB/Creature): Properly handle Sunspring Villager death state (#14356) --- data/sql/updates/pending_db_world/rev_1671837086326258700.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1671837086326258700.sql diff --git a/data/sql/updates/pending_db_world/rev_1671837086326258700.sql b/data/sql/updates/pending_db_world/rev_1671837086326258700.sql new file mode 100644 index 000000000..9a970d891 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1671837086326258700.sql @@ -0,0 +1,4 @@ +-- Sniffed +UPDATE `creature_template` SET `type_flags`=`type_flags`|134217856 WHERE (`entry` = 18240); +UPDATE `creature_template_addon` SET `bytes1` = 0, `bytes2` = 1, `auras` = '31261' WHERE (`entry` = 18240); +DELETE FROM `creature_addon` WHERE `guid` IN (84446,84447,84448,84449,84450,84451,84452,84453,84454,84455,84456,84457,84458,84460,84461,84462,84463,84464,84465,84466,84467,84468,84469,84470,84471,84472,84473,84474,84475,84476,84477,84478,84479,84480,84481); From 50cc0337d22784756dcd706202e38e607ae68b19 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 28 Dec 2022 02:53:33 +0000 Subject: [PATCH 07/32] chore(DB): import pending files Referenced commit(s): c111cb168b39b03335a2f090afa9ecc26f93d2eb --- .../rev_1671837086326258700.sql => db_world/2022_12_28_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1671837086326258700.sql => db_world/2022_12_28_01.sql} (91%) diff --git a/data/sql/updates/pending_db_world/rev_1671837086326258700.sql b/data/sql/updates/db_world/2022_12_28_01.sql similarity index 91% rename from data/sql/updates/pending_db_world/rev_1671837086326258700.sql rename to data/sql/updates/db_world/2022_12_28_01.sql index 9a970d891..30358c176 100644 --- a/data/sql/updates/pending_db_world/rev_1671837086326258700.sql +++ b/data/sql/updates/db_world/2022_12_28_01.sql @@ -1,3 +1,4 @@ +-- DB update 2022_12_28_00 -> 2022_12_28_01 -- Sniffed UPDATE `creature_template` SET `type_flags`=`type_flags`|134217856 WHERE (`entry` = 18240); UPDATE `creature_template_addon` SET `bytes1` = 0, `bytes2` = 1, `auras` = '31261' WHERE (`entry` = 18240); From 47fc36ff36b7275d05cd8e880990d91a5a9f4af5 Mon Sep 17 00:00:00 2001 From: Federico Coronati <56729512+FeedehC@users.noreply.github.com> Date: Wed, 28 Dec 2022 12:01:21 -0300 Subject: [PATCH 08/32] fix(DB/quest): quest 456 translation (#13674) --- data/sql/updates/pending_db_world/quest_456_translate.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/quest_456_translate.sql diff --git a/data/sql/updates/pending_db_world/quest_456_translate.sql b/data/sql/updates/pending_db_world/quest_456_translate.sql new file mode 100644 index 000000000..82167e14b --- /dev/null +++ b/data/sql/updates/pending_db_world/quest_456_translate.sql @@ -0,0 +1,4 @@ +-- Fix translations of quest 456 to say 4 kills instead of 3 +UPDATE `quest_template_locale` SET `Objectives`='Mata a 4 sables de la noche y 4 jabalíes cardo jóvenes.' WHERE `ID`=456 AND `locale` IN ('esES', 'esMX'); +UPDATE `quest_template_locale` SET `Objectives`='Tuez 4 Jeunes sabres-de-nuit et 4 Jeunes sangliers des chardons.' WHERE `ID`=456 AND `locale`='frFR'; +UPDATE `quest_template_locale` SET `Objectives`='Tötet 4 junge Nachtsäbler sowie 4 junge Disteleber.' WHERE `ID`=456 AND `locale`='deDE'; From b874760efee9a1f31a121effb1a56788a7d82e34 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 28 Dec 2022 15:03:24 +0000 Subject: [PATCH 09/32] chore(DB): import pending files Referenced commit(s): 47fc36ff36b7275d05cd8e880990d91a5a9f4af5 --- .../quest_456_translate.sql => db_world/2022_12_28_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/quest_456_translate.sql => db_world/2022_12_28_02.sql} (92%) diff --git a/data/sql/updates/pending_db_world/quest_456_translate.sql b/data/sql/updates/db_world/2022_12_28_02.sql similarity index 92% rename from data/sql/updates/pending_db_world/quest_456_translate.sql rename to data/sql/updates/db_world/2022_12_28_02.sql index 82167e14b..705f1c4dc 100644 --- a/data/sql/updates/pending_db_world/quest_456_translate.sql +++ b/data/sql/updates/db_world/2022_12_28_02.sql @@ -1,3 +1,4 @@ +-- DB update 2022_12_28_01 -> 2022_12_28_02 -- Fix translations of quest 456 to say 4 kills instead of 3 UPDATE `quest_template_locale` SET `Objectives`='Mata a 4 sables de la noche y 4 jabalíes cardo jóvenes.' WHERE `ID`=456 AND `locale` IN ('esES', 'esMX'); UPDATE `quest_template_locale` SET `Objectives`='Tuez 4 Jeunes sabres-de-nuit et 4 Jeunes sangliers des chardons.' WHERE `ID`=456 AND `locale`='frFR'; From 0a4051c4b27efd3978fd32fca244a5b9cafa469f Mon Sep 17 00:00:00 2001 From: Angelo Venturini Date: Wed, 28 Dec 2022 14:32:55 -0300 Subject: [PATCH 10/32] fix(Core/Handlers): Crash (#14390) --- src/server/game/Handlers/MiscHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 33d6a5b85..a1275b3d1 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -851,7 +851,7 @@ void WorldSession::HandleUpdateAccountData(WorldPacket& recv_data) LOG_DEBUG("network", "UAD: type {}, time {}, decompressedSize {}", type, timestamp, decompressedSize); - if (type > NUM_ACCOUNT_DATA_TYPES) + if (type >= NUM_ACCOUNT_DATA_TYPES) return; if (decompressedSize == 0) // erase From 2850052f3e024b958295b1cc8a73f3ed9b7d70d9 Mon Sep 17 00:00:00 2001 From: M'Dic Date: Wed, 28 Dec 2022 13:05:46 -0500 Subject: [PATCH 11/32] Add (core): SendTeleportPacket helper (#14389) * Add (core): SendTeleportPacket helper add helper to SendTeleportPacket * sin hard --- src/server/game/Entities/Unit/Unit.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 28d8b1485..3d33d2b32 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -20079,7 +20079,10 @@ void Unit::SendTeleportPacket(Position& pos) Position oldPos = { GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation() }; if (GetTypeId() == TYPEID_UNIT) Relocate(&pos); - + if (GetTypeId() == TYPEID_PLAYER) + { + ToPlayer()->SetCanTeleport(true); + } WorldPacket data2(MSG_MOVE_TELEPORT, 38); data2 << GetPackGUID(); BuildMovementPacket(&data2); From 97b5906124dca7826beb4ae976c1e0b97e076b5a Mon Sep 17 00:00:00 2001 From: Axel Cocat Date: Wed, 28 Dec 2022 23:22:28 +0100 Subject: [PATCH 12/32] feat(Core/Player): delete character cache in Player::DeleteFromDB() (#14388) --- src/server/game/Entities/Player/Player.cpp | 8 ++++++++ src/server/game/Handlers/CharacterHandler.cpp | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 3522577ab..005a5bcd6 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -4240,8 +4240,16 @@ void Player::DeleteFromDB(ObjectGuid::LowType lowGuid, uint32 accountId, bool up return; } + if (CharacterCacheEntry const* cache = sCharacterCache->GetCharacterCacheByGuid(playerGuid)) + { + std::string name = cache->Name; + sCharacterCache->DeleteCharacterCacheEntry(playerGuid, name); + } + if (updateRealmChars) + { sWorld->UpdateRealmCharCount(accountId); + } } /** diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 0f3cd2b29..06ab7a3e4 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -658,7 +658,6 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket& recvData) sCalendarMgr->RemoveAllPlayerEventsAndInvites(guid); Player::DeleteFromDB(guid.GetCounter(), GetAccountId(), true, false); - sCharacterCache->DeleteCharacterCacheEntry(guid, name); SendCharDelete(CHAR_DELETE_SUCCESS); } From f8db9f5beb45f6097e55bea07902a9251ba862f7 Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Thu, 29 Dec 2022 06:08:34 -0500 Subject: [PATCH 13/32] fix(DB/Creature): Remove Mathrengyl Bearwalker's Left Right Claw. (#13846) --- data/sql/updates/pending_db_world/bearwalker.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 data/sql/updates/pending_db_world/bearwalker.sql diff --git a/data/sql/updates/pending_db_world/bearwalker.sql b/data/sql/updates/pending_db_world/bearwalker.sql new file mode 100644 index 000000000..2929d2a45 --- /dev/null +++ b/data/sql/updates/pending_db_world/bearwalker.sql @@ -0,0 +1 @@ +UPDATE `creature_equip_template` SET `ItemID2`=0 WHERE `CreatureID`=4217 AND `ID`=1; From a101f161240b90776f3f42f55fb9f6cdc18cceea Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Thu, 29 Dec 2022 12:09:30 +0100 Subject: [PATCH 14/32] =?UTF-8?q?fix(Core/Config):=20Set=20default=20corps?= =?UTF-8?q?e=20decay=20for=20normal=20creatures=20to=205=20=E2=80=A6=20(#1?= =?UTF-8?q?4039)?= 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 74889c9e6..b18e57f72 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: 60 - (1 Minute, Corpse.Decay.NORMAL) +# Default: 300 - (5 Minutes, 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 = 60 +Corpse.Decay.NORMAL = 300 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: 0.5 +# Default: 1.0 -Rate.Corpse.Decay.Looted = 0.5 +Rate.Corpse.Decay.Looted = 1.0 # # Rate.Creature.Normal.Damage diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 357f4da28..8f150857b 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", 0.5f); + rate_values[RATE_CORPSE_DECAY_LOOTED] = sConfigMgr->GetOption("Rate.Corpse.Decay.Looted", 1.0f); 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", 60); + m_int_configs[CONFIG_CORPSE_DECAY_NORMAL] = sConfigMgr->GetOption("Corpse.Decay.NORMAL", 300); 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 3da3dada36f1bf55d417238ca99aada6265f9fc9 Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Thu, 29 Dec 2022 06:10:34 -0500 Subject: [PATCH 15/32] fix(DB/Gossip): Add gossip text, sub-menu, and correct condition for Raene Wolfrunner. (#14106) --- data/sql/updates/pending_db_world/dartols-rod.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 data/sql/updates/pending_db_world/dartols-rod.sql diff --git a/data/sql/updates/pending_db_world/dartols-rod.sql b/data/sql/updates/pending_db_world/dartols-rod.sql new file mode 100644 index 000000000..7239bafe0 --- /dev/null +++ b/data/sql/updates/pending_db_world/dartols-rod.sql @@ -0,0 +1,11 @@ +DELETE FROM `gossip_menu` WHERE `MenuID` = 5501; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES (5501, 6554); + +UPDATE `gossip_menu_option` SET `ActionMenuID` = 5501 WHERE `MenuID` = 5502; + +UPDATE `conditions` SET `ConditionValue1` = 1030, `Comment` = 'Only show gossip option if player has completed quest 1030' WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 5502 AND `ConditionTypeOrReference` = 8; + +UPDATE `npc_text` SET `ID` = 6554 WHERE `ID` = 50001; + +DELETE FROM `smart_scripts` WHERE `entryorguid` = 3691 AND `id`= 7; +UPDATE `smart_scripts` SET `link` = 0 WHERE `entryorguid` = 3691 AND `id` = 6; From cad4e7012942248f2554165ce17eb730178ee8aa Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Thu, 29 Dec 2022 08:11:03 -0300 Subject: [PATCH 16/32] fix(DB/SAI): Corporal Ironridge (#14240) --- .../updates/pending_db_world/rev_1671211355184764600.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1671211355184764600.sql diff --git a/data/sql/updates/pending_db_world/rev_1671211355184764600.sql b/data/sql/updates/pending_db_world/rev_1671211355184764600.sql new file mode 100644 index 000000000..1164b8404 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1671211355184764600.sql @@ -0,0 +1,7 @@ +-- +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|2 WHERE (`entry` IN (19310, 19409, 21133)); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 21133; +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 21133) AND (`source_type` = 0) AND (`id` IN (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 +(21133, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 3, 0, 16387, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Corporal Ironridge - On Respawn - Morph To Model 16387 - Woraround for modelid - Gender'); From c861500355ea8ff6ffaaaa6c2a1e1e84a5f7f519 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Thu, 29 Dec 2022 08:12:18 -0300 Subject: [PATCH 17/32] fix(DB/Creature): Change bad id1 from Veil Skith (#14337) --- data/sql/updates/pending_db_world/rev_1671752272097509400.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1671752272097509400.sql diff --git a/data/sql/updates/pending_db_world/rev_1671752272097509400.sql b/data/sql/updates/pending_db_world/rev_1671752272097509400.sql new file mode 100644 index 000000000..6c0a34105 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1671752272097509400.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature` SET `id1`=18453, `equipment_id`=0 WHERE `id1`=18454 AND `guid`=65943; From 3c7b1d2db8b78bf17014b81b0c3694ee141cc800 Mon Sep 17 00:00:00 2001 From: Pyromanihack <82369562+Pyromanihack@users.noreply.github.com> Date: Thu, 29 Dec 2022 12:12:53 +0100 Subject: [PATCH 18/32] fix(DB/smart_scripts): Fix Tapoke "Slim" Jahn's event_flags (#14362) --- data/sql/updates/pending_db_world/MissingDiplomat | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/MissingDiplomat diff --git a/data/sql/updates/pending_db_world/MissingDiplomat b/data/sql/updates/pending_db_world/MissingDiplomat new file mode 100644 index 000000000..14f2f9dda --- /dev/null +++ b/data/sql/updates/pending_db_world/MissingDiplomat @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `event_flags`=`event_flags`&~512 WHERE `entryorguid`=4962; From 50582832c1a0b56290b7a66417bc57ab2c5f751a Mon Sep 17 00:00:00 2001 From: Synful-Syn Date: Thu, 29 Dec 2022 06:13:18 -0500 Subject: [PATCH 19/32] fix(DB/Loot): Remove `Primed Mold Key` from `Coilfang Emissary` (#14370) --- data/sql/updates/pending_db_world/remove-mold-key.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 data/sql/updates/pending_db_world/remove-mold-key.sql diff --git a/data/sql/updates/pending_db_world/remove-mold-key.sql b/data/sql/updates/pending_db_world/remove-mold-key.sql new file mode 100644 index 000000000..cfabb5e96 --- /dev/null +++ b/data/sql/updates/pending_db_world/remove-mold-key.sql @@ -0,0 +1 @@ +DELETE FROM `creature_loot_template` WHERE `Entry` = 18681 AND `Item` = 31245; From b62a4228009fd46650f588b8fe9a6c1fd609844b Mon Sep 17 00:00:00 2001 From: Pyromanihack <82369562+Pyromanihack@users.noreply.github.com> Date: Thu, 29 Dec 2022 12:13:55 +0100 Subject: [PATCH 20/32] fix(DB/Loot): Make Qiraji Scarab not skinnable (#14376) --- data/sql/updates/pending_db_world/scarab.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/scarab.sql diff --git a/data/sql/updates/pending_db_world/scarab.sql b/data/sql/updates/pending_db_world/scarab.sql new file mode 100644 index 000000000..59f345244 --- /dev/null +++ b/data/sql/updates/pending_db_world/scarab.sql @@ -0,0 +1,2 @@ + +UPDATE `creature_template` SET `skinloot` = 0 WHERE (`entry` = 15316); From 64be224683637dfe287f0dc48c5c8ae43faf0682 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Thu, 29 Dec 2022 11:15:59 +0000 Subject: [PATCH 21/32] chore(DB): import pending files Referenced commit(s): b62a4228009fd46650f588b8fe9a6c1fd609844b --- .../bearwalker.sql => db_world/2022_12_29_00.sql} | 1 + .../dartols-rod.sql => db_world/2022_12_29_01.sql} | 1 + .../remove-mold-key.sql => db_world/2022_12_29_02.sql} | 1 + .../rev_1671211355184764600.sql => db_world/2022_12_29_03.sql} | 1 + .../rev_1671752272097509400.sql => db_world/2022_12_29_04.sql} | 1 + .../{pending_db_world/scarab.sql => db_world/2022_12_29_05.sql} | 1 + 6 files changed, 6 insertions(+) rename data/sql/updates/{pending_db_world/bearwalker.sql => db_world/2022_12_29_00.sql} (65%) rename data/sql/updates/{pending_db_world/dartols-rod.sql => db_world/2022_12_29_01.sql} (93%) rename data/sql/updates/{pending_db_world/remove-mold-key.sql => db_world/2022_12_29_02.sql} (64%) rename data/sql/updates/{pending_db_world/rev_1671211355184764600.sql => db_world/2022_12_29_03.sql} (95%) rename data/sql/updates/{pending_db_world/rev_1671752272097509400.sql => db_world/2022_12_29_04.sql} (67%) rename data/sql/updates/{pending_db_world/scarab.sql => db_world/2022_12_29_05.sql} (62%) diff --git a/data/sql/updates/pending_db_world/bearwalker.sql b/data/sql/updates/db_world/2022_12_29_00.sql similarity index 65% rename from data/sql/updates/pending_db_world/bearwalker.sql rename to data/sql/updates/db_world/2022_12_29_00.sql index 2929d2a45..e3f1919d9 100644 --- a/data/sql/updates/pending_db_world/bearwalker.sql +++ b/data/sql/updates/db_world/2022_12_29_00.sql @@ -1 +1,2 @@ +-- DB update 2022_12_28_02 -> 2022_12_29_00 UPDATE `creature_equip_template` SET `ItemID2`=0 WHERE `CreatureID`=4217 AND `ID`=1; diff --git a/data/sql/updates/pending_db_world/dartols-rod.sql b/data/sql/updates/db_world/2022_12_29_01.sql similarity index 93% rename from data/sql/updates/pending_db_world/dartols-rod.sql rename to data/sql/updates/db_world/2022_12_29_01.sql index 7239bafe0..55510e4d3 100644 --- a/data/sql/updates/pending_db_world/dartols-rod.sql +++ b/data/sql/updates/db_world/2022_12_29_01.sql @@ -1,3 +1,4 @@ +-- DB update 2022_12_29_00 -> 2022_12_29_01 DELETE FROM `gossip_menu` WHERE `MenuID` = 5501; INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES (5501, 6554); diff --git a/data/sql/updates/pending_db_world/remove-mold-key.sql b/data/sql/updates/db_world/2022_12_29_02.sql similarity index 64% rename from data/sql/updates/pending_db_world/remove-mold-key.sql rename to data/sql/updates/db_world/2022_12_29_02.sql index cfabb5e96..cbfd623b6 100644 --- a/data/sql/updates/pending_db_world/remove-mold-key.sql +++ b/data/sql/updates/db_world/2022_12_29_02.sql @@ -1 +1,2 @@ +-- DB update 2022_12_29_01 -> 2022_12_29_02 DELETE FROM `creature_loot_template` WHERE `Entry` = 18681 AND `Item` = 31245; diff --git a/data/sql/updates/pending_db_world/rev_1671211355184764600.sql b/data/sql/updates/db_world/2022_12_29_03.sql similarity index 95% rename from data/sql/updates/pending_db_world/rev_1671211355184764600.sql rename to data/sql/updates/db_world/2022_12_29_03.sql index 1164b8404..4102d3001 100644 --- a/data/sql/updates/pending_db_world/rev_1671211355184764600.sql +++ b/data/sql/updates/db_world/2022_12_29_03.sql @@ -1,3 +1,4 @@ +-- DB update 2022_12_29_02 -> 2022_12_29_03 -- UPDATE `creature_template` SET `flags_extra`=`flags_extra`|2 WHERE (`entry` IN (19310, 19409, 21133)); diff --git a/data/sql/updates/pending_db_world/rev_1671752272097509400.sql b/data/sql/updates/db_world/2022_12_29_04.sql similarity index 67% rename from data/sql/updates/pending_db_world/rev_1671752272097509400.sql rename to data/sql/updates/db_world/2022_12_29_04.sql index 6c0a34105..68757cc59 100644 --- a/data/sql/updates/pending_db_world/rev_1671752272097509400.sql +++ b/data/sql/updates/db_world/2022_12_29_04.sql @@ -1,2 +1,3 @@ +-- DB update 2022_12_29_03 -> 2022_12_29_04 -- UPDATE `creature` SET `id1`=18453, `equipment_id`=0 WHERE `id1`=18454 AND `guid`=65943; diff --git a/data/sql/updates/pending_db_world/scarab.sql b/data/sql/updates/db_world/2022_12_29_05.sql similarity index 62% rename from data/sql/updates/pending_db_world/scarab.sql rename to data/sql/updates/db_world/2022_12_29_05.sql index 59f345244..e2385c0b7 100644 --- a/data/sql/updates/pending_db_world/scarab.sql +++ b/data/sql/updates/db_world/2022_12_29_05.sql @@ -1,2 +1,3 @@ +-- DB update 2022_12_29_04 -> 2022_12_29_05 UPDATE `creature_template` SET `skinloot` = 0 WHERE (`entry` = 15316); From a104f397d9fefcd26cc0cfad8b5d7a671dbb24c5 Mon Sep 17 00:00:00 2001 From: Axel Cocat Date: Thu, 29 Dec 2022 13:41:47 +0100 Subject: [PATCH 22/32] feat(Core): move achievement manager and criteria progress getters to public (#14387) --- src/server/game/Achievements/AchievementMgr.h | 3 ++- src/server/game/Entities/Player/Player.h | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h index bc9c0c7dd..39e2dd6a9 100644 --- a/src/server/game/Achievements/AchievementMgr.h +++ b/src/server/game/Achievements/AchievementMgr.h @@ -299,11 +299,12 @@ public: void RemoveTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry); // used for quest and scripted timed achievements void RemoveCriteriaProgress(AchievementCriteriaEntry const* entry); + CriteriaProgress* GetCriteriaProgress(AchievementCriteriaEntry const* entry); + private: enum ProgressType { PROGRESS_SET, PROGRESS_ACCUMULATE, PROGRESS_HIGHEST, PROGRESS_RESET }; void SendAchievementEarned(AchievementEntry const* achievement) const; void SendCriteriaUpdate(AchievementCriteriaEntry const* entry, CriteriaProgress const* progress, uint32 timeElapsed, bool timedCompleted) const; - CriteriaProgress* GetCriteriaProgress(AchievementCriteriaEntry const* entry); void SetCriteriaProgress(AchievementCriteriaEntry const* entry, uint32 changeValue, ProgressType ptype = PROGRESS_SET); void CompletedCriteriaFor(AchievementEntry const* achievement); bool IsCompletedCriteria(AchievementCriteriaEntry const* achievementCriteria, AchievementEntry const* achievement); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index f2d7907b7..71aac67c1 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2482,6 +2482,7 @@ public: void StartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry, uint32 timeLost = 0); void RemoveTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry); void CompletedAchievement(AchievementEntry const* entry); + [[nodiscard]] AchievementMgr* GetAchievementMgr() const { return m_achievementMgr; } [[nodiscard]] bool HasTitle(uint32 bitIndex) const; bool HasTitle(CharTitlesEntry const* title) const { return HasTitle(title->bit_index); } @@ -2852,8 +2853,6 @@ public: bool m_needZoneUpdate; - [[nodiscard]] AchievementMgr* GetAchievementMgr() const { return m_achievementMgr; } - private: // internal common parts for CanStore/StoreItem functions InventoryResult CanStoreItem_InSpecificSlot(uint8 bag, uint8 slot, ItemPosCountVec& dest, ItemTemplate const* pProto, uint32& count, bool swap, Item* pSrcItem) const; From 7fa0aeeca7418e5b4fc75e4d895189008c3d7b5e Mon Sep 17 00:00:00 2001 From: Axel Cocat Date: Thu, 29 Dec 2022 14:45:49 +0100 Subject: [PATCH 23/32] feat(Core/Group): add GetGroupType() (#14411) --- src/server/game/Groups/Group.cpp | 5 +++++ src/server/game/Groups/Group.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 7014c1506..5e7a1e7c8 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -2228,6 +2228,11 @@ bool Group::IsCreated() const return GetMembersCount() > 0; } +GroupType Group::GetGroupType() const +{ + return m_groupType; +} + ObjectGuid Group::GetLeaderGUID() const { return m_leaderGuid; diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h index ad7c2ddda..5c387274e 100644 --- a/src/server/game/Groups/Group.h +++ b/src/server/game/Groups/Group.h @@ -214,6 +214,7 @@ public: bool isBFGroup() const; bool isBGGroup() const; bool IsCreated() const; + GroupType GetGroupType() const; ObjectGuid GetLeaderGUID() const; Player* GetLeader(); ObjectGuid GetGUID() const; From 1a1897f89b099302d65b948a1649544370b837ab Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Thu, 29 Dec 2022 11:50:00 -0300 Subject: [PATCH 24/32] fix(DB): Correct missing file extension (#14412) --- .../pending_db_world/{MissingDiplomat => MissingDiplomat.sql} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename data/sql/updates/pending_db_world/{MissingDiplomat => MissingDiplomat.sql} (61%) diff --git a/data/sql/updates/pending_db_world/MissingDiplomat b/data/sql/updates/pending_db_world/MissingDiplomat.sql similarity index 61% rename from data/sql/updates/pending_db_world/MissingDiplomat rename to data/sql/updates/pending_db_world/MissingDiplomat.sql index 14f2f9dda..e706d5f3e 100644 --- a/data/sql/updates/pending_db_world/MissingDiplomat +++ b/data/sql/updates/pending_db_world/MissingDiplomat.sql @@ -1,2 +1,2 @@ -- -UPDATE `smart_scripts` SET `event_flags`=`event_flags`&~512 WHERE `entryorguid`=4962; +UPDATE `smart_scripts` SET `event_flags`=`event_flags`&~512 WHERE `entryorguid`=4962 AND `source_type`=0; From 68d6599ca80e25bd1413c7ec074c3d8676f607b0 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Thu, 29 Dec 2022 14:52:03 +0000 Subject: [PATCH 25/32] chore(DB): import pending files Referenced commit(s): 1a1897f89b099302d65b948a1649544370b837ab --- .../MissingDiplomat.sql => db_world/2022_12_29_06.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/MissingDiplomat.sql => db_world/2022_12_29_06.sql} (71%) diff --git a/data/sql/updates/pending_db_world/MissingDiplomat.sql b/data/sql/updates/db_world/2022_12_29_06.sql similarity index 71% rename from data/sql/updates/pending_db_world/MissingDiplomat.sql rename to data/sql/updates/db_world/2022_12_29_06.sql index e706d5f3e..80858f16d 100644 --- a/data/sql/updates/pending_db_world/MissingDiplomat.sql +++ b/data/sql/updates/db_world/2022_12_29_06.sql @@ -1,2 +1,3 @@ +-- DB update 2022_12_29_05 -> 2022_12_29_06 -- UPDATE `smart_scripts` SET `event_flags`=`event_flags`&~512 WHERE `entryorguid`=4962 AND `source_type`=0; From dcf73d5edfb587f6e6b5afa709e1cc25c2c2a5ec Mon Sep 17 00:00:00 2001 From: Samsequel <20357406+Samsequel@users.noreply.github.com> Date: Thu, 29 Dec 2022 18:34:21 +0100 Subject: [PATCH 26/32] fix(DB/SmartScript): Boulderfirst Mage / Warrior smartscript (#14413) --- data/sql/updates/pending_db_world/bouldermagic.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 data/sql/updates/pending_db_world/bouldermagic.sql diff --git a/data/sql/updates/pending_db_world/bouldermagic.sql b/data/sql/updates/pending_db_world/bouldermagic.sql new file mode 100644 index 000000000..2e38a2e83 --- /dev/null +++ b/data/sql/updates/pending_db_world/bouldermagic.sql @@ -0,0 +1,13 @@ +-- +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 17136; +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 17136) AND (`source_type` = 0) AND (`id` IN (0, 1)); +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 +(17136, 0, 0, 0, 11, 0, 100, 1, 0, 0, 0, 0, 0, 11, 30798, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Boulderfist Warrior - On Respawn - Cast \'Dual Wield\' (No Repeat)'), +(17136, 0, 1, 0, 9, 0, 100, 0, 8, 25, 18000, 24000, 0, 11, 31994, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Boulderfist Warrior - Within 8-25 Range - Cast \'Shoulder Charge\''); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 17137; +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 17137) AND (`source_type` = 0) AND (`id` IN (0, 1, 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 +(17137, 0, 0, 0, 16, 0, 100, 0, 6742, 30, 15000, 45000, 0, 11, 6742, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Boulderfist Mage - On Friendly Unit Missing Buff \'Bloodlust\' - Cast \'Bloodlust\''), +(17137, 0, 1, 0, 0, 0, 100, 0, 5000, 9000, 9000, 12000, 0, 11, 20795, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Boulderfist Mage - In Combat - Cast \'Fire Blast\''), +(17137, 0, 2, 0, 0, 0, 100, 0, 5000, 9000, 3800, 5200, 0, 11, 9672, 0, 256, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Boulderfist Mage - In Combat - Cast \'Frostbolt\''); From 7dbb4fc11666587f6bf7acee2a1d0eff449e56ae Mon Sep 17 00:00:00 2001 From: Samsequel <20357406+Samsequel@users.noreply.github.com> Date: Thu, 29 Dec 2022 18:34:35 +0100 Subject: [PATCH 27/32] fix(DB/SmartScript): Fey Drake should blink behind target (#14410) --- data/sql/updates/pending_db_world/blinkeythefaydrake.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 data/sql/updates/pending_db_world/blinkeythefaydrake.sql diff --git a/data/sql/updates/pending_db_world/blinkeythefaydrake.sql b/data/sql/updates/pending_db_world/blinkeythefaydrake.sql new file mode 100644 index 000000000..073d438b4 --- /dev/null +++ b/data/sql/updates/pending_db_world/blinkeythefaydrake.sql @@ -0,0 +1 @@ +UPDATE `smart_scripts` SET `target_type`=2 WHERE (`entryorguid` = 20713) AND (`source_type` = 0) AND (`id` IN (1)); From 7984a17b24d04a2d975182a88b1a2d46ac327b77 Mon Sep 17 00:00:00 2001 From: Samsequel <20357406+Samsequel@users.noreply.github.com> Date: Thu, 29 Dec 2022 18:35:23 +0100 Subject: [PATCH 28/32] fix(DB/Quest): 'He Will Walk The Earth' Should have quest rewards (#14406) --- data/sql/updates/pending_db_world/hewillwalktheearth.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 data/sql/updates/pending_db_world/hewillwalktheearth.sql diff --git a/data/sql/updates/pending_db_world/hewillwalktheearth.sql b/data/sql/updates/pending_db_world/hewillwalktheearth.sql new file mode 100644 index 000000000..193cc256d --- /dev/null +++ b/data/sql/updates/pending_db_world/hewillwalktheearth.sql @@ -0,0 +1 @@ +UPDATE `quest_template` SET `RewardChoiceItemID1` = 25574, `RewardChoiceItemQuantity1` = 1, `RewardChoiceItemID2` = 25575, `RewardChoiceItemQuantity2` = 1, `RewardChoiceItemID3` = 25576, `RewardChoiceItemQuantity3` = 1 WHERE (`ID` = 9866); From 4eb915401ad5fbeecc494e11c646ebdc98e1987b Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Thu, 29 Dec 2022 17:37:21 +0000 Subject: [PATCH 29/32] chore(DB): import pending files Referenced commit(s): 7984a17b24d04a2d975182a88b1a2d46ac327b77 --- .../blinkeythefaydrake.sql => db_world/2022_12_29_07.sql} | 1 + .../bouldermagic.sql => db_world/2022_12_29_08.sql} | 1 + .../hewillwalktheearth.sql => db_world/2022_12_29_09.sql} | 1 + 3 files changed, 3 insertions(+) rename data/sql/updates/{pending_db_world/blinkeythefaydrake.sql => db_world/2022_12_29_07.sql} (72%) rename data/sql/updates/{pending_db_world/bouldermagic.sql => db_world/2022_12_29_08.sql} (98%) rename data/sql/updates/{pending_db_world/hewillwalktheearth.sql => db_world/2022_12_29_09.sql} (84%) diff --git a/data/sql/updates/pending_db_world/blinkeythefaydrake.sql b/data/sql/updates/db_world/2022_12_29_07.sql similarity index 72% rename from data/sql/updates/pending_db_world/blinkeythefaydrake.sql rename to data/sql/updates/db_world/2022_12_29_07.sql index 073d438b4..da24b9fcf 100644 --- a/data/sql/updates/pending_db_world/blinkeythefaydrake.sql +++ b/data/sql/updates/db_world/2022_12_29_07.sql @@ -1 +1,2 @@ +-- DB update 2022_12_29_06 -> 2022_12_29_07 UPDATE `smart_scripts` SET `target_type`=2 WHERE (`entryorguid` = 20713) AND (`source_type` = 0) AND (`id` IN (1)); diff --git a/data/sql/updates/pending_db_world/bouldermagic.sql b/data/sql/updates/db_world/2022_12_29_08.sql similarity index 98% rename from data/sql/updates/pending_db_world/bouldermagic.sql rename to data/sql/updates/db_world/2022_12_29_08.sql index 2e38a2e83..bcef6db7c 100644 --- a/data/sql/updates/pending_db_world/bouldermagic.sql +++ b/data/sql/updates/db_world/2022_12_29_08.sql @@ -1,3 +1,4 @@ +-- DB update 2022_12_29_07 -> 2022_12_29_08 -- UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 17136; DELETE FROM `smart_scripts` WHERE (`entryorguid` = 17136) AND (`source_type` = 0) AND (`id` IN (0, 1)); diff --git a/data/sql/updates/pending_db_world/hewillwalktheearth.sql b/data/sql/updates/db_world/2022_12_29_09.sql similarity index 84% rename from data/sql/updates/pending_db_world/hewillwalktheearth.sql rename to data/sql/updates/db_world/2022_12_29_09.sql index 193cc256d..108d02e22 100644 --- a/data/sql/updates/pending_db_world/hewillwalktheearth.sql +++ b/data/sql/updates/db_world/2022_12_29_09.sql @@ -1 +1,2 @@ +-- DB update 2022_12_29_08 -> 2022_12_29_09 UPDATE `quest_template` SET `RewardChoiceItemID1` = 25574, `RewardChoiceItemQuantity1` = 1, `RewardChoiceItemID2` = 25575, `RewardChoiceItemQuantity2` = 1, `RewardChoiceItemID3` = 25576, `RewardChoiceItemQuantity3` = 1 WHERE (`ID` = 9866); From 35fa273ead0b63f7497a9cb438084d5ccead846d Mon Sep 17 00:00:00 2001 From: Samsequel <20357406+Samsequel@users.noreply.github.com> Date: Thu, 29 Dec 2022 18:38:50 +0100 Subject: [PATCH 30/32] fix(DB/Creature): Remove Tamed ravager spawns (#14408) --- data/sql/updates/pending_db_world/tamedravagerbegone.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 data/sql/updates/pending_db_world/tamedravagerbegone.sql diff --git a/data/sql/updates/pending_db_world/tamedravagerbegone.sql b/data/sql/updates/pending_db_world/tamedravagerbegone.sql new file mode 100644 index 000000000..a4231554f --- /dev/null +++ b/data/sql/updates/pending_db_world/tamedravagerbegone.sql @@ -0,0 +1 @@ +DELETE FROM `creature` WHERE `id1` = 19461; From b0c37eabefe311c5b234a37443bb0db3e8c68fdc Mon Sep 17 00:00:00 2001 From: Samsequel <20357406+Samsequel@users.noreply.github.com> Date: Thu, 29 Dec 2022 18:39:33 +0100 Subject: [PATCH 31/32] fix(DB/Loot): Fen Strider Tentacle should only drop when on quest (#14404) --- data/sql/updates/pending_db_world/fenstrider.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/sql/updates/pending_db_world/fenstrider.sql diff --git a/data/sql/updates/pending_db_world/fenstrider.sql b/data/sql/updates/pending_db_world/fenstrider.sql new file mode 100644 index 000000000..8442e01b8 --- /dev/null +++ b/data/sql/updates/pending_db_world/fenstrider.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `creature_loot_template` WHERE (`Entry` = 18134) AND (`Item` IN (24427)); +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(18134, 24427, 0, 20, 1, 1, 0, 1, 1, 'Fen Strider - Fen Strider Tentacle'); From a2018edade7e0e655cfcd2157bb2afc46ceaf4af Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Thu, 29 Dec 2022 17:41:50 +0000 Subject: [PATCH 32/32] chore(DB): import pending files Referenced commit(s): b0c37eabefe311c5b234a37443bb0db3e8c68fdc --- .../fenstrider.sql => db_world/2022_12_29_10.sql} | 1 + .../tamedravagerbegone.sql => db_world/2022_12_29_11.sql} | 1 + 2 files changed, 2 insertions(+) rename data/sql/updates/{pending_db_world/fenstrider.sql => db_world/2022_12_29_10.sql} (88%) rename data/sql/updates/{pending_db_world/tamedravagerbegone.sql => db_world/2022_12_29_11.sql} (50%) diff --git a/data/sql/updates/pending_db_world/fenstrider.sql b/data/sql/updates/db_world/2022_12_29_10.sql similarity index 88% rename from data/sql/updates/pending_db_world/fenstrider.sql rename to data/sql/updates/db_world/2022_12_29_10.sql index 8442e01b8..4854374ae 100644 --- a/data/sql/updates/pending_db_world/fenstrider.sql +++ b/data/sql/updates/db_world/2022_12_29_10.sql @@ -1,3 +1,4 @@ +-- DB update 2022_12_29_09 -> 2022_12_29_10 -- DELETE FROM `creature_loot_template` WHERE (`Entry` = 18134) AND (`Item` IN (24427)); INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES diff --git a/data/sql/updates/pending_db_world/tamedravagerbegone.sql b/data/sql/updates/db_world/2022_12_29_11.sql similarity index 50% rename from data/sql/updates/pending_db_world/tamedravagerbegone.sql rename to data/sql/updates/db_world/2022_12_29_11.sql index a4231554f..db353ec9c 100644 --- a/data/sql/updates/pending_db_world/tamedravagerbegone.sql +++ b/data/sql/updates/db_world/2022_12_29_11.sql @@ -1 +1,2 @@ +-- DB update 2022_12_29_10 -> 2022_12_29_11 DELETE FROM `creature` WHERE `id1` = 19461;