Buff UI -> Clear buff data on error

This commit is contained in:
GreenComfyTea
2024-01-22 19:36:12 +02:00
parent 9b82e27725
commit 0dc74d4cc9
9 changed files with 88 additions and 3 deletions

View File

@@ -587,18 +587,21 @@ function this.update_harvest_moon()
if singletons.long_sword_shell_manager == nil then
error_handler.report("weapon_skills.update_harvest_moon", "Failed to access Data: long_sword_shell_manager");
this.list.harvest_moon = nil;
return;
end
local master_long_sword_shell_010_list = get_master_long_sword_shell_010s_method:call(singletons.long_sword_shell_manager, players.myself.id);
if master_long_sword_shell_010_list == nil then
error_handler.report("weapon_skills.update_harvest_moon", "Failed to access Data: master_long_sword_shell_010_list");
this.list.harvest_moon = nil;
return;
end
local master_long_sword_shell_010_list_count = get_long_sword_shell_010_list_count_method:call(master_long_sword_shell_010_list);
if master_long_sword_shell_010_list_count == nil then
error_handler.report("weapon_skills.update_harvest_moon", "Failed to access Data: master_long_sword_shell_010_list_count");
this.list.harvest_moon = nil;
return;
end
@@ -609,12 +612,14 @@ function this.update_harvest_moon()
local master_long_sword_shell_010 = get_long_sword_shell_010_list_item_method:call(master_long_sword_shell_010_list, 0);
if master_long_sword_shell_010 == nil then
error_handler.report("weapon_skills.update_harvest_moon", "Failed to access Data: master_long_sword_shell_010");
this.list.harvest_moon = nil;
return;
end
local life_timer = long_sword_shell_010_life_timer_field:get_data(master_long_sword_shell_010);
if life_timer == nil then
error_handler.report("weapon_skills.update_harvest_moon", "Failed to access Data: life_timer");
this.list.harvest_moon = nil;
return;
end
@@ -640,6 +645,7 @@ function this.update_wyvernblast_reload(player_data)
local wyvernblast_reload_timer = wyvernblast_reload_timer_field:get_data(player_data);
if wyvernblast_reload_timer == nil then
error_handler.report("weapon_skills.update_wyvernblast_reload", "Failed to access Data: heavy_bowgun_overheat_timer_field");
this.list.wyvernblast_reload = nil;
return;
end
@@ -669,18 +675,21 @@ function this.update_rising_moon()
if singletons.light_bowgun_shell_manager == nil then
error_handler.report("weapon_skills.update_rising_moon", "Failed to access Data: light_bowgun_shell_manager");
this.list.rising_moon = nil;
return;
end
local light_bowgun_shell_030s_speed_boost_list = get_light_bowgun_shell_030s_speed_boost_list_method:call(singletons.light_bowgun_shell_manager);
if light_bowgun_shell_030s_speed_boost_list == nil then
error_handler.report("weapon_skills.update_rising_moon", "Failed to access Data: light_bowgun_shell_030s_speed_boost_list");
this.list.rising_moon = nil;
return;
end
local light_bowgun_shell_030_speed_boost_list_count = get_light_bowgun_shell_030_list_count_method:call(light_bowgun_shell_030s_speed_boost_list);
if light_bowgun_shell_030_speed_boost_list_count == nil then
error_handler.report("weapon_skills.update_rising_moon", "Failed to access Data: light_bowgun_shell_030_speed_boost_list_count");
this.list.rising_moon = nil;
return;
end
@@ -693,12 +702,14 @@ function this.update_rising_moon()
local light_bowgun_shell_030 = get_light_bowgun_shell_030_list_item_method:call(light_bowgun_shell_030s_speed_boost_list, 0);
if light_bowgun_shell_030 == nil then
error_handler.report("weapon_skills.update_rising_moon", "Failed to access Data: light_bowgun_shell_030");
this.list.rising_moon = nil;
return;
end
local is_hit_enable = light_bowgun_shell_030_is_enable_hit_field:get_data(light_bowgun_shell_030);
if is_hit_enable == nil then
error_handler.report("weapon_skills.update_rising_moon", "Failed to access Data: is_hit_enable");
this.list.rising_moon = nil;
return;
end
@@ -710,6 +721,7 @@ function this.update_rising_moon()
local timer = light_bowgun_shell_030_timer_field:get_data(light_bowgun_shell_030);
if timer == nil then
error_handler.report("weapon_skills.update_rising_moon", "Failed to access Data: timer");
this.list.rising_moon = nil;
return;
end
@@ -728,18 +740,21 @@ function this.update_setting_sun()
if singletons.light_bowgun_shell_manager == nil then
error_handler.report("weapon_skills.update_setting_sun", "Failed to access Data: light_bowgun_shell_manager");
this.list.setting_sun = nil;
return;
end
local light_bowgun_shell_030s_all_list = get_light_bowgun_shell_030s_all_list_method:call(singletons.light_bowgun_shell_manager);
if light_bowgun_shell_030s_all_list == nil then
error_handler.report("weapon_skills.update_setting_sun", "Failed to access Data: light_bowgun_shell_030s_all_list");
this.list.setting_sun = nil;
return;
end
local light_bowgun_shell_030_all_list_count = get_light_bowgun_shell_030_list_count_method:call(light_bowgun_shell_030s_all_list);
if light_bowgun_shell_030_all_list_count == nil then
error_handler.report("weapon_skills.update_setting_sun", "Failed to access Data: light_bowgun_shell_030_all_list_count");
this.list.setting_sun = nil;
return;
end
@@ -757,12 +772,14 @@ function this.update_setting_sun()
local light_bowgun_shell_030 = get_light_bowgun_shell_030_list_item_method:call(light_bowgun_shell_030s_all_list, 0);
if light_bowgun_shell_030 == nil then
error_handler.report("weapon_skills.update_setting_sun", "Failed to access Data: light_bowgun_shell_030");
this.list.setting_sun = nil;
return;
end
local is_hit_enable = light_bowgun_shell_030_is_enable_hit_field:get_data(light_bowgun_shell_030);
if is_hit_enable == nil then
error_handler.report("weapon_skills.update_setting_sun", "Failed to access Data: is_hit_enable");
this.list.setting_sun = nil;
return;
end
@@ -774,6 +791,7 @@ function this.update_setting_sun()
local timer = light_bowgun_shell_030_timer_field:get_data(light_bowgun_shell_030);
if timer == nil then
error_handler.report("weapon_skills.update_setting_sun", "Failed to access Data: timer");
this.list.setting_sun = nil;
return;
end
@@ -793,6 +811,7 @@ function this.update_overheat(player_data)
local heavy_bowgun_overheat_timer = heavy_bowgun_overheat_timer_field:get_data(player_data);
if heavy_bowgun_overheat_timer_field == nil then
error_handler.report("weapon_skills.update_overheat", "Failed to access Data: heavy_bowgun_overheat_timer_field");
this.list.overheat = nil;
return;
end
@@ -828,6 +847,7 @@ function this.update_twin_wine(player)
local chain_death_match_shell = chain_death_match_shell_field:get_data(player);
if chain_death_match_shell == nil then
error_handler.report("weapon_skills.update_twin_wine", "Failed to access Data: chain_death_match_shell");
this.list.twin_wine = nil;
return;
end
@@ -852,6 +872,7 @@ function this.update_archdemon_mode(player)
local is_kijin_kyouka = is_kijin_kyouka_field:get_data(player);
if is_kijin_kyouka == nil then
error_handler.report("weapon_skills.update_archdemon_mode", "Failed to access Data: is_kijin_kyouka");
this.list.archdemon_mode = nil;
return;
end
@@ -863,6 +884,7 @@ function this.update_archdemon_mode(player)
local kijin_kyouka_gauge = get_kijin_kyouka_gauge_method:call(player);
if kijin_kyouka_gauge == nil then
error_handler.report("weapon_skills.update_archdemon_mode", "Failed to access Data: kijin_kyouka_gauge");
this.list.archdemon_mode = nil;
return;
end
@@ -888,18 +910,21 @@ function this.update_bead_of_resonance()
if singletons.horn_shell_manager == nil then
error_handler.report("weapon_skills.update_bead_of_resonance", "Failed to access Data: horn_shell_manager");
this.list.bead_of_resonance = nil;
return;
end
local horn_shell_003s_array = horn_shell_003s_field:get_data(singletons.horn_shell_manager);
if horn_shell_003s_array == nil then
error_handler.report("weapon_skills.update_bead_of_resonance", "Failed to access Data: horn_shell_003s_list");
this.list.bead_of_resonance = nil;
return;
end
local horn_shell_003s_array_length = get_length_method:call(horn_shell_003s_array);
if horn_shell_003s_array_length == nil then
error_handler.report("weapon_skills.update_bead_of_resonance", "Failed to access Data: horn_shell_003s_array_length");
this.list.bead_of_resonance = nil;
return;
end
@@ -911,12 +936,14 @@ function this.update_bead_of_resonance()
local horn_shell_003_list = get_value_method:call(horn_shell_003s_array, players.myself.id);
if horn_shell_003_list == nil then
error_handler.report("weapon_skills.update_bead_of_resonance", "Failed to access Data: horn_shell_003_list");
this.list.bead_of_resonance = nil;
return;
end
local horn_shell_003_list_count = get_horn_shell_003_list_count_method:call(horn_shell_003_list);
if horn_shell_003_list_count == nil then
error_handler.report("weapon_skills.update_bead_of_resonance", "Failed to access Data: horn_shell_003_list_count");
this.list.bead_of_resonance = nil;
return;
end
@@ -928,12 +955,14 @@ function this.update_bead_of_resonance()
local horn_shell_003 = get_horn_shell_003_list_item_method:call(horn_shell_003_list, 0);
if horn_shell_003 == nil then
error_handler.report("weapon_skills.update_bead_of_resonance", "Failed to access Data: horn_shell_003");
this.list.bead_of_resonance = nil;
return;
end
local life_timer = horn_shell_003_life_timer_field:get_data(horn_shell_003);
if life_timer == nil then
error_handler.report("weapon_skills.update_bead_of_resonance", "Failed to access Data: life_timer");
this.list.bead_of_resonance = nil;
return;
end
@@ -959,6 +988,7 @@ function this.update_sonic_bloom(player)
local life_timer = horn_shell_020_life_timer_field:get_data(blast_speaker_shell);
if life_timer == nil then
error_handler.report("weapon_skills.update_sonic_bloom", "Failed to access Data: life_timer");
this.list.sonic_bloom = nil;
return;
end
@@ -998,6 +1028,7 @@ function this.update_all_extracts_mix(player)
local is_get_all_extractive = is_get_all_extractive_method:call(player);
if is_get_all_extractive == nil then
error_handler.report("weapon_skills.update_all_extracts_mix", "Failed to access Data: is_get_all_extractive");
this.list.all_extracts_mix = nil;
return;
end
@@ -1009,6 +1040,7 @@ function this.update_all_extracts_mix(player)
local red_extractive_time = get_red_extractive_time_method:call(player);
if red_extractive_time == nil then
error_handler.report("weapon_skills.update_all_extracts_mix", "Failed to access Data: red_extractive_time");
this.list.all_extracts_mix = nil;
return;
end
@@ -1028,6 +1060,7 @@ function this.update_extract(player, extract_key, time_holder)
local extractive_time = time_holder:call(player);
if extractive_time == nil then
error_handler.report("weapon_skills.update_extract", string.format("Failed to access Data: %s_extractive_time", extract_key));
this.list[extract_key] = nil;
return;
end