libdebuff: add hit handler for paladin judgements

This commit is contained in:
shagu
2019-05-11 04:45:53 +02:00
parent 4aba54b58b
commit 96ad072478
8 changed files with 74 additions and 1 deletions
+7
View File
@@ -132,6 +132,13 @@ pfUI_locale["deDE"]["dyndebuffs"] = {
["Gouge"] = "Solarplexus",
}
pfUI_locale["deDE"]["judgements"] = {
["Richturteil der Gerechtigkeit"] = true,
["Richturteil des Lichts"] = true,
["Richturteil der Weisheit"] = true,
["Richturteil des Kreuzfahrers"] = true,
}
pfUI_locale["deDE"]["interrupts"] = {
["Schildhieb"] = true,
["Zuschlagen"] = true,
+7
View File
@@ -132,6 +132,13 @@ pfUI_locale["enUS"]["dyndebuffs"] = {
["Gouge"] = "Gouge",
}
pfUI_locale["enUS"]["judgements"] = {
["Judgement of Justice"] = true,
["Judgement of Light"] = true,
["Judgement of Wisdom"] = true,
["Judgement of the Crusader"] = true,
}
pfUI_locale["enUS"]["interrupts"] = {
["Shield Bash"] = true,
["Pummel"] = true,
+7
View File
@@ -132,6 +132,13 @@ pfUI_locale["esES"]["dyndebuffs"] = {
["Gouge"] = "Incapacitación",
}
pfUI_locale["esES"]["judgements"] = {
["Sentencia de Justicia"] = true,
["Sentencia de Luz"] = true,
["Sentencia de Sabiduría"] = true,
["Sentencia del Cruzado"] = true,
}
pfUI_locale["esES"]["interrupts"] = {
["Azote de escudo"] = true,
["Zurrar"] = true,
+7
View File
@@ -127,6 +127,13 @@ pfUI_locale["frFR"]["dyndebuffs"] = {
["Gouge"] = "Suriner",
}
pfUI_locale["frFR"]["judgements"] = {
["Jugement de justice"] = true,
["Jugement de lumière"] = true,
["Jugement de sagesse"] = true,
["Jugement du Croisé"] = true,
}
pfUI_locale["frFR"]["interrupts"] = {
["Coup de bouclier"] = true,
["Volée de coups"] = true,
+7
View File
@@ -132,6 +132,13 @@ pfUI_locale["koKR"]["dyndebuffs"] = {
["Gouge"] = "후려치기",
}
pfUI_locale["koKR"]["judgements"] = {
["정의의 심판"] = true,
["빛의 심판"] = true,
["지혜의 심판"] = true,
["성전사의 심판"] = true,
}
pfUI_locale["koKR"]["interrupts"] = {
["방패 가격"] = true,
["자루 공격"] = true,
+7
View File
@@ -132,6 +132,13 @@ pfUI_locale["ruRU"]["dyndebuffs"] = {
["Gouge"] = "Парализующий удар",
}
pfUI_locale["ruRU"]["judgements"] = {
["Правосудие справедливости"] = true,
["Правосудие света"] = true,
["Правосудие мудрости"] = true,
["Правосудие воина света"] = true,
}
pfUI_locale["ruRU"]["interrupts"] = {
["Удар щитом"] = true,
["Зуботычина"] = true,
+7
View File
@@ -127,6 +127,13 @@ pfUI_locale["zhCN"]["dyndebuffs"] = {
["Gouge"] = "凿击",
}
pfUI_locale["zhCN"]["judgements"] = {
["公正审判"] = true,
["圣光审判"] = true,
["智慧审判"] = true,
["十字军审判"] = true,
}
pfUI_locale["zhCN"]["interrupts"] = {
["盾击"] = true,
["拳击"] = true,
+25 -1
View File
@@ -18,6 +18,7 @@ if pfUI.api.libdebuff then return end
local libdebuff = CreateFrame("Frame", "pfdebuffsScanner", UIParent)
local scanner = libtipscan:GetScanner("libdebuff")
local _, class = UnitClass("player")
local lastspell
function libdebuff:GetDuration(effect, rank)
@@ -128,6 +129,11 @@ libdebuff:RegisterEvent("PLAYER_TARGET_CHANGED")
libdebuff:RegisterEvent("SPELLCAST_STOP")
libdebuff:RegisterEvent("UNIT_AURA")
-- register seal handler
if class == "PALADIN" then
libdebuff:RegisterEvent("CHAT_MSG_COMBAT_SELF_HITS")
end
-- Remove Pending
libdebuff.rp = { SPELLIMMUNESELFOTHER, IMMUNEDAMAGECLASSSELFOTHER,
SPELLMISSSELFOTHER, SPELLRESISTSELFOTHER, SPELLEVADEDSELFOTHER,
@@ -143,8 +149,26 @@ libdebuff.pending = {}
-- Gather Data by Events
libdebuff:SetScript("OnEvent", function()
-- paladin seal refresh
if event == "CHAT_MSG_COMBAT_SELF_HITS" then
local hit = cmatch(arg1, COMBATHITSELFOTHER)
local crit = cmatch(arg1, COMBATHITCRITSELFOTHER)
if hit or crit then
for seal in L["judgements"] do
local name = UnitName("target")
local level = UnitLevel("target")
if name and libdebuff.objects[name] then
if level and libdebuff.objects[name][level] and libdebuff.objects[name][level][seal] then
libdebuff:AddEffect(name, level, seal)
elseif libdebuff.objects[name][0] and libdebuff.objects[name][0][seal] then
libdebuff:AddEffect(name, 0, seal)
end
end
end
end
-- Add Combat Log
if event == "CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE" or event == "CHAT_MSG_SPELL_PERIODIC_CREATURE_DAMAGE" then
elseif event == "CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE" or event == "CHAT_MSG_SPELL_PERIODIC_CREATURE_DAMAGE" then
local unit, effect = cmatch(arg1, AURAADDEDOTHERHARMFUL)
if unit and effect then
local unitlevel = UnitName("target") == unit and UnitLevel("target") or 0