From 076d42081d663e08785e2bb29395b26a10570b3c Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Sat, 21 Dec 2024 07:39:05 +0900 Subject: [PATCH] Add character check when applying bonus --- exp_legacy/module/modules/gui/bonus.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exp_legacy/module/modules/gui/bonus.lua b/exp_legacy/module/modules/gui/bonus.lua index a00670f0..e69ee0b8 100644 --- a/exp_legacy/module/modules/gui/bonus.lua +++ b/exp_legacy/module/modules/gui/bonus.lua @@ -388,6 +388,8 @@ end) Event.on_nth_tick(config.player_special_bonus_rate, function(_) for _, player in pairs(game.connected_players) do - apply_periodic_bonus(player) + if player.character then + apply_periodic_bonus(player) + end end end)