mirror of
https://github.com/GreenComfyTea/MHR-Overlay.git
synced 2026-01-24 04:18:11 -08:00
Pull Most Buff Name from the Game
+ Solve Consumable Buff Timer Collisions
This commit is contained in:
@@ -58,10 +58,13 @@ this.list = {
|
||||
harvest_moon = nil,
|
||||
-- Light Bowgun
|
||||
fanning_maneuver = nil,
|
||||
wyvernblast_reload = nil,
|
||||
-- Heavy Bowgun
|
||||
counter_charger = nil,
|
||||
rising_moon = nil,
|
||||
setting_sun = nil,
|
||||
overheat = nil,
|
||||
wyvernsnipe_reload = nil,
|
||||
-- Hammer
|
||||
impact_burst = nil,
|
||||
-- Gunlance
|
||||
@@ -93,6 +96,57 @@ this.list = {
|
||||
bolt_boost = nil
|
||||
};
|
||||
|
||||
local weapon_skill_ids = {
|
||||
-- Great Sword
|
||||
power_sheathe = nil,
|
||||
-- Switch Axe
|
||||
amped_state = nil,
|
||||
switch_charger = nil,
|
||||
axe_heavy_slam = nil,
|
||||
-- Long Sword
|
||||
spirit_gauge_autofill = nil, -- Soaring Kick, Iai Slash
|
||||
spirit_gauge = nil,
|
||||
harvest_moon = 94,
|
||||
-- Light Bowgun
|
||||
fanning_maneuver = 72,
|
||||
wyvernblast_reload = nil,
|
||||
-- Heavy Bowgun
|
||||
counter_charger = 76,
|
||||
rising_moon = 147,
|
||||
setting_sun = 149,
|
||||
overheat = nil,
|
||||
wyvernsnipe_reload = nil,
|
||||
-- Hammer
|
||||
impact_burst = 109,
|
||||
-- Gunlance
|
||||
ground_splitter = 46,
|
||||
erupting_cannon = 121,
|
||||
-- Lance
|
||||
anchor_rage = 37,
|
||||
spiral_thrust = 38,
|
||||
twin_wine = nil,
|
||||
-- Sword & Shield
|
||||
destroyer_oil = 97,
|
||||
-- Dual Blades
|
||||
ironshine_silk = 104,
|
||||
archdemon_mode = nil,
|
||||
-- Hunting Horn
|
||||
silkbind_shockwave = 114,
|
||||
bead_of_resonance = 35,
|
||||
sonic_bloom = 112,
|
||||
-- Charge Blade
|
||||
element_boost = nil,
|
||||
sword_boost_mode = nil,
|
||||
-- Insect Glaive
|
||||
red_extract = nil,
|
||||
white_extract = nil,
|
||||
orange_extract = nil,
|
||||
all_extracts_mix = nil,
|
||||
-- Bow
|
||||
herculean_draw = nil,
|
||||
bolt_boost = 154
|
||||
};
|
||||
|
||||
-- 0 Great Sword
|
||||
-- 1 Switch Axe
|
||||
-- 2 Long Sword
|
||||
@@ -113,6 +167,8 @@ local previous_weapon_type = -1;
|
||||
|
||||
local spirit_gauge_breakpoints = {3, 2};
|
||||
|
||||
local wyverblast_reload_duration = 60;
|
||||
|
||||
local player_manager_type_def = sdk.find_type_definition("snow.player.PlayerManager");
|
||||
local get_player_data_method = player_manager_type_def:get_method("get_PlayerData");
|
||||
|
||||
@@ -168,6 +224,8 @@ local get_long_sword_shell_010_list_item_method = long_sword_shell_010_list_type
|
||||
local light_bowgun_type_def = sdk.find_type_definition("snow.player.LightBowgun");
|
||||
-- Fanning Maneuver
|
||||
local light_bowgun_wire_buff_timer_field = light_bowgun_type_def:get_field("LightBowgunWireBuffTimer");
|
||||
-- Wyvernblast Reload
|
||||
local wyvernblast_reload_timer_field = player_data_type_def:get_field("_WyvernBlastReloadTimer");
|
||||
|
||||
-- Heavy Bowgun
|
||||
|
||||
@@ -175,7 +233,6 @@ local heavy_bowgun_type_def = sdk.find_type_definition("snow.player.HeavyBowgun"
|
||||
-- Counter Charger
|
||||
local reduce_charge_timer_field = heavy_bowgun_type_def:get_field("_ReduseChargeTimer");
|
||||
local reduce_charge_timer_base_field = heavy_bowgun_type_def:get_field("_ReduseChargeTimeBase");
|
||||
|
||||
-- Rising Moon
|
||||
local light_bowgun_shell_manager_type_def = sdk.find_type_definition("snow.shell.LightBowgunShellManager");
|
||||
local get_light_bowgun_shell_030s_speed_boost_list_method = light_bowgun_shell_manager_type_def:get_method("get_getLightBowgunShell030s_SpeedBoost");
|
||||
@@ -183,13 +240,17 @@ local get_light_bowgun_shell_030s_speed_boost_list_method = light_bowgun_shell_m
|
||||
local light_bowgun_shell_030_type_def = sdk.find_type_definition("snow.shell.LightBowgunShell030");
|
||||
local light_bowgun_shell_030_is_enable_hit_field = light_bowgun_shell_030_type_def:get_field("<IsEnableHit>k__BackingField");
|
||||
local light_bowgun_shell_030_timer_field = light_bowgun_shell_030_type_def:get_field("_Timer");
|
||||
|
||||
-- Setting Sun
|
||||
local get_light_bowgun_shell_030s_all_list_method = light_bowgun_shell_manager_type_def:get_method("get_getLightBowgunShell030s_All");
|
||||
|
||||
local light_bowgun_shell_030_list_type_def = sdk.find_type_definition("System.Collections.Generic.List`1<snow.shell.LightBowgunShell030>");
|
||||
local get_light_bowgun_shell_030_list_count_method = light_bowgun_shell_030_list_type_def:get_method("get_Count");
|
||||
local get_light_bowgun_shell_030_list_item_method = light_bowgun_shell_030_list_type_def:get_method("get_Item");
|
||||
-- Overheat
|
||||
local heavy_bowgun_overheat_timer_field = player_data_type_def:get_field("_HeavyBowgunOverHeatTimer");
|
||||
-- Wyvernsnipe Reload
|
||||
local heavy_bowgun_wyvern_snipe_timer_field = player_data_type_def:get_field("_HeavyBowgunWyvernSnipeTimer");
|
||||
|
||||
|
||||
-- Hammer
|
||||
|
||||
@@ -345,6 +406,8 @@ local single_mvalue_field = single_type_def:get_field("mValue");
|
||||
local int32_type_def = sdk.find_type_definition("System.Int32");
|
||||
local int32_mvalue_field = int32_type_def:get_field("mValue");
|
||||
|
||||
local data_shortcut_type_def = sdk.find_type_definition("snow.data.DataShortcut");
|
||||
local get_name_method = data_shortcut_type_def:get_method("getName(snow.data.DataDef.PlWeaponActionId)");
|
||||
|
||||
local heavy_bowgun_shot_type_data_fields = { explode_pile_data_normal_field, explode_pile_data_radiate_field, explode_pile_data_spread_field};
|
||||
|
||||
@@ -365,10 +428,10 @@ function this.update(player, player_data, weapon_type)
|
||||
this.update_long_sword_skills(player);
|
||||
|
||||
elseif weapon_type == 3 then
|
||||
this.update_light_bowgun_skills(player);
|
||||
this.update_light_bowgun_skills(player, player_data);
|
||||
|
||||
elseif weapon_type == 4 then
|
||||
this.update_heavy_bowgun_skills(player);
|
||||
this.update_heavy_bowgun_skills(player, player_data);
|
||||
|
||||
elseif weapon_type == 5 then
|
||||
this.update_hammer_skills(player);
|
||||
@@ -400,8 +463,8 @@ function this.update(player, player_data, weapon_type)
|
||||
end
|
||||
|
||||
function this.update_great_sword_skills(player)
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "power_sheathe", nil, nil,
|
||||
player, move_wp_off_buff_set_time_field, player, move_wp_off_buff_set_time_field);
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "power_sheathe", this.get_weapon_skill_name,
|
||||
nil, nil, player, move_wp_off_buff_set_time_field, player, move_wp_off_buff_set_time_field);
|
||||
end
|
||||
|
||||
function this.update_switch_axe_skills(player)
|
||||
@@ -411,26 +474,26 @@ function this.update_switch_axe_skills(player)
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "amped_state", nil, nil,
|
||||
player, get_bottle_awake_duration_timer_method, player, bottle_awake_duration_time_field);
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "amped_state", this.get_weapon_skill_name,
|
||||
nil, nil, player, get_bottle_awake_duration_timer_method, player, bottle_awake_duration_time_field);
|
||||
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "switch_charger", nil, nil,
|
||||
player, no_use_slash_gauge_timer_field, player_user_data_slash_axe, get_no_user_slash_gauge_time_method);
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "switch_charger", this.get_weapon_skill_name,
|
||||
nil, nil, player, no_use_slash_gauge_timer_field, player_user_data_slash_axe, get_no_user_slash_gauge_time_method);
|
||||
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "axe_heavy_slam", nil, nil,
|
||||
player, bottle_awake_assist_timer_field);
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "axe_heavy_slam", this.get_weapon_skill_name,
|
||||
nil, nil, player, bottle_awake_assist_timer_field);
|
||||
end
|
||||
|
||||
function this.update_long_sword_skills(player)
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "spirit_gauge_autofill", nil, nil,
|
||||
player, get_long_sword_gauge_powerup_time_method);
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "spirit_gauge_autofill", this.get_weapon_skill_name,
|
||||
nil, nil, player, get_long_sword_gauge_powerup_time_method);
|
||||
|
||||
this.update_spirit_gauge(player);
|
||||
this.update_harvest_moon();
|
||||
end
|
||||
|
||||
function this.update_spirit_gauge(player)
|
||||
local weapon_skill = buffs.update_generic_buff(this.list, weapon_skills_type_name, "spirit_gauge",
|
||||
local weapon_skill = buffs.update_generic_buff(this.list, weapon_skills_type_name, "spirit_gauge", this.get_weapon_skill_name,
|
||||
player, get_long_sword_gauge_lv_method, player, get_long_sword_gauge_lv_timer_method, nil, nil, false, nil, spirit_gauge_breakpoints);
|
||||
|
||||
if weapon_skill == nil then
|
||||
@@ -496,7 +559,7 @@ function this.update_harvest_moon()
|
||||
return;
|
||||
end
|
||||
|
||||
local life_timer = life_timer_field:get_data(master_long_sword_shell_010);
|
||||
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");
|
||||
return;
|
||||
@@ -507,20 +570,43 @@ function this.update_harvest_moon()
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "harvest_moon", 1, life_timer);
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "harvest_moon", this.get_weapon_skill_name, 1, life_timer);
|
||||
end
|
||||
|
||||
function this.update_light_bowgun_skills(player)
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "fanning_maneuver", nil, nil,
|
||||
player, light_bowgun_wire_buff_timer_field);
|
||||
function this.update_light_bowgun_skills(player, player_data)
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "fanning_maneuver", this.get_weapon_skill_name,
|
||||
nil, nil, player, light_bowgun_wire_buff_timer_field);
|
||||
|
||||
this.update_wyvernblast_reload(player_data);
|
||||
end
|
||||
|
||||
function this.update_heavy_bowgun_skills(player)
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "counter_charger", nil, nil,
|
||||
player, reduce_charge_timer_field, player, reduce_charge_timer_base_field);
|
||||
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");
|
||||
return;
|
||||
end
|
||||
|
||||
if wyvernblast_reload_timer <= 1 then
|
||||
this.list.wyvernblast_reload = nil;
|
||||
return;
|
||||
end
|
||||
|
||||
local timer = wyverblast_reload_duration - (wyvernblast_reload_timer / 60);
|
||||
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "wyvernblast_reload", this.get_weapon_skill_name, 1, timer);
|
||||
end
|
||||
|
||||
function this.update_heavy_bowgun_skills(player, player_data)
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "counter_charger", this.get_weapon_skill_name,
|
||||
nil, nil, player, reduce_charge_timer_field, player, reduce_charge_timer_base_field);
|
||||
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "wyvernsnipe_reload", this.get_weapon_skill_name,
|
||||
nil, nil, player_data, heavy_bowgun_wyvern_snipe_timer_field);
|
||||
|
||||
this.update_rising_moon();
|
||||
this.update_setting_sun()
|
||||
this.update_setting_sun();
|
||||
this.update_overheat(player_data);
|
||||
end
|
||||
|
||||
function this.update_rising_moon()
|
||||
@@ -575,7 +661,7 @@ function this.update_rising_moon()
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "rising_moon", 1, timer);
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "rising_moon", this.get_weapon_skill_name, 1, timer);
|
||||
end
|
||||
|
||||
function this.update_setting_sun()
|
||||
@@ -635,7 +721,22 @@ function this.update_setting_sun()
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "setting_sun", 1, timer);
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "setting_sun", this.get_weapon_skill_name, 1, timer);
|
||||
end
|
||||
|
||||
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");
|
||||
return;
|
||||
end
|
||||
|
||||
if heavy_bowgun_overheat_timer <= 1 then
|
||||
this.list.overheat = nil;
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "overheat", this.get_weapon_skill_name, 1, heavy_bowgun_overheat_timer);
|
||||
end
|
||||
|
||||
function this.update_hammer_skills(player)
|
||||
@@ -645,8 +746,8 @@ function this.update_hammer_skills(player)
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "impact_burst", nil, nil,
|
||||
player, horn_impact_pulls_timer_field, player_user_data_hammer, hammer_impact_pulls_time_max_field);
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "impact_burst", this.get_weapon_skill_name,
|
||||
nil, nil, player, horn_impact_pulls_timer_field, player_user_data_hammer, hammer_impact_pulls_time_max_field);
|
||||
end
|
||||
|
||||
function this.update_gunlance_skills(player)
|
||||
@@ -656,8 +757,8 @@ function this.update_gunlance_skills(player)
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "ground_splitter", nil, nil,
|
||||
player, shot_damage_up_duration_timer_field, player_user_data_gunlance, get_player_user_data_gunlance_method);
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "ground_splitter", this.get_weapon_skill_name,
|
||||
nil, nil, player, shot_damage_up_duration_timer_field, player_user_data_gunlance, get_player_user_data_gunlance_method);
|
||||
|
||||
this.update_erupting_cannon(player, player_user_data_gunlance);
|
||||
end
|
||||
@@ -675,13 +776,13 @@ function this.update_erupting_cannon(player, player_user_data_gunlance)
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "erupting_cannon", nil, nil,
|
||||
player, explode_pile_buff_timer_field, explode_pile_data, explode_pile_data_duration_field);
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "erupting_cannon", this.get_weapon_skill_name,
|
||||
nil, nil, player, explode_pile_buff_timer_field, explode_pile_data, explode_pile_data_duration_field);
|
||||
end
|
||||
|
||||
function this.update_lance_skills(player)
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "spiral_thrust", nil, nil,
|
||||
player, get_ruten_timer_method);
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "spiral_thrust", this.get_weapon_skill_name,
|
||||
nil, nil, player, get_ruten_timer_method);
|
||||
|
||||
this.update_anchor_rage(player);
|
||||
this.update_twin_wine(player);
|
||||
@@ -728,8 +829,8 @@ function this.update_anchor_rage(player)
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "anchor_rage", nil, nil,
|
||||
player, get_guard_rage_timer_method, guard_rage_duration_valtype, single_mvalue_field);
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "anchor_rage", this.get_weapon_skill_name,
|
||||
nil, nil, player, get_guard_rage_timer_method, guard_rage_duration_valtype, single_mvalue_field);
|
||||
end
|
||||
|
||||
function this.update_twin_wine(player)
|
||||
@@ -739,8 +840,8 @@ function this.update_twin_wine(player)
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "twin_wine", nil, nil,
|
||||
chain_death_match_shell, chain_death_match_shell_life_timer_field);
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "twin_wine", this.get_weapon_skill_name,
|
||||
nil, nil, chain_death_match_shell, chain_death_match_shell_life_timer_field);
|
||||
end
|
||||
|
||||
function this.update_sword_and_shield_skills(player)
|
||||
@@ -750,8 +851,8 @@ function this.update_sword_and_shield_skills(player)
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "destroyer_oil", nil, nil,
|
||||
player, get_oil_buff_timer_method, player_user_data_short_sword, oil_buff_time_field);
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "destroyer_oil", this.get_weapon_skill_name,
|
||||
nil, nil, player, get_oil_buff_timer_method, player_user_data_short_sword, oil_buff_time_field);
|
||||
end
|
||||
|
||||
function this.update_dual_blades_skills(player)
|
||||
@@ -763,8 +864,10 @@ function this.update_dual_blades_skills(player)
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "ironshine_silk", nil, nil,
|
||||
player, get_sharpness_recovery_buff_valid_timer_method, player_user_data_dual_blades, sharpness_recovery_buff_valid_max_timer_field);
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "ironshine_silk", this.get_weapon_skill_name,
|
||||
nil, nil, player,
|
||||
get_sharpness_recovery_buff_valid_timer_method,
|
||||
player_user_data_dual_blades, sharpness_recovery_buff_valid_max_timer_field);
|
||||
end
|
||||
|
||||
function this.update_archdemon_mode(player)
|
||||
@@ -790,7 +893,7 @@ function this.update_archdemon_mode(player)
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "archdemon_mode", 1, kijin_kyouka_gauge);
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "archdemon_mode", this.get_weapon_skill_name, 1, kijin_kyouka_gauge);
|
||||
end
|
||||
|
||||
function this.update_hunting_horn_skills(player)
|
||||
@@ -803,8 +906,8 @@ function this.update_hunting_horn_skills(player)
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "silkbind_shockwave", nil, nil,
|
||||
player, horn_impact_pulls_timer_field, player_user_data_horn, horn_impact_pulls_duration_field);
|
||||
buffs.update_generic_buff(this.list, weapon_skills_type_name, "silkbind_shockwave", this.get_weapon_skill_name,
|
||||
nil, nil, player, horn_impact_pulls_timer_field, player_user_data_horn, horn_impact_pulls_duration_field);
|
||||
end
|
||||
|
||||
function this.update_bead_of_resonance()
|
||||
@@ -864,7 +967,7 @@ function this.update_bead_of_resonance()
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "bead_of_resonance", 1, life_timer);
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "bead_of_resonance", this.get_weapon_skill_name, 1, life_timer);
|
||||
end
|
||||
|
||||
function this.update_sonic_bloom(player)
|
||||
@@ -885,7 +988,7 @@ function this.update_sonic_bloom(player)
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "sonic_bloom", 1, life_timer);
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "sonic_bloom", this.get_weapon_skill_name, 1, life_timer);
|
||||
end
|
||||
|
||||
function this.update_charge_blade_skills(player)
|
||||
@@ -934,7 +1037,7 @@ function this.update_element_boost(player, player_user_data_charge_axe)
|
||||
end
|
||||
end
|
||||
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "element_boost", 1, shield_buff_timer, duration);
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "element_boost", this.get_weapon_skill_name, 1, shield_buff_timer, duration);
|
||||
end
|
||||
|
||||
function this.update_sword_boost_mode(player, player_user_data_charge_axe)
|
||||
@@ -955,7 +1058,8 @@ function this.update_sword_boost_mode(player, player_user_data_charge_axe)
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "sword_boost_mode", 1, sword_buff_timer / 60, sword_buff_time_duration / 60);
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "sword_boost_mode", this.get_weapon_skill_name, 1,
|
||||
sword_buff_timer / 60, sword_buff_time_duration / 60);
|
||||
end
|
||||
|
||||
function this.update_insect_glaive_skills(player)
|
||||
@@ -968,9 +1072,9 @@ function this.update_insect_glaive_skills(player)
|
||||
return;
|
||||
end
|
||||
|
||||
this.update_extract(player, "red_extract", get_red_extractive_time_method, red_extractive_max_time_field)
|
||||
this.update_extract(player, "white_extract", get_white_extractive_time_method, white_extractive_max_time_field)
|
||||
this.update_extract(player, "orange_extract", get_orange_extractive_time_method, orange_extractive_max_time_field)
|
||||
this.update_extract(player, "red_extract", get_red_extractive_time_method, red_extractive_max_time_field);
|
||||
this.update_extract(player, "white_extract", get_white_extractive_time_method, white_extractive_max_time_field);
|
||||
this.update_extract(player, "orange_extract", get_orange_extractive_time_method, orange_extractive_max_time_field);
|
||||
end
|
||||
|
||||
function this.update_all_extracts_mix(player)
|
||||
@@ -1002,7 +1106,8 @@ function this.update_all_extracts_mix(player)
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "all_extracts_mix", 1, red_extractive_time, all_extractive_max_time);
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, "all_extracts_mix", this.get_weapon_skill_name, 1,
|
||||
red_extractive_time, all_extractive_max_time);
|
||||
end
|
||||
|
||||
function this.update_extract(player, extract_key, time_holder, max_time_holder)
|
||||
@@ -1047,7 +1152,7 @@ function this.update_extract(player, extract_key, time_holder, max_time_holder)
|
||||
duration = extractive_max_time;
|
||||
end
|
||||
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, extract_key, 1, extractive_time, duration);
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, extract_key, this.get_weapon_skill_name, 1, extractive_time, duration);
|
||||
end
|
||||
|
||||
function this.update_bow_skills(player)
|
||||
@@ -1079,21 +1184,30 @@ function this.update_bow_skill(player, bow_skill_key, timer_holder, player_user_
|
||||
return;
|
||||
end
|
||||
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, bow_skill_key, 1, timer / 60, max_time / 60);
|
||||
buffs.update_generic(this.list, weapon_skills_type_name, bow_skill_key, this.get_weapon_skill_name, 1, timer / 60, max_time / 60);
|
||||
end
|
||||
|
||||
function this.init_names()
|
||||
for weapon_skill_key, weapon_skill in pairs(this.list) do
|
||||
local name = language.current_language.weapon_skills[weapon_skill_key];
|
||||
|
||||
if name == nil then
|
||||
name = weapon_skill_key;
|
||||
end
|
||||
|
||||
weapon_skill.name = name;
|
||||
weapon_skill.name = this.get_weapon_skill_name(weapon_skill_key);
|
||||
end
|
||||
end
|
||||
|
||||
function this.get_weapon_skill_name(weapon_skill_key)
|
||||
if weapon_skill_ids[weapon_skill_key] == nil then
|
||||
return language.current_language.weapon_skills[weapon_skill_key];
|
||||
else
|
||||
local weapon_skill_name = get_name_method:call(nil, weapon_skill_ids[weapon_skill_key]);
|
||||
if weapon_skill_name == nil then
|
||||
error_handler.report("weapon_skills.get_weapon_skill_name", string.format("Failed to access Data: %s_name", weapon_skill_key));
|
||||
return weapon_skill_key;
|
||||
end
|
||||
|
||||
return weapon_skill_name;
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function this.init_dependencies()
|
||||
buffs = require("MHR_Overlay.Buffs.buffs");
|
||||
config = require("MHR_Overlay.Misc.config");
|
||||
|
||||
Reference in New Issue
Block a user