Sephus Posted September 30 Share Posted September 30 So the ESTATE system in Aegis (official servers) is what is responsible for modifying your status changes in combat or during game play in the world. I've noticed that they simply push a status modification into a vector and iterate over it to calculate the total status values per second. While it is effective, it was badly coded I had noticed. In Horizon I have rectified this system and made it super effective in code. In Aegis the code is called when status effect is set, and when the reset is complete. Similarly in Horizon have implemented periodic changes to statuses so simply that it can be coded in one line of code - current_hp()->add_periodic_change( s_attribute_change_values(hp_regeneration()->total(), 0, 0, hp_minmax, [player, this]() { player->get_session()->clif()->notify_recovery(ZC_NOTIFY_RECOVERY_HP, this->hp_regeneration()->total()); }), 0, player->map()->container()->game_config().get_natural_heal_hp_interval(), "natural_hp_regen"); The above line induces a natural status recovery for a total of hp_regeneration value. For a total of hp_minmax. And updates the client. For an infinite duration and with an interval of `get_natural_heal_hp_interval`. The status is saved as "natural_hp_regen" and works internall with statuses in Horizon. Quote Link to comment Share on other sites More sharing options...
Recommended Posts