Page 1 of 1

Request: Refactor getStatDesc to reduce duplication

Posted: Sun Jan 27, 2019 5:54 pm
by isaacssv552
The function getStatDesc in mod/dialogs/LevelupDialog.lua currently duplicates information from the onStatChange function in mod/class/Actor.lua. For instance, multi_life is calculated separately in each function. This any addon which superloads onStatChange must also superload getStatDesc to prevent UI discrepancies. This reduces compatibility, both with other addons and with future versions of TOME. I propose moving Actor stat change information from LevelupDialog.lua into Actor.lua, perhaps into a new function such as 'getStatChange(stat, property)'.