Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2025-02-19 22:29:36 +08:00
parent d1032678ff
commit 7d431dc796
277 changed files with 7092 additions and 5050 deletions

View File

@@ -20,6 +20,7 @@
#include "ObjectMgr.h"
#include "PreparedStatement.h"
#include "QueryResult.h"
#include "Timer.h"
LootItemStorage::LootItemStorage()
{
@@ -249,7 +250,7 @@ void LootItemStorage::RemoveStoredLootItem(ObjectGuid containerGUID, uint32 item
// loot with empty itemList but unlootedCount > 0
// must be deleted manually by the player or traded
if (!loot->unlootedCount)
if (!loot->unlootedCount && !loot->gold)
lootItemStore.erase(itr);
}

View File

@@ -696,7 +696,7 @@ QuestItemList* Loot::FillQuestLoot(Player* player)
{
LootItem& item = quest_items[i];
sScriptMgr->OnBeforeFillQuestLootItem(player, item);
sScriptMgr->OnPlayerBeforeFillQuestLootItem(player, item);
// Quest item is not free for all and is already assigned to another player
// or player doesn't need it