mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 07:36:56 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8bf6672114 | |||
| 29b948e6fa |
+4
-4
@@ -73,8 +73,8 @@ end
|
||||
|
||||
local function BuffOnClick()
|
||||
if this:GetParent().label == "player" then
|
||||
local bid = GetPlayerBuff(PLAYER_BUFF_START_ID + this.id, "HELPFUL")
|
||||
if bid >= 0 then CancelPlayerBuff(bid) end
|
||||
local aura = C_UnitAuras.GetAuraDataByIndex("player", this.id, "HELPFUL")
|
||||
if aura and aura.spellId then C_Spell.CancelSpellByID(aura.spellId) end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -114,8 +114,8 @@ end
|
||||
|
||||
local function DebuffOnClick()
|
||||
if this:GetParent().label == "player" then
|
||||
local bid = GetPlayerBuff(PLAYER_BUFF_START_ID + this.id, "HARMFUL")
|
||||
if bid >= 0 then CancelPlayerBuff(bid) end
|
||||
local aura = C_UnitAuras.GetAuraDataByIndex("player", this.id, "HARMFUL")
|
||||
if aura and aura.spellId then C_Spell.CancelSpellByID(aura.spellId) end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+3
-3
@@ -60,6 +60,7 @@ pfUI:RegisterModule("buff", function ()
|
||||
buff.mode = buff.btype
|
||||
buff.expirationTime = aura.expirationTime
|
||||
buff.stackCount = aura.applications
|
||||
buff.spellId = aura.spellId
|
||||
buff.texture:SetTexture(aura.icon)
|
||||
|
||||
if buff.btype == "HARMFUL" then
|
||||
@@ -146,9 +147,8 @@ pfUI:RegisterModule("buff", function ()
|
||||
CancelItemTempEnchantment(1)
|
||||
elseif CancelItemTempEnchantment and this.mode and this.mode == "OFFHAND" then
|
||||
CancelItemTempEnchantment(2)
|
||||
else
|
||||
local bid = GetPlayerBuff(PLAYER_BUFF_START_ID + this.id, this.btype)
|
||||
if bid >= 0 then CancelPlayerBuff(bid) end
|
||||
elseif this.spellId then
|
||||
C_Spell.CancelSpellByID(this.spellId)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
@@ -99,8 +99,8 @@ pfUI:RegisterModule("buffwatch", function ()
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffcc" .. skill .. "|r" .. T["is now blacklisted."])
|
||||
end
|
||||
elseif this.parent.unit == "player" then
|
||||
local bid = GetPlayerBuff(PLAYER_BUFF_START_ID + this.id, this.type)
|
||||
if bid >= 0 then CancelPlayerBuff(bid) end
|
||||
local aura = C_UnitAuras.GetAuraDataByIndex("player", this.id, this.type)
|
||||
if aura and aura.spellId then C_Spell.CancelSpellByID(aura.spellId) end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -136,22 +136,19 @@ pfUI:RegisterSkin("Character", function ()
|
||||
end
|
||||
end
|
||||
|
||||
HookScript(CharacterFrame, "OnShow", function()
|
||||
hooksecurefunc("CharacterFrame_OnShow", function()
|
||||
RefreshCharacterSlots()
|
||||
RefreshPetPosition()
|
||||
end)
|
||||
|
||||
if not this.hooked then
|
||||
hooksecurefunc("PaperDollItemSlotButton_Update", function()
|
||||
-- update only character slots!
|
||||
if string.find(this:GetName(), "^Character.-Slot$") then
|
||||
RefreshCharacterSlot(this)
|
||||
end
|
||||
end)
|
||||
hooksecurefunc("PetTab_Update", RefreshPetPosition)
|
||||
this.hooked = true
|
||||
hooksecurefunc("PaperDollItemSlotButton_Update", function()
|
||||
if this:GetParent() == PaperDollFrame then
|
||||
RefreshCharacterSlot(this)
|
||||
end
|
||||
end)
|
||||
|
||||
hooksecurefunc("PetTab_Update", RefreshPetPosition)
|
||||
|
||||
StripTextures(PaperDollFrame)
|
||||
StripTextures(CharacterAttributesFrame)
|
||||
StripTextures(CharacterResistanceFrame)
|
||||
|
||||
Reference in New Issue
Block a user