What bug does the patch fix? What features does the patch add?
Ignore drop rate multipliers in loot groups.
For which repository revision was the patch created?
7262
Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.
No thread.
Who has been writing this patch? Please include either forum user names or email addresses.
Forum user brats from the 'rival' project forums.
Short explanation: there was some debate over this quite some time ago, and Vladimir decided then that the drop rate multipliers should not apply to grouped loots because it destroys the group, making some items from the group drop all the time, while others never. It looks like when the separate drop rate multipliers for different item types were implemented, the change from Vladimir was lost, and now the drop rate multipliers do apply to grouped loots again, destroying them. This patch, developed by brats for another project, removes the piece of code which made those multipliers apply to grouped loots, so groups will work correctly even with multipliers bigger than 1. I tested this on 7262, it works properly.
diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp
index 6743ffe..baaaaa4 100644
--- a/src/game/LootMgr.cpp
+++ b/src/game/LootMgr.cpp
@@ -777,8 +777,7 @@ LootStoreItem const * LootTemplate::LootGroup::Roll(bool rate) const
return &ExplicitlyChanced[i];
ItemPrototype const *pProto = objmgr.GetItemPrototype(ExplicitlyChanced[i].itemid);
- float qualityMultiplier = pProto && rate ? sWorld.getRate(qualityToRate[pProto->Quality]) : 1.0f;
- Roll -= ExplicitlyChanced[i].chance * qualityMultiplier;
+ Roll -= ExplicitlyChanced[i].chance;
if (Roll < 0)
return &ExplicitlyChanced[i];
}
Filebeam link:
http://filebeam.com/ef2423cee248266abfafbcab5b194ffd