mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Fix no player character during bonus reset
This commit is contained in:
@@ -401,6 +401,9 @@ end
|
|||||||
--- @param player LuaPlayer
|
--- @param player LuaPlayer
|
||||||
function Elements.container.clear_player_bonus(player)
|
function Elements.container.clear_player_bonus(player)
|
||||||
Elements.container.data[player] = {}
|
Elements.container.data[player] = {}
|
||||||
|
if not player.character then
|
||||||
|
return
|
||||||
|
end
|
||||||
for _, bonus_data in pairs(config.player_bonus) do
|
for _, bonus_data in pairs(config.player_bonus) do
|
||||||
if not bonus_data.is_special then
|
if not bonus_data.is_special then
|
||||||
player[bonus_data.name] = 0
|
player[bonus_data.name] = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user