[x] that I've tested my code since the last commit in the PR, and will test after any later commits
Temporary:
[x] that I understand there are large refactoring efforts going on right now, that these efforts touch every single Lua script and binding, and that my pull request might get put on hold to ensure there are not any conflicts with the refactoring work
Previously, the drops from a mob are set using ONLY it's DropID: A lookup to a global drop list.
If you wanted to change the drops a mob had, you either had to modify that global list (effecting anything else that uses that list), or you had to swap that mobs DropID for another one.
The main changes in this PR:
When it's time to roll loot, make a TEMPORARY copy of the drop list assigned to the mob.
Add a facility to add a list of droplist modifications that will be actioned just before the droplist is rolled on.
Testing
Added mob:addDropListModification(4112, 1000) to onMobDeath for birds in Sky.
They dropped a potion.
Remove and hot-reload.
They no longer drop potions.
I affirm:
Temporary:
Previously, the drops from a mob are set using ONLY it's DropID: A lookup to a global drop list. If you wanted to change the drops a mob had, you either had to modify that global list (effecting anything else that uses that list), or you had to swap that mobs DropID for another one.
The main changes in this PR: When it's time to roll loot, make a TEMPORARY copy of the drop list assigned to the mob. Add a facility to add a list of droplist modifications that will be actioned just before the droplist is rolled on.
Testing Added
mob:addDropListModification(4112, 1000)
to onMobDeath for birds in Sky. They dropped a potion. Remove and hot-reload. They no longer drop potions.