There're quirks when changing stats, some values don't apply immediately and some don't work at all, likely due to how the game engine uses them. Example:
Changing the regeneration type at runtime WILL NOT work, even if true is returned (false positive).
For vision, it appears changing them to a specific value does not immediately change it. Instead, it will change over time to approach and reach said value. However, if one wishes to decrease the vision range, and the initial vision range is greater than 1800, the vision will remain at 1800. Thus, one must change it first to 1800, then to the desired value. Otherwise, vision change works as intended. One cannot increase vision beyond 1800.
Going into a fountain of life will not increase a unit's hp regeneration rate. Modifying regeneration rate is instant.
Changes a unit's stats integer field.
There're quirks when changing stats, some values don't apply immediately and some don't work at all, likely due to how the game engine uses them. Example:
BlzSetUnitIntegerField(unit, UNIT_IF_HIT_POINTS_REGENERATION_TYPE)
Regeneration type values are as follows:
Changing the regeneration type at runtime WILL NOT work, even if true is returned (false positive).
For vision, it appears changing them to a specific value does not immediately change it. Instead, it will change over time to approach and reach said value. However, if one wishes to decrease the vision range, and the initial vision range is greater than 1800, the vision will remain at 1800. Thus, one must change it first to 1800, then to the desired value. Otherwise, vision change works as intended. One cannot increase vision beyond 1800.
Going into a fountain of life will not increase a unit's hp regeneration rate. Modifying regeneration rate is instant.