Okay, have now done this (will not post here as it contains a copy of your copyrighted/paid
onDeath function).
I have also looked into the NPC Random Treasure Drops extension description, but decided against it as it does not change the parcel names from table rolls, but introduces a complete new type of parcels. Might potentially be configured to do what I need, but too mighty/many other features which I do not (yet?) need.
I have however a fundamental question: in your
onInit(), you are registering a handler pointing to said
onDead function. I tried to point it to my modified
customOnDead function by replacing the reference during my own extension's
onInit():
Code:
origOnDead = MapParcelManager.onDead;
MapParcelManager.onDead = customOnDead;
Still - the original function is called from the handler.
It only worked when I was registering my own handler and removing yours (during my extension's
onInit()):
Code:
DB.removeHandler("combattracker.list.*.status", "onUpdate", origOnDead);
DB.addHandler("combattracker.list.*.status", "onUpdate", customOnDead);
Any clue how to avoid this registration/unregistration and rather replace the function directly?