Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Core/Loot: Items and references are not calculated correctly inside the same group #23908
Description: If we put an item and a reference inside the same loot group the calculation will not be the sum of both entries.
UPDATE `reference_loot_template` SET GroupId=1, `MinCount`=2, `MaxCount`=2 WHERE `entry` = 12009 AND `Item` = 36908;
What must happen in this case is the gob=190176 must always contain 95% 1 Lotus or 5% 2 lotus.
What happen instead, the gob could contain 0 Lotus.
To have better representation of the issue we will change the drop rate to 50% 50%
UPDATE `gameobject_loot_template` SET `Chance` = 50 WHERE `Entry` = 24228 AND `Item` IN (36908,1);
And the result in game in this case:
So the issue is when you put and item and a reference inside a group the drop rate will not be the sum of the 2 but every rate is calculated separately, this could result having no item from this group (having 2 items from the same group is not possible)
Steps to reproduce the problem:
TC rev. hash/commit: rev. c79571a
If I set the reference to 50% and the item to 0 (it means 100 - (all drop rate of other items+refs from the group) the drop will be correct.
UPDATE `gameobject_loot_template` SET `Chance` = 50 WHERE `Entry` = 24228 AND `Item` IN (1); UPDATE `gameobject_loot_template` SET `Chance` = 0 WHERE `Entry` = 24228 AND `Item` IN (36908);
This is working as intended, setting
Is there any situation in which this behavior is useful? (Apart from reducing number of reference entries)