From 123e46619d85112d34fe6c92f90e6ce00ea83dd8 Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 8 Aug 2016 00:05:24 +0200 Subject: [PATCH] use client locales to detect target castbar spells --- modules/castbar.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/castbar.lua b/modules/castbar.lua index 961af6f5..52fab510 100644 --- a/modules/castbar.lua +++ b/modules/castbar.lua @@ -255,27 +255,27 @@ pfUI:RegisterModule("castbar", function () pfUI.castbar.target:SetScript("OnEvent", function() if (arg1 ~= nil) then - for mob, spell in string.gfind(arg1, pfLocaleSpellEvents["deDE"]['SPELL_CAST']) do + for mob, spell in string.gfind(arg1, pfLocaleSpellEvents[GetLocale()]['SPELL_CAST']) do pfUI.castbar.target:Action(mob, spell, "casts") return end - for mob, spell in string.gfind(arg1, pfLocaleSpellEvents["deDE"]['SPELL_PERFORM']) do + for mob, spell in string.gfind(arg1, pfLocaleSpellEvents[GetLocale()]['SPELL_PERFORM']) do pfUI.castbar.target:Action(mob, spell, "performs") return end - for mob, spell in string.gfind(arg1, pfLocaleSpellEvents["deDE"]['SPELL_GAINS']) do + for mob, spell in string.gfind(arg1, pfLocaleSpellEvents[GetLocale()]['SPELL_GAINS']) do pfUI.castbar.target:Action(mob, spell, "gains") return end - for mob, spell in string.gfind(arg1, pfLocaleSpellEvents["deDE"]['SPELL_AFFLICTED']) do + for mob, spell in string.gfind(arg1, pfLocaleSpellEvents[GetLocale()]['SPELL_AFFLICTED']) do pfUI.castbar.target:Action(mob, spell, "afflicted") return end - for spell, mob in string.gfind(arg1, pfLocaleSpellEvents["deDE"]['SPELL_HIT']) do + for spell, mob in string.gfind(arg1, pfLocaleSpellEvents[GetLocale()]['SPELL_HIT']) do pfUI.castbar.target:Action(mob, spell, "hit") return end - for spell, mob in string.gfind(arg1, pfLocaleSpellEvents["deDE"]['OTHER_SPELL_HIT']) do + for spell, mob in string.gfind(arg1, pfLocaleSpellEvents[GetLocale()]['OTHER_SPELL_HIT']) do pfUI.castbar.target:Action(mob, spell, "hit") return end @@ -314,9 +314,9 @@ pfUI:RegisterModule("castbar", function () end) function pfUI.castbar.target:Action(mob, spell, special) - if pfLocaleSpells["deDE"][spell] ~= nil then - casttime = pfLocaleSpells["deDE"][spell].t / 1000 - icon = pfLocaleSpells["deDE"][spell].icon + if pfLocaleSpells[GetLocale()][spell] ~= nil then + casttime = pfLocaleSpells[GetLocale()][spell].t / 1000 + icon = pfLocaleSpells[GetLocale()][spell].icon pfUI.castbar.target.casterDB[mob] = {cast = spell, starttime = GetTime(), casttime = casttime, icon = icon} if UnitExists("target") and pfUI.castbar.target.casterDB[UnitName("target")] then pfUI.castbar.target:Show()