Open drcxd opened 3 months ago
I'd go for a multiplier approach. 0.5 is half the loot, 2 is double the loot. Another option for whether loot can have duplicates. With a value of 9999, bosses should drop all possible loot, or thousands of drops depending if duplicates are on.
I'd also clarify which loot tables this affects. "many bosses and others" is vague.
I also had confusion about these configs, and I think some of them even don't work correctly if used at a value lower than 1 but I didn't feel like testing at the time. I think I deleted the server because my ssd ran out of space and i wanted to try some game. I might try doing server work again when i buy a bigger ssd.
Current Behaviour
I am not sure if this is a bug but since it does not work as my expectation and makes me confusing, I decide to report it as one.
The problem is with the configuration option
Rate.Drop.Item.GroupAmount
in the fileworldserver.conf
. The comment says:I modified this value to 10, restarted the world server, defeated VanCliff in the Deadmine, found that he only drops two equipable items.
Expected Blizzlike Behaviour
Since there is no Blizzlike behaviour, I just treat this section as expected behavior. What I expected is that this rate can increase the number of items dropped by the Boss determinantly.
From the section above, it does increase the number of items dropped by VanCliff from one to two. However, I was expecting the number of items dropped should be 10. Since some mobs and chests drop items around this number.
Or maybe the configuration file should specify explicitly how this rate affects the number of items dropped in more detail.
Source
No response
Steps to reproduce the problem
Rate.Drop.Item.GroupAmound
to some larger number, e.g. 10.Extra Notes
I actually debug the world server to see what happened exactly and I think this would save you the time doing this.
Frist, this fucntion:
https://github.com/azerothcore/azerothcore-wotlk/blob/f2680d994bc0b0861109ada7fd621a926b9b6bfe/src/server/game/Loot/LootMgr.cpp#L1430
should recursively call itself with the argument
nonRefIterationsLeft
, which has the value ofRate.Drop.Item.AmountGroup
at the first time it gets invoked, decreases each time it gest called.However, the function body is enclosed in a if statement:
https://github.com/azerothcore/azerothcore-wotlk/blob/f2680d994bc0b0861109ada7fd621a926b9b6bfe/src/server/game/Loot/LootMgr.cpp#L1432
The function
Roll
might returnnullptr
at this line:https://github.com/azerothcore/azerothcore-wotlk/blob/f2680d994bc0b0861109ada7fd621a926b9b6bfe/src/server/game/Loot/LootMgr.cpp#L1317
which stops the whole recursive call process. This is the reason why even I set the rate to 10 but VanCliff still only dropped two items.
The reason that
Roll
returnsnullptr
is thatpossibleLoot
becomes more and more emptier when items are dropped:https://github.com/azerothcore/azerothcore-wotlk/blob/f2680d994bc0b0861109ada7fd621a926b9b6bfe/src/server/game/Loot/LootMgr.cpp#L1286
This is because
LootGroudInvalidSelector
removes already dropped equipment frompossibleLoot
:https://github.com/azerothcore/azerothcore-wotlk/blob/f2680d994bc0b0861109ada7fd621a926b9b6bfe/src/server/game/Loot/LootMgr.cpp#L80
This makes the total chance of dropping of the items remain in the group is less than 1, which in turn makes the program possible to not hit this line:
https://github.com/azerothcore/azerothcore-wotlk/blob/f2680d994bc0b0861109ada7fd621a926b9b6bfe/src/server/game/Loot/LootMgr.cpp#L1305
I have some suggestion about how to fix this problem:
First we have to specify explicity how
Rate.Item.Drop.GroupAmound
will affect the number of items dropped. Currently, the number of dropped items is somehow random.One possible solution is to keep the total chance of dropping of the items in
possibleLoot
always equal to or greater than 1, even when some of the items are removed from the original loot group.Or maybe to support loot contains duplicate equipments?
AC rev. hash/commit
I am using the fork that support the playerbots module, but I think this problem is the same for both repos.
Operating system
Windows 10
Custom changes or Modules
No response