Fix Consumable Buff UI not working in online request if not host

This commit is contained in:
GreenComfyTea
2023-08-03 12:21:17 +03:00
parent 0359042c97
commit 63ddbff12a

View File

@@ -1,13 +1,11 @@
local this = {}; local this = {};
local buff_UI_entity;
local config;
local singletons;
local buffs; local buffs;
local buff_UI_entity; local buff_UI_entity;
local config; local config;
local singletons; local singletons;
local players;
local utils;
local sdk = sdk; local sdk = sdk;
local tostring = tostring; local tostring = tostring;
@@ -63,7 +61,6 @@ this.list = {
might_seed = nil, might_seed = nil,
adamant_seed = nil, adamant_seed = nil,
hardshell_powder = nil, hardshell_powder = nil,
hardshell_powder = nil,
immunizer = nil, immunizer = nil,
dash_juice = nil dash_juice = nil
}; };
@@ -118,7 +115,7 @@ function this.update()
return; return;
end end
local player_data = get_value_method:call(player_data_array, 0); local player_data = get_value_method:call(player_data_array, players.myself.id);
if player_data == nil then if player_data == nil then
return; return;
end end
@@ -373,6 +370,7 @@ end
function this.update_dash_juice(player_data, item_parameter) function this.update_dash_juice(player_data, item_parameter)
local dash_juice_timer = stamina_up_buff_second_timer_field:get_data(player_data); local dash_juice_timer = stamina_up_buff_second_timer_field:get_data(player_data);
if dash_juice_timer == nil then if dash_juice_timer == nil then
return; return;
end end
@@ -399,8 +397,10 @@ end
function this.init_module() function this.init_module()
buffs = require("MHR_Overlay.Buffs.buffs"); buffs = require("MHR_Overlay.Buffs.buffs");
config = require("MHR_Overlay.Misc.config"); config = require("MHR_Overlay.Misc.config");
utils = require("MHR_Overlay.Misc.utils");
buff_UI_entity = require("MHR_Overlay.UI.UI_Entities.buff_UI_entity"); buff_UI_entity = require("MHR_Overlay.UI.UI_Entities.buff_UI_entity");
singletons = require("MHR_Overlay.Game_Handler.singletons"); singletons = require("MHR_Overlay.Game_Handler.singletons");
players = require("MHR_Overlay.Damage_Meter.players");
end end
return this; return this;