mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-10 07:30:01 +00:00
autoshift: use locale independent checks
This commit is contained in:
Vendored
-11
@@ -27,17 +27,6 @@ pfUI_locale["deDE"]["itemtypes"] = {
|
||||
["INVTYPE_THROWN"] = "Wurfwaffe",
|
||||
}
|
||||
|
||||
pfUI_locale["deDE"]["stances"] = {
|
||||
['BattleStance'] = "Kampfhaltung",
|
||||
['DefensiveStance'] = "Verteidigungshaltung",
|
||||
['BerserkerStance'] = "Berserkerhaltung",
|
||||
['wantBattleStance'] = "Muss in Kampfhaltung sein.",
|
||||
['wantDefensiveStance'] = "Muss in Verteidigungshaltung sein.",
|
||||
['wantBerserkerStance'] = "Muss in Berserkerhaltung sein.",
|
||||
['wantBattleDefStance'] = "Muss in Kampfhaltung, Verteidigungshaltung sein.",
|
||||
['wantBattleBerserkStance'] = "Muss in Kampfhaltung, Berserkerhaltung sein.",
|
||||
}
|
||||
|
||||
pfUI_locale["deDE"]["interrupts"] = {
|
||||
["Schildhieb"] = true;
|
||||
["Zuschlagen"] = true;
|
||||
|
||||
Vendored
-11
@@ -27,17 +27,6 @@ pfUI_locale["enUS"]["itemtypes"] = {
|
||||
["INVTYPE_THROWN"] = "Thrown",
|
||||
}
|
||||
|
||||
pfUI_locale["enUS"]["stances"] = {
|
||||
['BattleStance'] = "Battle Stance",
|
||||
['DefensiveStance'] = "Defensive Stance",
|
||||
['BerserkerStance'] = "Berserker Stance",
|
||||
['wantBattleStance'] = "Must be in Battle Stance",
|
||||
['wantDefensiveStance'] = "Must be in Defensive Stance",
|
||||
['wantBerserkerStance'] = "Must be in Berserker Stance",
|
||||
['wantBattleDefStance'] = "Must be in Battle Stance, Defensive Stance",
|
||||
['wantBattleBerserkStance'] = "Must be in Battle Stance, Berserker Stance",
|
||||
}
|
||||
|
||||
pfUI_locale["enUS"]["interrupts"] = {
|
||||
["Shield Bash"] = true;
|
||||
["Pummel"] = true;
|
||||
|
||||
Vendored
-11
@@ -27,17 +27,6 @@ pfUI_locale["frFR"]["itemtypes"] = {
|
||||
["INVTYPE_THROWN"] = "Arme de jet",
|
||||
}
|
||||
|
||||
pfUI_locale["frFR"]["stances"] = {
|
||||
['BattleStance'] = "Posture de combat",
|
||||
['DefensiveStance'] = "Posture défensive",
|
||||
['BerserkerStance'] = "Posture berserker",
|
||||
['wantBattleStance'] = "Requiert Posture de combat",
|
||||
['wantDefensiveStance'] = "Requiert Posture défensive",
|
||||
['wantBerserkerStance'] = "Requiert Posture berserker",
|
||||
['wantBattleDefStance'] = "Requiert Posture de combat, Posture défensive",
|
||||
['wantBattleBerserkStance'] = "Requiert Posture de combat, Posture berserker",
|
||||
}
|
||||
|
||||
pfUI_locale["frFR"]["interrupts"] = {
|
||||
["Coup de bouclier"] = true;
|
||||
["Volée de coups"] = true;
|
||||
|
||||
Vendored
-11
@@ -27,17 +27,6 @@ pfUI_locale["koKR"]["itemtypes"] = {
|
||||
["INVTYPE_THROWN"] = "투척류",
|
||||
}
|
||||
|
||||
pfUI_locale["koKR"]["stances"] = {
|
||||
['BattleStance'] = "전투 태세",
|
||||
['DefensiveStance'] = "방어 태세",
|
||||
['BerserkerStance'] = "광폭 태세",
|
||||
['wantBattleStance'] = "전투 태세 필요",
|
||||
['wantDefensiveStance'] = "방어 태세 필요",
|
||||
['wantBerserkerStance'] = "광폭 태세 필요",
|
||||
['wantBattleDefStance'] = "전투 태세 필요, 방어 태세 필요",
|
||||
['wantBattleBerserkStance'] = "전투 태세 필요, 공폭 태세 필요",
|
||||
}
|
||||
|
||||
pfUI_locale["koKR"]["interrupts"] = {
|
||||
["방패 가격"] = true;
|
||||
["자루 공격"] = true;
|
||||
|
||||
Vendored
-11
@@ -27,17 +27,6 @@ pfUI_locale["ruRU"]["itemtypes"] = {
|
||||
["INVTYPE_THROWN"] = "Метательное",
|
||||
}
|
||||
|
||||
pfUI_locale["ruRU"]["stances"] = {
|
||||
['BattleStance'] = "Боевая стойка",
|
||||
['DefensiveStance'] = "Оборонительная стойка",
|
||||
['BerserkerStance'] = "Стойка берсерка",
|
||||
['wantBattleStance'] = "Необходимо находиться в Боевая стойка.",
|
||||
['wantDefensiveStance'] = "Необходимо находиться в Оборонительная стойка.",
|
||||
['wantBerserkerStance'] = "Необходимо находиться в Стойка берсерка.",
|
||||
['wantBattleDefStance'] = "Необходимо находиться в Боевая стойка, Оборонительная стойка.",
|
||||
['wantBattleBerserkStance'] = "Необходимо находиться в Боевая стойка, Стойка берсерка.",
|
||||
}
|
||||
|
||||
pfUI_locale["ruRU"]["interrupts"] = {
|
||||
["Удар щитом"] = true;
|
||||
["Зуботычина"] = true;
|
||||
|
||||
Vendored
-11
@@ -27,17 +27,6 @@ pfUI_locale["zhCN"]["itemtypes"] = {
|
||||
["INVTYPE_THROWN"] = "投掷武器",
|
||||
}
|
||||
|
||||
pfUI_locale["zhCN"]["stances"] = {
|
||||
['BattleStance'] = "战斗姿态",
|
||||
['DefensiveStance'] = "防御姿态",
|
||||
['BerserkerStance'] = "狂暴姿态",
|
||||
['wantBattleStance'] = "必须在战斗姿态中",
|
||||
['wantDefensiveStance'] = "必须在防御姿态中",
|
||||
['wantBerserkerStance'] = "必须在狂暴姿态中",
|
||||
['wantBattleDefStance'] = "必须在战斗姿态, 防御姿态中",
|
||||
['wantBattleBerserkStance'] = "必须在战斗姿态, 狂暴姿态中",
|
||||
}
|
||||
|
||||
pfUI_locale["zhCN"]["interrupts"] = {
|
||||
["盾击"] = true;
|
||||
["拳击"] = true;
|
||||
|
||||
+12
-35
@@ -4,50 +4,27 @@ pfUI:RegisterModule("autoshift", function ()
|
||||
|
||||
pfUI.autoshift.lastError = ""
|
||||
pfUI.autoshift.CastSpellByName = _G["CastSpellByName"]
|
||||
pfUI.autoshift.scanString = string.gsub(SPELL_FAILED_ONLY_SHAPESHIFT, "%%s", "(.+)")
|
||||
|
||||
hooksecurefunc("CastSpell", function(spellId, spellbookTabNum)
|
||||
if pfUI.autoshift.lastError == L["stances"]['wantBattleStance'] then
|
||||
pfUI.autoshift.CastSpellByName(L["stances"]['BattleStance'])
|
||||
elseif pfUI.autoshift.lastError == L["stances"]['wantBattleDefStance'] then
|
||||
pfUI.autoshift.CastSpellByName(L["stances"]['BattleStance'])
|
||||
elseif pfUI.autoshift.lastError == L["stances"]['wantBattleBerserkStance'] then
|
||||
pfUI.autoshift.CastSpellByName(L["stances"]['BerserkerStance'])
|
||||
elseif pfUI.autoshift.lastError == L["stances"]['wantBerserkerStance'] then
|
||||
pfUI.autoshift.CastSpellByName(L["stances"]['BerserkerStance'])
|
||||
elseif pfUI.autoshift.lastError == L["stances"]['wantDefensiveStance'] then
|
||||
pfUI.autoshift.CastSpellByName(L["stances"]['DefensiveStance'])
|
||||
function pfUI.autoshift:SwitchStance()
|
||||
for stance in string.gfind(pfUI.autoshift.lastError, pfUI.autoshift.scanString) do
|
||||
for _, stance in pairs({ strsplit(",", stance)}) do
|
||||
pfUI.autoshift.CastSpellByName(string.gsub(stance,"^%s*(.-)%s*$", "%1"))
|
||||
end
|
||||
end
|
||||
pfUI.autoshift.lastError = ""
|
||||
end
|
||||
|
||||
hooksecurefunc("CastSpell", function(spellId, spellbookTabNum)
|
||||
pfUI.autoshift:SwitchStance()
|
||||
end)
|
||||
|
||||
hooksecurefunc("CastSpellByName", function(spellName, onSelf)
|
||||
if pfUI.autoshift.lastError == L["stances"]['wantBattleStance'] then
|
||||
pfUI.autoshift.CastSpellByName(L["stances"]['BattleStance'])
|
||||
elseif pfUI.autoshift.lastError == L["stances"]['wantBattleDefStance'] then
|
||||
pfUI.autoshift.CastSpellByName(L["stances"]['BattleStance'])
|
||||
elseif pfUI.autoshift.lastError == L["stances"]['wantBattleBerserkStance'] then
|
||||
pfUI.autoshift.CastSpellByName(L["stances"]['BerserkerStance'])
|
||||
elseif pfUI.autoshift.lastError == L["stances"]['wantBerserkerStance'] then
|
||||
pfUI.autoshift.CastSpellByName(L["stances"]['BerserkerStance'])
|
||||
elseif pfUI.autoshift.lastError == L["stances"]['wantDefensiveStance'] then
|
||||
pfUI.autoshift.CastSpellByName(L["stances"]['DefensiveStance'])
|
||||
end
|
||||
pfUI.autoshift.lastError = ""
|
||||
pfUI.autoshift:SwitchStance()
|
||||
end)
|
||||
|
||||
hooksecurefunc("UseAction", function(slot, checkCursor, onSelf)
|
||||
if pfUI.autoshift.lastError == L["stances"]['wantBattleStance'] then
|
||||
pfUI.autoshift.CastSpellByName(L["stances"]['BattleStance'])
|
||||
elseif pfUI.autoshift.lastError == L["stances"]['wantBattleDefStance'] then
|
||||
pfUI.autoshift.CastSpellByName(L["stances"]['BattleStance'])
|
||||
elseif pfUI.autoshift.lastError == L["stances"]['wantBattleBerserkStance'] then
|
||||
pfUI.autoshift.CastSpellByName(L["stances"]['BerserkerStance'])
|
||||
elseif pfUI.autoshift.lastError == L["stances"]['wantBerserkerStance'] then
|
||||
pfUI.autoshift.CastSpellByName(L["stances"]['BerserkerStance'])
|
||||
elseif pfUI.autoshift.lastError == L["stances"]['wantDefensiveStance'] then
|
||||
pfUI.autoshift.CastSpellByName(L["stances"]['DefensiveStance'])
|
||||
end
|
||||
pfUI.autoshift.lastError = ""
|
||||
pfUI.autoshift:SwitchStance()
|
||||
end)
|
||||
|
||||
pfUI.autoshift.buffs = { "spell_nature_swiftness", "_mount_", "_qirajicrystal_",
|
||||
|
||||
Reference in New Issue
Block a user