From 5f62acacb15d0379d8540755cebee420ed3ffeac Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 4 Nov 2024 12:25:03 +0100 Subject: [PATCH] libpredict: convert strings into locale tables --- env/locales_deDE.lua | 5 +++++ env/locales_enUS.lua | 5 +++++ env/locales_esES.lua | 5 +++++ env/locales_frFR.lua | 5 +++++ env/locales_koKR.lua | 5 +++++ env/locales_ruRU.lua | 5 +++++ env/locales_zhCN.lua | 5 +++++ libs/libpredict.lua | 15 +++++---------- 8 files changed, 40 insertions(+), 10 deletions(-) diff --git a/env/locales_deDE.lua b/env/locales_deDE.lua index b1583bc9..4954d664 100644 --- a/env/locales_deDE.lua +++ b/env/locales_deDE.lua @@ -12,6 +12,11 @@ pfUI_locale["deDE"]["class"] = { ["Schurke"] = "ROGUE", } +pfUI_locale["deDE"]["healduration"] = { + ["Rejuvenation"] = "Erhöht die Dauer Eures Zaubers 'Verjüngung' um 3 Sek.", + ["Renew"] = "Erhöht die Wirkungsdauer von 'Erneuerung' um 3 Sek.", +} + pfUI_locale["deDE"]["bagtypes"] = { ["Köcher"] = "QUIVER", ["Seelentasche"] = "SOULBAG", diff --git a/env/locales_enUS.lua b/env/locales_enUS.lua index 44d7738b..d4455810 100644 --- a/env/locales_enUS.lua +++ b/env/locales_enUS.lua @@ -12,6 +12,11 @@ pfUI_locale["enUS"]["class"] = { ["Rogue"] = "ROGUE", } +pfUI_locale["enUS"]["healduration"] = { + ["Rejuvenation"] = "Increases the duration of your Rejuvenation spell by 3 sec.", + ["Renew"] = "Increases the duration of your Renew spell by 3 sec.", +} + pfUI_locale["enUS"]["bagtypes"] = { ["Quiver"] = "QUIVER", ["Soul Bag"] = "SOULBAG", diff --git a/env/locales_esES.lua b/env/locales_esES.lua index ca5c316b..be711b10 100644 --- a/env/locales_esES.lua +++ b/env/locales_esES.lua @@ -12,6 +12,11 @@ pfUI_locale["esES"]["class"] = { ["Pícaro"] = "ROGUE", } +pfUI_locale["esES"]["healduration"] = { + ["Rejuvenation"] = "Aumenta 3 s la duración de tu hechizo Rejuvenecimiento.", + ["Renew"] = "Aumenta en 3 s la duración de tu hechizo Renovar.", +} + pfUI_locale["esES"]["bagtypes"] = { ["Carcaj"] = "QUIVER", ["Bolsa de almas"] = "SOULBAG", diff --git a/env/locales_frFR.lua b/env/locales_frFR.lua index f754a6e2..6e60a4b6 100644 --- a/env/locales_frFR.lua +++ b/env/locales_frFR.lua @@ -12,6 +12,11 @@ pfUI_locale["frFR"]["class"] = { ["Voleur"] = "ROGUE", } +pfUI_locale["frFR"]["healduration"] = { + ["Rejuvenation"] = "Augmente la durée de votre sort Récupération de 3 sec.", + ["Renew"] = "Augmente la durée de votre sort Rénovation de 3 sec.", +} + pfUI_locale["frFR"]["bagtypes"] = { ["Carquois"] = "QUIVER", ["Sac d'âme"] = "SOULBAG", diff --git a/env/locales_koKR.lua b/env/locales_koKR.lua index a485b51c..46a8b94b 100644 --- a/env/locales_koKR.lua +++ b/env/locales_koKR.lua @@ -12,6 +12,11 @@ pfUI_locale["koKR"]["class"] = { ["도적"] = "ROGUE", } +pfUI_locale["koKR"]["healduration"] = { + ["Rejuvenation"] = "회복의 지속시간이 3초만큼 증가합니다.", + ["Renew"] = "소생의 지속시간이 3초만큼 증가합니다.", +} + pfUI_locale["koKR"]["bagtypes"] = { ["화살통"] = "QUIVER", ["영혼의 가방"] = "SOULBAG", diff --git a/env/locales_ruRU.lua b/env/locales_ruRU.lua index 06c0e31d..ae6ae7f9 100644 --- a/env/locales_ruRU.lua +++ b/env/locales_ruRU.lua @@ -12,6 +12,11 @@ pfUI_locale["ruRU"]["class"] = { ["Разбойник"] = "ROGUE", } +pfUI_locale["ruRU"]["healduration"] = { + ["Rejuvenation"] = "Увеличивает время действия "Омоложения" на 3 сек.", + ["Renew"] = "Продлевает действие "Обновления" на 3 сек.", +} + pfUI_locale["ruRU"]["bagtypes"] = { ["Колчан"] = "QUIVER", ["Сумка душ"] = "SOULBAG", diff --git a/env/locales_zhCN.lua b/env/locales_zhCN.lua index 7a54d209..c6ea110b 100644 --- a/env/locales_zhCN.lua +++ b/env/locales_zhCN.lua @@ -12,6 +12,11 @@ pfUI_locale["zhCN"]["class"] = { ["盗贼"] = "ROGUE", } +pfUI_locale["zhCN"]["healduration"] = { + ["Rejuvenation"] = "使你的回春术的持续时间延长3秒。", + ["Renew"] = "使你的恢复术的持续时间延长3秒。", +} + pfUI_locale["zhCN"]["bagtypes"] = { ["箭袋"] = "QUIVER", ["灵魂袋"] = "SOULBAG", diff --git a/libs/libpredict.lua b/libs/libpredict.lua index fde38b2a..701c83d3 100644 --- a/libs/libpredict.lua +++ b/libs/libpredict.lua @@ -386,14 +386,7 @@ libpredict.sender:RegisterEvent("SPELLCAST_DELAYED") libpredict.sender:RegisterEvent("UNIT_INVENTORY_CHANGED") libpredict.sender:RegisterEvent("SKILL_LINES_CHANGED") -local hotBonusScanner = libtipscan:GetScanner("hotsetbonus") -local function getSetBonus() - hotBonusScanner:SetInventoryItem("player", 1) - if hotBonusScanner:Find(T["Set: Increases the duration of your Rejuvenation spell by 3 sec."]) then return true end - if hotBonusScanner:Find(T["Set: Increases the duration of your Renew spell by 3 sec."]) then return true end - return false -end - +local hotsetbonus = libtipscan:GetScanner("hotsetbonus") local regrowthCancel = false function libpredict.triggerRegrowth(target, duration) @@ -509,10 +502,12 @@ libpredict.sender:SetScript("OnEvent", function() libpredict:HealStop(player) if pfUI.client < 20000 then -- vanilla if spell_queue[1] == "Rejuvenation" then - local duration = getSetBonus() and 15 or 12 + hotsetbonus:SetInventoryItem("player", 1) + local duration = hotsetbonus:Find(L["healduration"]["Rejuvenation"]) and 15 or 12 libpredict.sender:SendHealCommMsg("Reju/"..spell_queue[3].."/"..duration.."/") elseif spell_queue[1] == "Renew" then - local duration = getSetBonus() and 15 or 12 + hotsetbonus:SetInventoryItem("player", 1) + local duration = hotsetbonus:Find(L["healduration"]["Renew"]) and 15 or 12 libpredict.sender:SendHealCommMsg("Renew/"..spell_queue[3].."/"..duration.."/") elseif spell_queue[1] == "Regrowth" then local duration = 21 --Made this a variable even tho it is static in case future items mess with it