From d12ad7ed2ebd2b261677566e5ca87e87215e9966 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Tue, 28 Jan 2025 21:00:45 +0900 Subject: [PATCH] . --- exp_legacy/module/modules/gui/bonus.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/exp_legacy/module/modules/gui/bonus.lua b/exp_legacy/module/modules/gui/bonus.lua index 7c85c99b..c04790cc 100644 --- a/exp_legacy/module/modules/gui/bonus.lua +++ b/exp_legacy/module/modules/gui/bonus.lua @@ -9,7 +9,9 @@ local Event = require("modules/exp_legacy/utils/event") --- @dep utils.event local config = require("modules.exp_legacy.config.bonus") --- @dep config.bonus local vlayer = require("modules.exp_legacy.modules.control.vlayer") local format_number = require("util").format_number --- @dep util + local bonus_container +local bonus_gui_control_pts_a_count local function bonus_gui_pts_needed(player) local frame = Gui.get_left_element(player, bonus_container) @@ -65,7 +67,7 @@ end local function max_bonus_pts_update(player) local frame = Gui.get_left_element(player, bonus_container) local disp = frame.container["bonus_st_2"].disp.table - disp["bonus_control_pts_a_count"].caption = math.floor(config.pts.base * (1 + config.pts.increase_percentage_per_role_level * (Roles.get_player_highest_role(player).index - Roles.get_role_by_name(config.pts.role_name).index))) + disp[bonus_gui_control_pts_a_count.name].caption = math.floor(config.pts.base * (1 + config.pts.increase_percentage_per_role_level * (Roles.get_player_highest_role(player).index - Roles.get_role_by_name(config.pts.role_name).index))) end local function apply_periodic_bonus(player) @@ -115,7 +117,7 @@ local bonus_gui_control_pts_a = width = config.gui_display_width["half"], } -local bonus_gui_control_pts_a_count = +bonus_gui_control_pts_a_count = Gui.element{ type = "label", name = "bonus_control_pts_a_count",