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