mirror of
https://github.com/GreenComfyTea/MHR-Overlay.git
synced 2026-01-24 04:18:11 -08:00
Fix Health access attempts outside hooks
(large monster updated in previous commit)
This commit is contained in:
@@ -154,7 +154,8 @@ function this.update_large_monster(enemy)
|
|||||||
large_monster.update_stamina_timer(enemy, monster, nil);
|
large_monster.update_stamina_timer(enemy, monster, nil);
|
||||||
large_monster.update_rage_timer(enemy, monster, nil);
|
large_monster.update_rage_timer(enemy, monster, nil);
|
||||||
|
|
||||||
if quest_status.is_online and players.myself.id ~= 0 then
|
if (quest_status.is_online and players.myself.id ~= 0)
|
||||||
|
or not monster.is_health_initialized then
|
||||||
local physical_param = large_monster.update_health(enemy, monster);
|
local physical_param = large_monster.update_health(enemy, monster);
|
||||||
pcall(large_monster.update_parts, enemy, monster, physical_param);
|
pcall(large_monster.update_parts, enemy, monster, physical_param);
|
||||||
pcall(large_monster.update_anomaly_parts, enemy, monster, nil);
|
pcall(large_monster.update_anomaly_parts, enemy, monster, nil);
|
||||||
@@ -195,7 +196,8 @@ function this.update_small_monster(enemy)
|
|||||||
|
|
||||||
small_monster.update(enemy, monster);
|
small_monster.update(enemy, monster);
|
||||||
|
|
||||||
if quest_status.is_online and players.myself.id ~= 0 then
|
if (quest_status.is_online and players.myself.id ~= 0)
|
||||||
|
or not monster.is_health_initialized then
|
||||||
small_monster.update_health(enemy, monster);
|
small_monster.update_health(enemy, monster);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ function this.new(enemy)
|
|||||||
this.init_UI(monster);
|
this.init_UI(monster);
|
||||||
|
|
||||||
this.update_position(enemy, monster);
|
this.update_position(enemy, monster);
|
||||||
this.update_health(enemy, monster);
|
|
||||||
this.update(enemy, monster);
|
this.update(enemy, monster);
|
||||||
|
|
||||||
if this.list[enemy] == nil then
|
if this.list[enemy] == nil then
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ function this.draw()
|
|||||||
|
|
||||||
local cached_config = config.current_config.endemic_life_UI;
|
local cached_config = config.current_config.endemic_life_UI;
|
||||||
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
|
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||||
|
|
||||||
for REcreature, creature in pairs(env_creature.list) do
|
for REcreature, creature in pairs(env_creature.list) do
|
||||||
if cached_config.settings.max_distance == 0 then
|
if cached_config.settings.max_distance == 0 then
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user