Request: Refactor getStatDesc to reduce duplication
Moderator: Moderator
-
- Wayist
- Posts: 25
- Joined: Thu Mar 12, 2015 11:12 pm
Request: Refactor getStatDesc to reduce duplication
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)'.