From 3f6b933bd1558a19fb582ca0657da6512f6f247a Mon Sep 17 00:00:00 2001 From: AnchyDev Date: Sat, 28 Oct 2023 23:25:04 +1100 Subject: [PATCH] Items should now respect group loot rules. --- src/scripts/ToSInstanceScript.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripts/ToSInstanceScript.cpp b/src/scripts/ToSInstanceScript.cpp index 4302507..d01683f 100644 --- a/src/scripts/ToSInstanceScript.cpp +++ b/src/scripts/ToSInstanceScript.cpp @@ -735,6 +735,8 @@ void ToSInstanceScript::PopulateRewardChest() LootItem lootItem(*lootStoreItem); lootItem.itemIndex = rewardChest->loot.items.size(); lootItem.itemid = rewardTemplate->itemEntry; + lootItem.follow_loot_rules = true; + lootItem.freeforall = false; uint32 itemCount = urand(rewardTemplate->countMin, rewardTemplate->countMax); if (rewardTemplate->curseScalar) @@ -765,7 +767,7 @@ void ToSInstanceScript::PopulateRewardChest() rewardChest->loot.generateMoneyLoot(minMoney, maxMoney); rewardChest->SetLootGenerationTime(); - rewardChest->SetLootState(GO_ACTIVATED); + rewardChest->SetLootState(GO_READY); } rewardBeam = instance->SummonGameObject(TOS_GOB_REWARD_BEAM, *tempPos, 0.0, 0.0, 0.0, 0.0, 0, true);