codestyle: remove trailing semicolons

This commit is contained in:
shagu
2016-11-09 23:20:26 +01:00
parent 37fdaa5367
commit ba72fc39da
20 changed files with 219 additions and 219 deletions
+8 -8
View File
@@ -23,22 +23,22 @@ pfUI:RegisterModule("actionbar", function ()
function ActionButton_GetPagedID(button) function ActionButton_GetPagedID(button)
if ( button.isBonus and CURRENT_ACTIONBAR_PAGE == 1 ) then if ( button.isBonus and CURRENT_ACTIONBAR_PAGE == 1 ) then
local offset = GetBonusBarOffset(); local offset = GetBonusBarOffset()
if ( offset == 0 and BonusActionBarFrame and BonusActionBarFrame.lastBonusBar ) then if ( offset == 0 and BonusActionBarFrame and BonusActionBarFrame.lastBonusBar ) then
offset = BonusActionBarFrame.lastBonusBar; offset = BonusActionBarFrame.lastBonusBar
end end
return (button:GetID() + ((NUM_ACTIONBAR_PAGES + offset - 1) * NUM_ACTIONBAR_BUTTONS)); return (button:GetID() + ((NUM_ACTIONBAR_PAGES + offset - 1) * NUM_ACTIONBAR_BUTTONS))
end end
local parentName = button:GetParent():GetName(); local parentName = button:GetParent():GetName()
if ( parentName == "pfMultiBarBottomLeft" or parentName == "MultiBarBottomLeft" ) then if ( parentName == "pfMultiBarBottomLeft" or parentName == "MultiBarBottomLeft" ) then
return (button:GetID() + ((BOTTOMLEFT_ACTIONBAR_PAGE - 1) * NUM_ACTIONBAR_BUTTONS)); return (button:GetID() + ((BOTTOMLEFT_ACTIONBAR_PAGE - 1) * NUM_ACTIONBAR_BUTTONS))
elseif ( parentName == "pfMultiBarBottomRight" or parentName == "MultiBarBottomRight" ) then elseif ( parentName == "pfMultiBarBottomRight" or parentName == "MultiBarBottomRight" ) then
return (button:GetID() + ((BOTTOMRIGHT_ACTIONBAR_PAGE - 1) * NUM_ACTIONBAR_BUTTONS)); return (button:GetID() + ((BOTTOMRIGHT_ACTIONBAR_PAGE - 1) * NUM_ACTIONBAR_BUTTONS))
elseif ( parentName == "pfMultiBarLeft" or parentName == "MultiBarLeft" ) then elseif ( parentName == "pfMultiBarLeft" or parentName == "MultiBarLeft" ) then
return (button:GetID() + ((LEFT_ACTIONBAR_PAGE - 1) * NUM_ACTIONBAR_BUTTONS)); return (button:GetID() + ((LEFT_ACTIONBAR_PAGE - 1) * NUM_ACTIONBAR_BUTTONS))
elseif ( parentName == "pfMultiBarRight" or parentName == "MultiBarRight" ) then elseif ( parentName == "pfMultiBarRight" or parentName == "MultiBarRight" ) then
return (button:GetID() + ((RIGHT_ACTIONBAR_PAGE - 1) * NUM_ACTIONBAR_BUTTONS)); return (button:GetID() + ((RIGHT_ACTIONBAR_PAGE - 1) * NUM_ACTIONBAR_BUTTONS))
else else
return (button:GetID() + ((CURRENT_ACTIONBAR_PAGE - 1) * NUM_ACTIONBAR_BUTTONS)) return (button:GetID() + ((CURRENT_ACTIONBAR_PAGE - 1) * NUM_ACTIONBAR_BUTTONS))
end end
+1 -1
View File
@@ -84,7 +84,7 @@ pfUI:RegisterModule("autoshift", function ()
for id, errorstring in pairs(pfUI.autoshift.errors) do for id, errorstring in pairs(pfUI.autoshift.errors) do
if arg1 == errorstring then if arg1 == errorstring then
for i=0,15,1 do for i=0,15,1 do
currBuffTex = GetPlayerBuffTexture(i); currBuffTex = GetPlayerBuffTexture(i)
if (currBuffTex) then if (currBuffTex) then
for id, bufftype in pairs(pfUI.autoshift.buffs) do for id, bufftype in pairs(pfUI.autoshift.buffs) do
if string.find(string.lower(currBuffTex), bufftype) then if string.find(string.lower(currBuffTex), bufftype) then
+2 -2
View File
@@ -272,9 +272,9 @@ pfUI:RegisterModule("bags", function ()
else else
local bagtype local bagtype
if bag > 0 then if bag > 0 then
local _, _, id = strfind(GetInventoryItemLink("player", ContainerIDToInventoryID(bag)) or "", "item:(%d+)"); local _, _, id = strfind(GetInventoryItemLink("player", ContainerIDToInventoryID(bag)) or "", "item:(%d+)")
if id then if id then
local _, _, _, _, itemType, subType = GetItemInfo(id); local _, _, _, _, itemType, subType = GetItemInfo(id)
bagtype = pfLocaleBagtypes[pfUI.cache["locale"]][itemType] bagtype = pfLocaleBagtypes[pfUI.cache["locale"]][itemType]
bagsubtype = pfLocaleBagtypes[pfUI.cache["locale"]][subType] bagsubtype = pfLocaleBagtypes[pfUI.cache["locale"]][subType]
+4 -4
View File
@@ -47,7 +47,7 @@ pfUI:RegisterModule("buff", function ()
-- weapon enchants -- weapon enchants
for _,buff in pairs ({TempEnchant1,TempEnchant2}) do for _,buff in pairs ({TempEnchant1,TempEnchant2}) do
local icon = getglobal(buff:GetName().."Icon"); local icon = getglobal(buff:GetName().."Icon")
local border = getglobal(buff:GetName().."Border") local border = getglobal(buff:GetName().."Border")
local _, _, mainhand, _, _, offhand = GetWeaponEnchantInfo() local _, _, mainhand, _, _, offhand = GetWeaponEnchantInfo()
@@ -62,7 +62,7 @@ pfUI:RegisterModule("buff", function ()
if buff:GetID() == 16 then if buff:GetID() == 16 then
local link = GetInventoryItemLink("player", 16) local link = GetInventoryItemLink("player", 16)
local _, _, itemLink = string.find(link, "(item:%d+:%d+:%d+:%d+)"); local _, _, itemLink = string.find(link, "(item:%d+:%d+:%d+:%d+)")
local _, _, itemRarity, itemLevel, _, _, _, itemEquipLoc, _ = GetItemInfo(itemLink) local _, _, itemRarity, itemLevel, _, _, _, itemEquipLoc, _ = GetItemInfo(itemLink)
if itemRarity then buff:SetBackdropBorderColor(GetItemQualityColor(itemRarity)) end if itemRarity then buff:SetBackdropBorderColor(GetItemQualityColor(itemRarity)) end
@@ -74,7 +74,7 @@ pfUI:RegisterModule("buff", function ()
end end
elseif buff:GetID() == 17 then elseif buff:GetID() == 17 then
local link = GetInventoryItemLink("player", 17) local link = GetInventoryItemLink("player", 17)
local _, _, itemLink = string.find(link, "(item:%d+:%d+:%d+:%d+)"); local _, _, itemLink = string.find(link, "(item:%d+:%d+:%d+:%d+)")
local _, _, itemRarity, itemLevel, _, _, _, itemEquipLoc, _ = GetItemInfo(itemLink) local _, _, itemRarity, itemLevel, _, _, _, itemEquipLoc, _ = GetItemInfo(itemLink)
if itemRarity then buff:SetBackdropBorderColor(GetItemQualityColor(itemRarity)) end if itemRarity then buff:SetBackdropBorderColor(GetItemQualityColor(itemRarity)) end
if offhand and offhand > 0 then if offhand and offhand > 0 then
@@ -89,7 +89,7 @@ pfUI:RegisterModule("buff", function ()
-- buffs -- buffs
for i=0,15,1 do for i=0,15,1 do
local buff = getglobal("BuffButton" .. i) local buff = getglobal("BuffButton" .. i)
local icon = getglobal(buff:GetName().."Icon"); local icon = getglobal(buff:GetName().."Icon")
local border = getglobal(buff:GetName().."Border") local border = getglobal(buff:GetName().."Border")
if border then if border then
buff:SetBackdrop({ buff:SetBackdrop({
+57 -57
View File
@@ -15,8 +15,8 @@ pfUI:RegisterModule("castbar", function ()
pfUI.castbar.player:SetHeight(pfUI_config.global.font_size * 2) pfUI.castbar.player:SetHeight(pfUI_config.global.font_size * 2)
pfUI.castbar.player:SetPoint("TOPRIGHT",pfUI.uf.player,"BOTTOMRIGHT",0,-1) pfUI.castbar.player:SetPoint("TOPRIGHT",pfUI.uf.player,"BOTTOMRIGHT",0,-1)
pfUI.castbar.player:SetPoint("TOPLEFT",pfUI.uf.player,"BOTTOMLEFT",0,-1) pfUI.castbar.player:SetPoint("TOPLEFT",pfUI.uf.player,"BOTTOMLEFT",0,-1)
pfUI.castbar.player:Hide(); pfUI.castbar.player:Hide()
pfUI.castbar.player.delay = 0; pfUI.castbar.player.delay = 0
-- statusbar -- statusbar
pfUI.castbar.player.bar = CreateFrame("StatusBar", nil, pfUI.castbar.player) pfUI.castbar.player.bar = CreateFrame("StatusBar", nil, pfUI.castbar.player)
@@ -53,47 +53,47 @@ pfUI:RegisterModule("castbar", function ()
pfUI.castbar.player.bar.right:SetJustifyH("right") pfUI.castbar.player.bar.right:SetJustifyH("right")
-- events -- events
pfUI.castbar.player:RegisterEvent("SPELLCAST_START"); pfUI.castbar.player:RegisterEvent("SPELLCAST_START")
pfUI.castbar.player:RegisterEvent("SPELLCAST_STOP"); pfUI.castbar.player:RegisterEvent("SPELLCAST_STOP")
pfUI.castbar.player:RegisterEvent("SPELLCAST_DELAYED"); pfUI.castbar.player:RegisterEvent("SPELLCAST_DELAYED")
pfUI.castbar.player:RegisterEvent("SPELLCAST_CHANNEL_START"); pfUI.castbar.player:RegisterEvent("SPELLCAST_CHANNEL_START")
pfUI.castbar.player:RegisterEvent("SPELLCAST_CHANNEL_STOP"); pfUI.castbar.player:RegisterEvent("SPELLCAST_CHANNEL_STOP")
pfUI.castbar.player:RegisterEvent("SPELLCAST_CHANNEL_UPDATE"); pfUI.castbar.player:RegisterEvent("SPELLCAST_CHANNEL_UPDATE")
pfUI.castbar.player:RegisterEvent("SPELLCAST_FAILED"); pfUI.castbar.player:RegisterEvent("SPELLCAST_FAILED")
pfUI.castbar.player:RegisterEvent("SPELLCAST_INTERRUPTED"); pfUI.castbar.player:RegisterEvent("SPELLCAST_INTERRUPTED")
pfUI.castbar.player:SetScript("OnEvent", function () pfUI.castbar.player:SetScript("OnEvent", function ()
if ( event == "SPELLCAST_START" ) then if ( event == "SPELLCAST_START" ) then
pfUI.castbar.player.delay = 0; pfUI.castbar.player.delay = 0
pfUI.castbar.player.spell = arg1 pfUI.castbar.player.spell = arg1
pfUI.castbar.player.bar.left:SetText(arg1) pfUI.castbar.player.bar.left:SetText(arg1)
pfUI.castbar.player.bar:SetStatusBarColor(.7,.7,.9,.8) pfUI.castbar.player.bar:SetStatusBarColor(.7,.7,.9,.8)
pfUI.castbar.player.startTime = GetTime(); pfUI.castbar.player.startTime = GetTime()
pfUI.castbar.player.maxValue = pfUI.castbar.player.startTime + (arg2 / 1000); pfUI.castbar.player.maxValue = pfUI.castbar.player.startTime + (arg2 / 1000)
pfUI.castbar.player.endTime = nil pfUI.castbar.player.endTime = nil
pfUI.castbar.player.bar:SetMinMaxValues(pfUI.castbar.player.startTime, pfUI.castbar.player.maxValue); pfUI.castbar.player.bar:SetMinMaxValues(pfUI.castbar.player.startTime, pfUI.castbar.player.maxValue)
pfUI.castbar.player.bar:SetValue(pfUI.castbar.player.startTime); pfUI.castbar.player.bar:SetValue(pfUI.castbar.player.startTime)
pfUI.castbar.player.holdTime = 0; pfUI.castbar.player.holdTime = 0
pfUI.castbar.player.casting = 1; pfUI.castbar.player.casting = 1
pfUI.castbar.player.mode = "casting"; pfUI.castbar.player.mode = "casting"
pfUI.castbar.player.fadeout = nil pfUI.castbar.player.fadeout = nil
pfUI.castbar.player:SetAlpha(1) pfUI.castbar.player:SetAlpha(1)
pfUI.castbar.player:Show() pfUI.castbar.player:Show()
elseif ( event == "SPELLCAST_CHANNEL_START" ) then elseif ( event == "SPELLCAST_CHANNEL_START" ) then
pfUI.castbar.player.delay = 0; pfUI.castbar.player.delay = 0
pfUI.castbar.player.spell = arg2 pfUI.castbar.player.spell = arg2
pfUI.castbar.player.bar.left:SetText(arg2) pfUI.castbar.player.bar.left:SetText(arg2)
pfUI.castbar.player.bar:SetStatusBarColor(.9,.9,.7,.8) pfUI.castbar.player.bar:SetStatusBarColor(.9,.9,.7,.8)
pfUI.castbar.player.maxValue = nil; pfUI.castbar.player.maxValue = nil
pfUI.castbar.player.startTime = GetTime(); pfUI.castbar.player.startTime = GetTime()
pfUI.castbar.player.endTime = pfUI.castbar.player.startTime + (arg1 / 1000); pfUI.castbar.player.endTime = pfUI.castbar.player.startTime + (arg1 / 1000)
pfUI.castbar.player.duration = arg1 / 1000; pfUI.castbar.player.duration = arg1 / 1000
pfUI.castbar.player.bar:SetMinMaxValues(pfUI.castbar.player.startTime, pfUI.castbar.player.endTime); pfUI.castbar.player.bar:SetMinMaxValues(pfUI.castbar.player.startTime, pfUI.castbar.player.endTime)
pfUI.castbar.player.bar:SetValue(pfUI.castbar.player.endTime); pfUI.castbar.player.bar:SetValue(pfUI.castbar.player.endTime)
pfUI.castbar.player.holdTime = 0; pfUI.castbar.player.holdTime = 0
pfUI.castbar.player.casting = nil; pfUI.castbar.player.casting = nil
pfUI.castbar.player.channeling = 1; pfUI.castbar.player.channeling = 1
pfUI.castbar.player.fadeout = nil pfUI.castbar.player.fadeout = nil
pfUI.castbar.player:SetAlpha(1) pfUI.castbar.player:SetAlpha(1)
pfUI.castbar.player:Show() pfUI.castbar.player:Show()
@@ -119,9 +119,9 @@ pfUI:RegisterModule("castbar", function ()
elseif ( event == "SPELLCAST_DELAYED" ) then elseif ( event == "SPELLCAST_DELAYED" ) then
if( pfUI.castbar.player:IsShown() ) then if( pfUI.castbar.player:IsShown() ) then
pfUI.castbar.player.delay = pfUI.castbar.player.delay + arg1/1000 pfUI.castbar.player.delay = pfUI.castbar.player.delay + arg1/1000
pfUI.castbar.player.startTime = pfUI.castbar.player.startTime + (arg1 / 1000); pfUI.castbar.player.startTime = pfUI.castbar.player.startTime + (arg1 / 1000)
pfUI.castbar.player.maxValue = pfUI.castbar.player.maxValue + (arg1 / 1000); pfUI.castbar.player.maxValue = pfUI.castbar.player.maxValue + (arg1 / 1000)
pfUI.castbar.player.bar:SetMinMaxValues(pfUI.castbar.player.startTime, pfUI.castbar.player.maxValue); pfUI.castbar.player.bar:SetMinMaxValues(pfUI.castbar.player.startTime, pfUI.castbar.player.maxValue)
end end
elseif ( event == "SPELLCAST_CHANNEL_UPDATE" ) then elseif ( event == "SPELLCAST_CHANNEL_UPDATE" ) then
@@ -130,7 +130,7 @@ pfUI:RegisterModule("castbar", function ()
local origDuration = pfUI.castbar.player.endTime - pfUI.castbar.player.startTime local origDuration = pfUI.castbar.player.endTime - pfUI.castbar.player.startTime
pfUI.castbar.player.endTime = GetTime() + (arg1 / 1000) pfUI.castbar.player.endTime = GetTime() + (arg1 / 1000)
pfUI.castbar.player.startTime = pfUI.castbar.player.endTime - origDuration pfUI.castbar.player.startTime = pfUI.castbar.player.endTime - origDuration
pfUI.castbar.player.bar:SetMinMaxValues(pfUI.castbar.player.startTime, pfUI.castbar.player.endTime); pfUI.castbar.player.bar:SetMinMaxValues(pfUI.castbar.player.startTime, pfUI.castbar.player.endTime)
end end
end end
end) end)
@@ -149,7 +149,7 @@ pfUI:RegisterModule("castbar", function ()
-- cast -- cast
if ( pfUI.castbar.player.casting ) then if ( pfUI.castbar.player.casting ) then
local status = GetTime(); local status = GetTime()
local cur = round(GetTime() - pfUI.castbar.player.startTime,1) local cur = round(GetTime() - pfUI.castbar.player.startTime,1)
local max = round(pfUI.castbar.player.maxValue - pfUI.castbar.player.startTime,1) local max = round(pfUI.castbar.player.maxValue - pfUI.castbar.player.startTime,1)
local delay = pfUI.castbar.player.delay local delay = pfUI.castbar.player.delay
@@ -163,12 +163,12 @@ pfUI:RegisterModule("castbar", function ()
else else
pfUI.castbar.player.bar.right:SetText(cur .. " / " .. max) pfUI.castbar.player.bar.right:SetText(cur .. " / " .. max)
end end
pfUI.castbar.player.bar:SetValue(status); pfUI.castbar.player.bar:SetValue(status)
-- channel -- channel
elseif ( pfUI.castbar.player.channeling ) then elseif ( pfUI.castbar.player.channeling ) then
local time = GetTime(); local time = GetTime()
local barValue = pfUI.castbar.player.startTime + (pfUI.castbar.player.endTime - time); local barValue = pfUI.castbar.player.startTime + (pfUI.castbar.player.endTime - time)
local cur = round(pfUI.castbar.player.endTime - GetTime(),1) local cur = round(pfUI.castbar.player.endTime - GetTime(),1)
local max = round(pfUI.castbar.player.endTime - pfUI.castbar.player.startTime,1) local max = round(pfUI.castbar.player.endTime - pfUI.castbar.player.startTime,1)
local delay = pfUI.castbar.player.delay local delay = pfUI.castbar.player.delay
@@ -177,9 +177,9 @@ pfUI:RegisterModule("castbar", function ()
time = pfUI.castbar.player.endTime time = pfUI.castbar.player.endTime
end end
if ( time == pfUI.castbar.player.endTime ) then if ( time == pfUI.castbar.player.endTime ) then
pfUI.castbar.player.channeling = nil; pfUI.castbar.player.channeling = nil
pfUI.castbar.player.fadeout = 1; pfUI.castbar.player.fadeout = 1
return; return
end end
if delay > 0 then if delay > 0 then
delay = "|cffffaaaa-" .. round(delay,1) .. " |r " delay = "|cffffaaaa-" .. round(delay,1) .. " |r "
@@ -187,7 +187,7 @@ pfUI:RegisterModule("castbar", function ()
else else
pfUI.castbar.player.bar.right:SetText(cur) pfUI.castbar.player.bar.right:SetText(cur)
end end
pfUI.castbar.player.bar:SetValue( barValue ); pfUI.castbar.player.bar:SetValue( barValue )
end end
end) end)
end end
@@ -234,23 +234,23 @@ pfUI:RegisterModule("castbar", function ()
pfUI.castbar.target.bar.right:SetText("right") pfUI.castbar.target.bar.right:SetText("right")
pfUI.castbar.target.bar.right:SetJustifyH("right") pfUI.castbar.target.bar.right:SetJustifyH("right")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_SELF_DAMAGE"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_SELF_DAMAGE")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_HOSTILEPLAYER_DAMAGE"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_HOSTILEPLAYER_DAMAGE")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_HOSTILEPLAYER_BUFF"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_HOSTILEPLAYER_BUFF")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_FRIENDLYPLAYER_DAMAGE"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_FRIENDLYPLAYER_DAMAGE")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_FRIENDLYPLAYER_BUFF"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_FRIENDLYPLAYER_BUFF")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_BUFFS"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_BUFFS")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_BUFFS"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_BUFFS")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PARTY_DAMAGE"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PARTY_DAMAGE")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PARTY_BUFF"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PARTY_BUFF")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_BUFFS"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_BUFFS")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_CREATURE_DAMAGE"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_CREATURE_DAMAGE")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_CREATURE_BUFFS"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_CREATURE_BUFFS")
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE"); pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE")
pfUI.castbar.target:RegisterEvent("PLAYER_TARGET_CHANGED") pfUI.castbar.target:RegisterEvent("PLAYER_TARGET_CHANGED")
pfUI.castbar.target.casterDB = {} pfUI.castbar.target.casterDB = {}
+34 -34
View File
@@ -71,14 +71,14 @@ pfUI:RegisterModule("chat", function ()
if pfUI.chat.left.panelTop.proxy.enabled == false then return end if pfUI.chat.left.panelTop.proxy.enabled == false then return end
if arg2 ~= UnitName("player") and arg2 ~= forwardto and forwardto ~= UnitName("player") then if arg2 ~= UnitName("player") and arg2 ~= forwardto and forwardto ~= UnitName("player") then
SendChatMessage("[" .. arg2 .. "]: " .. arg1, "WHISPER", nil, forwardto); SendChatMessage("[" .. arg2 .. "]: " .. arg1, "WHISPER", nil, forwardto)
end end
if arg2 == forwardto then if arg2 == forwardto then
local isForward, _, name, message = string.find(arg1, "(.*): (.*)") local isForward, _, name, message = string.find(arg1, "(.*): (.*)")
if isForward then if isForward then
SendChatMessage(message, "WHISPER", nil, name); SendChatMessage(message, "WHISPER", nil, name)
SendChatMessage("-> " .. name, "WHISPER", nil, forwardto); SendChatMessage("-> " .. name, "WHISPER", nil, forwardto)
end end
end end
end) end)
@@ -337,22 +337,22 @@ pfUI:RegisterModule("chat", function ()
FCF_SetLocked(ChatFrame1, 1) FCF_SetLocked(ChatFrame1, 1)
FCF_SetWindowName(ChatFrame1, GENERAL) FCF_SetWindowName(ChatFrame1, GENERAL)
FCF_SetWindowColor(ChatFrame1, 0, 0, 0); FCF_SetWindowColor(ChatFrame1, 0, 0, 0)
FCF_SetWindowAlpha(ChatFrame1, 0); FCF_SetWindowAlpha(ChatFrame1, 0)
FCF_SetChatWindowFontSize(ChatFrame1, 12) FCF_SetChatWindowFontSize(ChatFrame1, 12)
-- set position of Combat -- set position of Combat
if not ChatFrame2:IsShown() then if not ChatFrame2:IsShown() then
FCF_OpenNewWindow("Combat Log") FCF_OpenNewWindow("Combat Log")
end end
FCF_SetLocked(ChatFrame2, 1); FCF_SetLocked(ChatFrame2, 1)
FCF_SetWindowName(ChatFrame2, COMBAT_LOG); FCF_SetWindowName(ChatFrame2, COMBAT_LOG)
FCF_SetWindowColor(ChatFrame2, 0, 0, 0); FCF_SetWindowColor(ChatFrame2, 0, 0, 0)
FCF_SetWindowAlpha(ChatFrame2, 0); FCF_SetWindowAlpha(ChatFrame2, 0)
FCF_SetChatWindowFontSize(ChatFrame2, 12) FCF_SetChatWindowFontSize(ChatFrame2, 12)
ChatFrame_RemoveAllChannels(ChatFrame2); ChatFrame_RemoveAllChannels(ChatFrame2)
ChatFrame_RemoveAllMessageGroups(ChatFrame2); ChatFrame_RemoveAllMessageGroups(ChatFrame2)
ChatFrame_ActivateCombatMessages(ChatFrame2); ChatFrame_ActivateCombatMessages(ChatFrame2)
-- set position of Loot & Spam -- set position of Loot & Spam
if not ChatFrame3:IsShown() then if not ChatFrame3:IsShown() then
@@ -360,19 +360,19 @@ pfUI:RegisterModule("chat", function ()
end end
FCF_SetLocked(ChatFrame3, 1) FCF_SetLocked(ChatFrame3, 1)
FCF_SetWindowName(ChatFrame3, "Loot & Spam") FCF_SetWindowName(ChatFrame3, "Loot & Spam")
FCF_SetWindowColor(ChatFrame3, 0, 0, 0); FCF_SetWindowColor(ChatFrame3, 0, 0, 0)
FCF_SetWindowAlpha(ChatFrame3, 0); FCF_SetWindowAlpha(ChatFrame3, 0)
FCF_SetChatWindowFontSize(ChatFrame3, 12) FCF_SetChatWindowFontSize(ChatFrame3, 12)
FCF_UnDockFrame(ChatFrame3) FCF_UnDockFrame(ChatFrame3)
FCF_SetTabPosition(ChatFrame3, 0); FCF_SetTabPosition(ChatFrame3, 0)
ChatFrame3:ClearAllPoints() ChatFrame3:ClearAllPoints()
ChatFrame3:SetPoint("TOPLEFT", pfUI.chat.right ,"TOPLEFT", 5, -25) ChatFrame3:SetPoint("TOPLEFT", pfUI.chat.right ,"TOPLEFT", 5, -25)
ChatFrame3:SetPoint("BOTTOMRIGHT", pfUI.chat.right ,"BOTTOMRIGHT", -5, 25) ChatFrame3:SetPoint("BOTTOMRIGHT", pfUI.chat.right ,"BOTTOMRIGHT", -5, 25)
-- save positions on logout -- save positions on logout
ChatFrame1:SetUserPlaced(1); ChatFrame1:SetUserPlaced(1)
ChatFrame2:SetUserPlaced(1); ChatFrame2:SetUserPlaced(1)
ChatFrame3:SetUserPlaced(1); ChatFrame3:SetUserPlaced(1)
end end
function pfUI.chat.SetupChannels() function pfUI.chat.SetupChannels()
@@ -408,46 +408,46 @@ pfUI:RegisterModule("chat", function ()
-- Need to draw the dock regions for a frame to define their rects -- Need to draw the dock regions for a frame to define their rects
if ( not ChatFrame1.init ) then if ( not ChatFrame1.init ) then
for i=1, NUM_CHAT_WINDOWS do for i=1, NUM_CHAT_WINDOWS do
getglobal("ChatFrame"..i.."TabDockRegion"):Show(); getglobal("ChatFrame"..i.."TabDockRegion"):Show()
FCF_UpdateButtonSide(getglobal("ChatFrame"..i)); FCF_UpdateButtonSide(getglobal("ChatFrame"..i))
end end
ChatFrame1.init = 1; ChatFrame1.init = 1
return; return
elseif ( ChatFrame1.init == 1 ) then elseif ( ChatFrame1.init == 1 ) then
for i=1, NUM_CHAT_WINDOWS do for i=1, NUM_CHAT_WINDOWS do
getglobal("ChatFrame"..i.."TabDockRegion"):Hide(); getglobal("ChatFrame"..i.."TabDockRegion"):Hide()
end end
ChatFrame1.init = 2; ChatFrame1.init = 2
end end
-- Detect if mouse is over any chat frames and if so show their tabs, if not hide them -- Detect if mouse is over any chat frames and if so show their tabs, if not hide them
local chatFrame, chatTab; local chatFrame, chatTab
if ( MOVING_CHATFRAME ) then if ( MOVING_CHATFRAME ) then
-- Set buttons to the left or right side of the frame -- Set buttons to the left or right side of the frame
-- If the the side of the buttons changes and the frame is the default frame, then set every docked frames buttons to the same side -- If the the side of the buttons changes and the frame is the default frame, then set every docked frames buttons to the same side
local updateAllButtons = nil; local updateAllButtons = nil
if (FCF_UpdateButtonSide(MOVING_CHATFRAME) and MOVING_CHATFRAME == DEFAULT_CHAT_FRAME ) then if (FCF_UpdateButtonSide(MOVING_CHATFRAME) and MOVING_CHATFRAME == DEFAULT_CHAT_FRAME ) then
updateAllButtons = 1; updateAllButtons = 1
end end
local dockRegion; local dockRegion
for index, value in DOCKED_CHAT_FRAMES do for index, value in DOCKED_CHAT_FRAMES do
if ( updateAllButtons ) then if ( updateAllButtons ) then
FCF_UpdateButtonSide(value); FCF_UpdateButtonSide(value)
end end
dockRegion = getglobal(value:GetName().."TabDockRegion"); dockRegion = getglobal(value:GetName().."TabDockRegion")
if ( MouseIsOver(dockRegion) and MOVING_CHATFRAME ~= DEFAULT_CHAT_FRAME ) then if ( MouseIsOver(dockRegion) and MOVING_CHATFRAME ~= DEFAULT_CHAT_FRAME ) then
dockRegion:Show(); dockRegion:Show()
else else
dockRegion:Hide(); dockRegion:Hide()
end end
end end
end end
-- If the default chat frame is resizing, then resize the dock -- If the default chat frame is resizing, then resize the dock
if ( DEFAULT_CHAT_FRAME.resizing ) then if ( DEFAULT_CHAT_FRAME.resizing ) then
FCF_DockUpdate(); FCF_DockUpdate()
end end
end end
@@ -488,7 +488,7 @@ pfUI:RegisterModule("chat", function ()
ChatFrameEditBox:SetAltArrowKeyMode(false) ChatFrameEditBox:SetAltArrowKeyMode(false)
local default = " " .. "%s" .. "|r:" .. "\32" local default = " " .. "%s" .. "|r:" .. "\32"
CHAT_CHANNEL_GET = "%s" .. "|r:" .. "\32"; CHAT_CHANNEL_GET = "%s" .. "|r:" .. "\32"
CHAT_GUILD_GET = '[G]' .. default CHAT_GUILD_GET = '[G]' .. default
CHAT_OFFICER_GET = '[O]'.. default CHAT_OFFICER_GET = '[O]'.. default
CHAT_PARTY_GET = '[P]' .. default CHAT_PARTY_GET = '[P]' .. default
+9 -9
View File
@@ -2,13 +2,13 @@ pfUI:RegisterModule("cooldown", function ()
function CooldownFrame_SetTimer(this, start, duration, enable) function CooldownFrame_SetTimer(this, start, duration, enable)
if not this then return end if not this then return end
-- disable animation -- disable animation
this:SetPosition(1,1,1); this:SetPosition(1,1,1)
if ( start > 0 and duration > 0 and enable > 0) then if ( start > 0 and duration > 0 and enable > 0) then
this.start = start; this.start = start
this.duration = duration; this.duration = duration
this.stopping = 0; this.stopping = 0
this:SetSequence(0); this:SetSequence(0)
if not this.cd then if not this.cd then
this.cd = CreateFrame("Frame") this.cd = CreateFrame("Frame")
@@ -28,7 +28,7 @@ pfUI:RegisterModule("cooldown", function ()
this.cd.text:SetJustifyH("CENTER") this.cd.text:SetJustifyH("CENTER")
this.cd.text:SetFontObject(GameFontWhite) this.cd.text:SetFontObject(GameFontWhite)
end end
this:Show(); this:Show()
else else
this:Hide() this:Hide()
if this.cd then this.cd:Hide() end if this.cd then this.cd:Hide() end
@@ -55,16 +55,16 @@ pfUI:RegisterModule("cooldown", function ()
this.cd.text:SetText(ceil(remaining)..unit) this.cd.text:SetText(ceil(remaining)..unit)
else else
this:Hide(); this:Hide()
this.cd:Hide() this.cd:Hide()
this.stopping = 1; this.stopping = 1
end end
end end
end end
function CooldownFrame_OnAnimFinished() function CooldownFrame_OnAnimFinished()
if ( this.stopping == 1 ) then if ( this.stopping == 1 ) then
this:Hide(); this:Hide()
this.cd:Hide() this.cd:Hide()
end end
end end
+9 -9
View File
@@ -146,8 +146,8 @@ pfUI:RegisterModule("group", function ()
pfUI.uf.group[i]:RegisterForClicks('LeftButtonUp', 'RightButtonUp') pfUI.uf.group[i]:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
pfUI.uf.group[i]:SetScript("OnEnter", function() pfUI.uf.group[i]:SetScript("OnEnter", function()
GameTooltip:SetOwner(this, "ANCHOR_NONE"); GameTooltip:SetOwner(this, "ANCHOR_NONE")
GameTooltip:SetUnit("party" .. this.id); GameTooltip:SetUnit("party" .. this.id)
GameTooltip:Show() GameTooltip:Show()
end) end)
@@ -157,20 +157,20 @@ pfUI:RegisterModule("group", function ()
pfUI.uf.group[i]:SetScript("OnClick", function () pfUI.uf.group[i]:SetScript("OnClick", function ()
if ( SpellIsTargeting() and arg1 == "RightButton" ) then if ( SpellIsTargeting() and arg1 == "RightButton" ) then
SpellStopTargeting(); SpellStopTargeting()
return; return
end end
if ( arg1 == "LeftButton" ) then if ( arg1 == "LeftButton" ) then
if ( SpellIsTargeting() ) then if ( SpellIsTargeting() ) then
SpellTargetUnit("party" .. this.id); SpellTargetUnit("party" .. this.id)
elseif ( CursorHasItem() ) then elseif ( CursorHasItem() ) then
DropItemOnUnit("party" .. this.id); DropItemOnUnit("party" .. this.id)
else else
TargetUnit("party" .. this.id); TargetUnit("party" .. this.id)
end end
else else
local x, y = GetCursorPosition(); local x, y = GetCursorPosition()
ToggleDropDownMenu(1, nil, getglobal("PartyMemberFrame" .. this.id .. "DropDown"), "cursor") ToggleDropDownMenu(1, nil, getglobal("PartyMemberFrame" .. this.id .. "DropDown"), "cursor")
end end
end) end)
@@ -213,7 +213,7 @@ pfUI:RegisterModule("group", function ()
this.hp.bar:SetStatusBarColor(cr, cg, cb) this.hp.bar:SetStatusBarColor(cr, cg, cb)
local pcolor = ManaBarColor[UnitPowerType("party"..this.id)]; local pcolor = ManaBarColor[UnitPowerType("party"..this.id)]
this.power.bar:SetStatusBarColor(pcolor.r + .5, pcolor.g +.5, pcolor.b +.5, 1) this.power.bar:SetStatusBarColor(pcolor.r + .5, pcolor.g +.5, pcolor.b +.5, 1)
this.caption:SetText(UnitName("party"..this.id)) this.caption:SetText(UnitName("party"..this.id))
+5 -5
View File
@@ -1,7 +1,7 @@
pfUI:RegisterModule("gui", function () pfUI:RegisterModule("gui", function ()
pfUI.gui = CreateFrame("Frame",nil,UIParent) pfUI.gui = CreateFrame("Frame",nil,UIParent)
pfUI.gui:RegisterEvent("PLAYER_ENTERING_WORLD"); pfUI.gui:RegisterEvent("PLAYER_ENTERING_WORLD")
pfUI.gui:SetFrameStrata("DIALOG") pfUI.gui:SetFrameStrata("DIALOG")
pfUI.gui:SetWidth(480) pfUI.gui:SetWidth(480)
@@ -9,7 +9,7 @@ pfUI:RegisterModule("gui", function ()
pfUI.gui:Hide() pfUI.gui:Hide()
pfUI.gui:SetBackdrop(pfUI.backdrop) pfUI.gui:SetBackdrop(pfUI.backdrop)
pfUI.gui:SetBackdropColor(0,0,0,.75); pfUI.gui:SetBackdropColor(0,0,0,.75)
pfUI.gui:SetPoint("CENTER",0,0) pfUI.gui:SetPoint("CENTER",0,0)
pfUI.gui:SetMovable(true) pfUI.gui:SetMovable(true)
pfUI.gui:EnableMouse(true) pfUI.gui:EnableMouse(true)
@@ -65,7 +65,7 @@ pfUI:RegisterModule("gui", function ()
pfUI.gui.reloadDialog.yes:SetText("Yes") pfUI.gui.reloadDialog.yes:SetText("Yes")
pfUI.gui.reloadDialog.yes:SetScript("OnClick", function() pfUI.gui.reloadDialog.yes:SetScript("OnClick", function()
pfUI.gui.settingChanged = nil pfUI.gui.settingChanged = nil
ReloadUI(); ReloadUI()
end) end)
pfUI.gui.reloadDialog.no = CreateFrame("Button", "pfReloadNo", pfUI.gui.reloadDialog, "UIPanelButtonTemplate") pfUI.gui.reloadDialog.no = CreateFrame("Button", "pfReloadNo", pfUI.gui.reloadDialog, "UIPanelButtonTemplate")
@@ -430,7 +430,7 @@ pfUI:RegisterModule("gui", function ()
end end
UIDropDownMenu_Initialize(frame.input, createValues) UIDropDownMenu_Initialize(frame.input, createValues)
UIDropDownMenu_SetWidth(120, frame.input); UIDropDownMenu_SetWidth(120, frame.input)
UIDropDownMenu_SetButtonWidth(125, frame.input) UIDropDownMenu_SetButtonWidth(125, frame.input)
UIDropDownMenu_JustifyText("RIGHT", frame.input) UIDropDownMenu_JustifyText("RIGHT", frame.input)
UIDropDownMenu_SetSelectedID(frame.input, frame.input.current) UIDropDownMenu_SetSelectedID(frame.input, frame.input.current)
@@ -451,7 +451,7 @@ pfUI:RegisterModule("gui", function ()
pfUI.gui.deco:SetPoint("TOPLEFT", pfUI.gui, "TOPLEFT", 80,0) pfUI.gui.deco:SetPoint("TOPLEFT", pfUI.gui, "TOPLEFT", 80,0)
pfUI.gui.deco:SetPoint("BOTTOMRIGHT", pfUI.gui, "BOTTOMRIGHT", 0,0) pfUI.gui.deco:SetPoint("BOTTOMRIGHT", pfUI.gui, "BOTTOMRIGHT", 0,0)
pfUI.gui.deco:SetBackdrop(pfUI.backdrop) pfUI.gui.deco:SetBackdrop(pfUI.backdrop)
pfUI.gui.deco:SetBackdropColor(0,0,0,.50); pfUI.gui.deco:SetBackdropColor(0,0,0,.50)
pfUI.gui.deco.up = CreateFrame("Frame", nil, pfUI.gui.deco) pfUI.gui.deco.up = CreateFrame("Frame", nil, pfUI.gui.deco)
pfUI.gui.deco.up:SetPoint("TOPRIGHT", 0,0) pfUI.gui.deco.up:SetPoint("TOPRIGHT", 0,0)
+7 -7
View File
@@ -21,10 +21,10 @@ pfUI:RegisterModule("loot", function ()
frame:SetScript("OnClick", function() frame:SetScript("OnClick", function()
if ( IsControlKeyDown() ) then if ( IsControlKeyDown() ) then
DressUpItemLink(GetLootSlotLink(this:GetID())); DressUpItemLink(GetLootSlotLink(this:GetID()))
elseif ( IsShiftKeyDown() ) then elseif ( IsShiftKeyDown() ) then
if ( ChatFrameEditBox:IsVisible() ) then if ( ChatFrameEditBox:IsVisible() ) then
ChatFrameEditBox:Insert(GetLootSlotLink(this:GetID())); ChatFrameEditBox:Insert(GetLootSlotLink(this:GetID()))
end end
end end
@@ -182,7 +182,7 @@ pfUI:RegisterModule("loot", function ()
if event == "LOOT_CLOSED" then if event == "LOOT_CLOSED" then
StaticPopup_Hide("LOOT_BIND") StaticPopup_Hide("LOOT_BIND")
HideUIPanel(this); HideUIPanel(this)
for _, v in pairs(this.slots) do for _, v in pairs(this.slots) do
v:Hide() v:Hide()
end end
@@ -194,14 +194,14 @@ pfUI:RegisterModule("loot", function ()
function GroupLootDropDown_GiveLoot() function GroupLootDropDown_GiveLoot()
if ( pfUI.loot.selectedQuality >= MASTER_LOOT_THREHOLD ) then if ( pfUI.loot.selectedQuality >= MASTER_LOOT_THREHOLD ) then
local dialog = StaticPopup_Show("CONFIRM_LOOT_DISTRIBUTION", ITEM_QUALITY_COLORS[LootFrame.selectedQuality].hex..pfUI.loot.selectedItemName..FONT_COLOR_CODE_CLOSE, this:GetText()); local dialog = StaticPopup_Show("CONFIRM_LOOT_DISTRIBUTION", ITEM_QUALITY_COLORS[LootFrame.selectedQuality].hex..pfUI.loot.selectedItemName..FONT_COLOR_CODE_CLOSE, this:GetText())
if ( dialog ) then if ( dialog ) then
dialog.data = this.value; dialog.data = this.value
end end
else else
GiveMasterLoot(pfUI.loot.selectedSlot, this.value); GiveMasterLoot(pfUI.loot.selectedSlot, this.value)
end end
CloseDropDownMenus(); CloseDropDownMenus()
end end
StaticPopupDialogs["CONFIRM_LOOT_DISTRIBUTION"].OnAccept = function(data) StaticPopupDialogs["CONFIRM_LOOT_DISTRIBUTION"].OnAccept = function(data)
+29 -29
View File
@@ -18,23 +18,23 @@ pfUI:RegisterModule("panel", function ()
pfUI.panel:SetScript("OnEvent", function() pfUI.panel:SetScript("OnEvent", function()
if event == "PLAYER_ENTERING_WORLD" then if event == "PLAYER_ENTERING_WORLD" then
pfUI.panel:UpdateGold() pfUI.panel:UpdateGold()
pfUI.panel:UpdateRepair(); pfUI.panel:UpdateRepair()
pfUI.panel:UpdateExp() pfUI.panel:UpdateExp()
pfUI.panel:UpdateFriend() pfUI.panel:UpdateFriend()
pfUI.panel:UpdateGuild(); pfUI.panel:UpdateGuild()
pfUI.panel:UpdateRepair(); pfUI.panel:UpdateRepair()
pfUI.panel:UpdateZone(); pfUI.panel:UpdateZone()
elseif event == "PLAYER_MONEY" then elseif event == "PLAYER_MONEY" then
pfUI.panel:UpdateGold() pfUI.panel:UpdateGold()
pfUI.panel:UpdateRepair(); pfUI.panel:UpdateRepair()
elseif event == "PLAYER_XP_UPDATE" then elseif event == "PLAYER_XP_UPDATE" then
pfUI.panel:UpdateExp() pfUI.panel:UpdateExp()
elseif event == "FRIENDLIST_UPDATE" then elseif event == "FRIENDLIST_UPDATE" then
pfUI.panel:UpdateFriend() pfUI.panel:UpdateFriend()
elseif event == "GUILD_ROSTER_UPDATE" or event == "PLAYER_GUILD_UPDATE" then elseif event == "GUILD_ROSTER_UPDATE" or event == "PLAYER_GUILD_UPDATE" then
pfUI.panel:UpdateGuild(); pfUI.panel:UpdateGuild()
elseif event == "PLAYER_REGEN_ENABLED" or event == "PLAYER_DEAD" then elseif event == "PLAYER_REGEN_ENABLED" or event == "PLAYER_DEAD" then
pfUI.panel:UpdateRepair(); pfUI.panel:UpdateRepair()
elseif event == "MINIMAP_ZONE_CHANGED" then elseif event == "MINIMAP_ZONE_CHANGED" then
pfUI.panel:UpdateZone() pfUI.panel:UpdateZone()
end end
@@ -46,11 +46,11 @@ pfUI:RegisterModule("panel", function ()
if GetTime() >= pfUI.panel.clock.tick + 1 then if GetTime() >= pfUI.panel.clock.tick + 1 then
pfUI.panel.clock.tick = GetTime() pfUI.panel.clock.tick = GetTime()
pfUI.panel:OutputPanel("time", date("%H:%M:%S")) pfUI.panel:OutputPanel("time", date("%H:%M:%S"))
local _, _, lag = GetNetStats(); local _, _, lag = GetNetStats()
local fps = floor(GetFramerate()); local fps = floor(GetFramerate())
pfUI.panel:OutputPanel("fps", floor(GetFramerate()) .. " fps & " .. lag .. " ms") pfUI.panel:OutputPanel("fps", floor(GetFramerate()) .. " fps & " .. lag .. " ms")
end end
end); end)
-- Update "exp" -- Update "exp"
function pfUI.panel:UpdateExp () function pfUI.panel:UpdateExp ()
@@ -147,12 +147,12 @@ pfUI:RegisterModule("panel", function ()
-- Update "friends" -- Update "friends"
function pfUI.panel:UpdateFriend () function pfUI.panel:UpdateFriend ()
local online = 0; local online = 0
local all = GetNumFriends(); local all = GetNumFriends()
for friendIndex=1, all do for friendIndex=1, all do
friend_name, friend_level, friend_class, friend_area, friend_connected = GetFriendInfo(friendIndex); friend_name, friend_level, friend_class, friend_area, friend_connected = GetFriendInfo(friendIndex)
if ( friend_connected ) then if ( friend_connected ) then
online = online + 1; online = online + 1
end end
end end
pfUI.panel:OutputPanel("friends", "Friends: " .. online) pfUI.panel:OutputPanel("friends", "Friends: " .. online)
@@ -161,8 +161,8 @@ pfUI:RegisterModule("panel", function ()
-- Update "guild" -- Update "guild"
function pfUI.panel:UpdateGuild () function pfUI.panel:UpdateGuild ()
GuildRoster() GuildRoster()
local online = GetNumGuildMembers(); local online = GetNumGuildMembers()
local all = GetNumGuildMembers(true); local all = GetNumGuildMembers(true)
pfUI.panel:OutputPanel("guild", "Guild: "..online) pfUI.panel:OutputPanel("guild", "Guild: "..online)
end end
@@ -170,29 +170,29 @@ pfUI:RegisterModule("panel", function ()
local repairToolTip = CreateFrame('GameTooltip', "repairToolTip", this, "GameTooltipTemplate") local repairToolTip = CreateFrame('GameTooltip', "repairToolTip", this, "GameTooltipTemplate")
function pfUI.panel:UpdateRepair () function pfUI.panel:UpdateRepair ()
local slotnames = { "Head", "Shoulder", "Chest", "Wrist", local slotnames = { "Head", "Shoulder", "Chest", "Wrist",
"Hands", "Waist", "Legs", "Feet", "MainHand", "SecondaryHand", "Ranged", }; "Hands", "Waist", "Legs", "Feet", "MainHand", "SecondaryHand", "Ranged", }
local id, hasItem, repairCost; local id, hasItem, repairCost
local itemName, durability, tmpText, midpt, lval, rval; local itemName, durability, tmpText, midpt, lval, rval
duraLowestslotName = nil; duraLowestslotName = nil
repPercent = 100; repPercent = 100
lowestPercent = 100; lowestPercent = 100
for i,slotName in pairs(slotnames) do for i,slotName in pairs(slotnames) do
id, _ = GetInventorySlotInfo(slotName.. "Slot"); id, _ = GetInventorySlotInfo(slotName.. "Slot")
repairToolTip:Hide() repairToolTip:Hide()
repairToolTip:SetOwner(this, "ANCHOR_LEFT"); repairToolTip:SetOwner(this, "ANCHOR_LEFT")
hasItem, _, repCost = repairToolTip:SetInventoryItem("player", id); hasItem, _, repCost = repairToolTip:SetInventoryItem("player", id)
if (not hasItem) then repairToolTip:ClearLines() if (not hasItem) then repairToolTip:ClearLines()
else else
for i=1, 30, 1 do for i=1, 30, 1 do
tmpText = getglobal("repairToolTipTextLeft"..i); tmpText = getglobal("repairToolTipTextLeft"..i)
if (tmpText ~= nil) and (tmpText:GetText()) then if (tmpText ~= nil) and (tmpText:GetText()) then
local searchstr = string.gsub(DURABILITY_TEMPLATE, "%%[^%s]+", "(.+)") local searchstr = string.gsub(DURABILITY_TEMPLATE, "%%[^%s]+", "(.+)")
_, _, lval, rval = string.find(tmpText:GetText(), searchstr); _, _, lval, rval = string.find(tmpText:GetText(), searchstr)
if (lval and rval) then if (lval and rval) then
repPercent = math.floor(lval / rval * 100) repPercent = math.floor(lval / rval * 100)
break; break
end end
end end
end end
@@ -207,7 +207,7 @@ pfUI:RegisterModule("panel", function ()
function pfUI.panel:UpdateZone () function pfUI.panel:UpdateZone ()
local tooltip = function () local tooltip = function ()
local posX, posY = GetPlayerMapPosition("player"); local posX, posY = GetPlayerMapPosition("player")
local real = GetRealZoneText() local real = GetRealZoneText()
local sub = GetSubZoneText() local sub = GetSubZoneText()
GameTooltip:ClearLines() GameTooltip:ClearLines()
+10 -10
View File
@@ -14,11 +14,11 @@ pfUI:RegisterModule("pet", function ()
pfUI.uf.pet:RegisterEvent("PLAYER_ENTERING_WORLD") pfUI.uf.pet:RegisterEvent("PLAYER_ENTERING_WORLD")
pfUI.uf.pet:RegisterEvent("UNIT_PET") pfUI.uf.pet:RegisterEvent("UNIT_PET")
pfUI.uf.pet:RegisterEvent("UNIT_COMBAT"); pfUI.uf.pet:RegisterEvent("UNIT_COMBAT")
pfUI.uf.pet:RegisterEvent("UNIT_AURA"); pfUI.uf.pet:RegisterEvent("UNIT_AURA")
pfUI.uf.pet:RegisterEvent("PET_ATTACK_START"); pfUI.uf.pet:RegisterEvent("PET_ATTACK_START")
pfUI.uf.pet:RegisterEvent("PET_ATTACK_STOP"); pfUI.uf.pet:RegisterEvent("PET_ATTACK_STOP")
pfUI.uf.pet:RegisterEvent("UNIT_HAPPINESS"); pfUI.uf.pet:RegisterEvent("UNIT_HAPPINESS")
pfUI.uf.pet:RegisterEvent("UNIT_HEALTH") pfUI.uf.pet:RegisterEvent("UNIT_HEALTH")
pfUI.uf.pet:RegisterEvent("UNIT_MAXHEALTH") pfUI.uf.pet:RegisterEvent("UNIT_MAXHEALTH")
@@ -71,7 +71,7 @@ pfUI:RegisterModule("pet", function ()
pfUI.uf.pet.hpReal = hp pfUI.uf.pet.hpReal = hp
pfUI.uf.pet.powerReal = power pfUI.uf.pet.powerReal = power
PowerColor = ManaBarColor[UnitPowerType("pet")]; PowerColor = ManaBarColor[UnitPowerType("pet")]
pfUI.uf.pet.power.bar:SetStatusBarColor(PowerColor.r + .5, PowerColor.g +.5, PowerColor.b +.5, 1) pfUI.uf.pet.power.bar:SetStatusBarColor(PowerColor.r + .5, PowerColor.g +.5, PowerColor.b +.5, 1)
pfUI.uf.pet.power.bar:SetMinMaxValues(0, UnitManaMax("pet")) pfUI.uf.pet.power.bar:SetMinMaxValues(0, UnitManaMax("pet"))
end) end)
@@ -234,8 +234,8 @@ pfUI:RegisterModule("pet", function ()
pfUI.uf.pet.debuff.debuffs[i]:RegisterForClicks("RightButtonUp") pfUI.uf.pet.debuff.debuffs[i]:RegisterForClicks("RightButtonUp")
pfUI.uf.pet.debuff.debuffs[i]:ClearAllPoints() pfUI.uf.pet.debuff.debuffs[i]:ClearAllPoints()
local row = 0; local row = 0
local top = 0; local top = 0
local debuffsize = pfUI.uf.pet.hp:GetWidth()/8 - 1 local debuffsize = pfUI.uf.pet.hp:GetWidth()/8 - 1
if i > 8 then row = 1 end if i > 8 then row = 1 end
if pfUI.uf.pet.buff.buffs[1]:IsShown() then top = top + 1 end if pfUI.uf.pet.buff.buffs[1]:IsShown() then top = top + 1 end
@@ -264,8 +264,8 @@ pfUI:RegisterModule("pet", function ()
function pfUI.uf.pet.debuff.RefreshBuffs() function pfUI.uf.pet.debuff.RefreshBuffs()
local debuffsize = pfUI.uf.pet.hp:GetWidth()/8 - 1 local debuffsize = pfUI.uf.pet.hp:GetWidth()/8 - 1
for i=1, 16 do for i=1, 16 do
local row = 0; local row = 0
local top = 0; local top = 0
if i > 8 then row = 1 end if i > 8 then row = 1 end
if pfUI.uf.pet.buff.buffs[1]:IsShown() then top = top + 1 end if pfUI.uf.pet.buff.buffs[1]:IsShown() then top = top + 1 end
if pfUI.uf.pet.buff.buffs[9]:IsShown() then top = top + 1 end if pfUI.uf.pet.buff.buffs[9]:IsShown() then top = top + 1 end
+6 -6
View File
@@ -120,7 +120,7 @@ pfUI:RegisterModule("player", function ()
pfUI.uf.player.hpText:SetText(hp) pfUI.uf.player.hpText:SetText(hp)
end end
PowerColor = ManaBarColor[UnitPowerType("player")]; PowerColor = ManaBarColor[UnitPowerType("player")]
pfUI.uf.player.power.bar:SetStatusBarColor(PowerColor.r + .5, PowerColor.g +.5, PowerColor.b +.5, 1) pfUI.uf.player.power.bar:SetStatusBarColor(PowerColor.r + .5, PowerColor.g +.5, PowerColor.b +.5, 1)
pfUI.uf.player.power.bar:SetMinMaxValues(0, UnitManaMax("player")) pfUI.uf.player.power.bar:SetMinMaxValues(0, UnitManaMax("player"))
@@ -209,7 +209,7 @@ pfUI:RegisterModule("player", function ()
pfUI.uf.player.hp.bar.portrait:SetScript("OnShow", function() this:Update() end) pfUI.uf.player.hp.bar.portrait:SetScript("OnShow", function() this:Update() end)
function pfUI.uf.player.hp.bar.portrait.Update() function pfUI.uf.player.hp.bar.portrait.Update()
pfUI.uf.player.hp.bar.portrait:SetUnit("player"); pfUI.uf.player.hp.bar.portrait:SetUnit("player")
pfUI.uf.player.hp.bar.portrait:SetCamera(0) pfUI.uf.player.hp.bar.portrait:SetCamera(0)
pfUI.uf.player.hp.bar.portrait:SetAlpha(0.10) pfUI.uf.player.hp.bar.portrait:SetAlpha(0.10)
end end
@@ -372,8 +372,8 @@ pfUI:RegisterModule("player", function ()
pfUI.uf.player.debuff.debuffs[i]:RegisterForClicks("RightButtonUp") pfUI.uf.player.debuff.debuffs[i]:RegisterForClicks("RightButtonUp")
pfUI.uf.player.debuff.debuffs[i]:ClearAllPoints() pfUI.uf.player.debuff.debuffs[i]:ClearAllPoints()
local row = 0; local row = 0
local top = 0; local top = 0
if i > 8 then row = 1 end if i > 8 then row = 1 end
if pfUI.uf.player.buff.buffs[1]:IsShown() then top = top + 1 end if pfUI.uf.player.buff.buffs[1]:IsShown() then top = top + 1 end
if pfUI.uf.player.buff.buffs[9]:IsShown() then top = top + 1 end if pfUI.uf.player.buff.buffs[9]:IsShown() then top = top + 1 end
@@ -421,8 +421,8 @@ pfUI:RegisterModule("player", function ()
function pfUI.uf.player.debuff.RefreshBuffs() function pfUI.uf.player.debuff.RefreshBuffs()
for i=1, 16 do for i=1, 16 do
local row = 0; local row = 0
local top = 0; local top = 0
if i > 8 then row = 1 end if i > 8 then row = 1 end
if pfUI.uf.player.buff.buffs[1]:IsShown() then top = top + 1 end if pfUI.uf.player.buff.buffs[1]:IsShown() then top = top + 1 end
if pfUI.uf.player.buff.buffs[9]:IsShown() then top = top + 1 end if pfUI.uf.player.buff.buffs[9]:IsShown() then top = top + 1 end
+13 -13
View File
@@ -14,7 +14,7 @@ pfUI:RegisterModule("raid", function ()
-- sort players into roster -- sort players into roster
for i=1, GetNumRaidMembers() do for i=1, GetNumRaidMembers() do
local name, _, subgroup = GetRaidRosterInfo(i); local name, _, subgroup = GetRaidRosterInfo(i)
if name then if name then
for subindex = 1, 5 do for subindex = 1, 5 do
ids = subindex + 5*(subgroup-1) ids = subindex + 5*(subgroup-1)
@@ -111,8 +111,8 @@ pfUI:RegisterModule("raid", function ()
pfUI.uf.raid[i]:RegisterForClicks('LeftButtonUp', 'RightButtonUp') pfUI.uf.raid[i]:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
pfUI.uf.raid[i]:SetScript("OnEnter", function() pfUI.uf.raid[i]:SetScript("OnEnter", function()
GameTooltip:SetOwner(this, "ANCHOR_NONE"); GameTooltip:SetOwner(this, "ANCHOR_NONE")
GameTooltip:SetUnit("raid" .. this.id); GameTooltip:SetUnit("raid" .. this.id)
GameTooltip:Show() GameTooltip:Show()
end) end)
@@ -122,17 +122,17 @@ pfUI:RegisterModule("raid", function ()
pfUI.uf.raid[i]:SetScript("OnClick", function () pfUI.uf.raid[i]:SetScript("OnClick", function ()
if ( SpellIsTargeting() and arg1 == "RightButton" ) then if ( SpellIsTargeting() and arg1 == "RightButton" ) then
SpellStopTargeting(); SpellStopTargeting()
return; return
end end
if ( arg1 == "LeftButton" ) then if ( arg1 == "LeftButton" ) then
if ( SpellIsTargeting() ) then if ( SpellIsTargeting() ) then
SpellTargetUnit("raid" .. this.id); SpellTargetUnit("raid" .. this.id)
elseif ( CursorHasItem() ) then elseif ( CursorHasItem() ) then
DropItemOnUnit("raid" .. this.id); DropItemOnUnit("raid" .. this.id)
else else
TargetUnit("raid" .. this.id); TargetUnit("raid" .. this.id)
-- clickcast: shift modifier -- clickcast: shift modifier
if IsShiftKeyDown() then if IsShiftKeyDown() then
if pfUI_config.unitframes.raid.clickcast_shift ~= "" then if pfUI_config.unitframes.raid.clickcast_shift ~= "" then
@@ -166,15 +166,15 @@ pfUI:RegisterModule("raid", function ()
return return
else else
-- no clickcast: default action -- no clickcast: default action
TargetUnit("raid" .. this.id); TargetUnit("raid" .. this.id)
end end
end end
end end
else else
ToggleDropDownMenu(1, nil, getglobal("RaidMemberFrame" .. this.id .. "DropDown"), "cursor") ToggleDropDownMenu(1, nil, getglobal("RaidMemberFrame" .. this.id .. "DropDown"), "cursor")
FriendsDropDown.initialize = RaidFrameDropDown_Initialize; FriendsDropDown.initialize = RaidFrameDropDown_Initialize
FriendsDropDown.displayMode = "MENU"; FriendsDropDown.displayMode = "MENU"
ToggleDropDownMenu(1, nil, FriendsDropDown, "cursor"); ToggleDropDownMenu(1, nil, FriendsDropDown, "cursor")
end end
end) end)
@@ -222,7 +222,7 @@ pfUI:RegisterModule("raid", function ()
this.hp.bar:SetStatusBarColor(cr, cg, cb) this.hp.bar:SetStatusBarColor(cr, cg, cb)
local pcolor = ManaBarColor[UnitPowerType("raid"..this.id)]; local pcolor = ManaBarColor[UnitPowerType("raid"..this.id)]
this.power.bar:SetStatusBarColor(pcolor.r + .5, pcolor.g +.5, pcolor.b +.5, 1) this.power.bar:SetStatusBarColor(pcolor.r + .5, pcolor.g +.5, pcolor.b +.5, 1)
else else
+4 -4
View File
@@ -85,13 +85,13 @@ pfUI:RegisterModule("skin", function ()
TicketStatusFrame:SetPoint("TOPLEFT", 5, -5) TicketStatusFrame:SetPoint("TOPLEFT", 5, -5)
function TicketStatusFrame_OnEvent() function TicketStatusFrame_OnEvent()
if ( event == "PLAYER_ENTERING_WORLD" ) then if ( event == "PLAYER_ENTERING_WORLD" ) then
GetGMTicket(); GetGMTicket()
else else
if ( arg1 ~= 0 ) then if ( arg1 ~= 0 ) then
this:Show(); this:Show()
refreshTime = GMTICKET_CHECK_INTERVAL; refreshTime = GMTICKET_CHECK_INTERVAL
else else
this:Hide(); this:Hide()
end end
end end
end end
+7 -7
View File
@@ -146,7 +146,7 @@ pfUI:RegisterModule("target", function ()
pfUI.uf.target.powerText:SetText( "|cff" .. levelcolor .. level .. "|r " .. name) pfUI.uf.target.powerText:SetText( "|cff" .. levelcolor .. level .. "|r " .. name)
pfUI.uf.target.powerText:SetWidth(pfUI.uf.target:GetWidth() -30 - pfUI.uf.target.hpText:GetStringWidth()) pfUI.uf.target.powerText:SetWidth(pfUI.uf.target:GetWidth() -30 - pfUI.uf.target.hpText:GetStringWidth())
PowerColor = ManaBarColor[UnitPowerType("target")]; PowerColor = ManaBarColor[UnitPowerType("target")]
pfUI.uf.target.power.bar:SetStatusBarColor(PowerColor.r + .5, PowerColor.g +.5, PowerColor.b +.5, 1) pfUI.uf.target.power.bar:SetStatusBarColor(PowerColor.r + .5, PowerColor.g +.5, PowerColor.b +.5, 1)
pfUI.uf.target.power.bar:SetMinMaxValues(0, UnitManaMax("target")) pfUI.uf.target.power.bar:SetMinMaxValues(0, UnitManaMax("target"))
@@ -246,7 +246,7 @@ pfUI:RegisterModule("target", function ()
pfUI.uf.target.hp.bar.portrait:SetScript("OnShow", function() this:Update() end) pfUI.uf.target.hp.bar.portrait:SetScript("OnShow", function() this:Update() end)
function pfUI.uf.target.hp.bar.portrait.Update() function pfUI.uf.target.hp.bar.portrait.Update()
pfUI.uf.target.hp.bar.portrait:SetUnit("target"); pfUI.uf.target.hp.bar.portrait:SetUnit("target")
pfUI.uf.target.hp.bar.portrait:SetCamera(0) pfUI.uf.target.hp.bar.portrait:SetCamera(0)
pfUI.uf.target.hp.bar.portrait:SetAlpha(0.10) pfUI.uf.target.hp.bar.portrait:SetAlpha(0.10)
end end
@@ -295,7 +295,7 @@ pfUI:RegisterModule("target", function ()
pfUI.uf.target.combopoints:RegisterEvent("PLAYER_COMBO_POINTS") pfUI.uf.target.combopoints:RegisterEvent("PLAYER_COMBO_POINTS")
pfUI.uf.target.combopoints:RegisterEvent("UNIT_DISPLAYPOWER") pfUI.uf.target.combopoints:RegisterEvent("UNIT_DISPLAYPOWER")
pfUI.uf.target.combopoints:RegisterEvent("PLAYER_TARGET_CHANGED") pfUI.uf.target.combopoints:RegisterEvent("PLAYER_TARGET_CHANGED")
pfUI.uf.target.combopoints:RegisterEvent('UNIT_ENERGY'); pfUI.uf.target.combopoints:RegisterEvent('UNIT_ENERGY')
pfUI.uf.target.combopoints:RegisterEvent("PLAYER_ENTERING_WORLD") pfUI.uf.target.combopoints:RegisterEvent("PLAYER_ENTERING_WORLD")
pfUI.uf.target.combopoint1 = CreateFrame("Frame") pfUI.uf.target.combopoint1 = CreateFrame("Frame")
@@ -421,8 +421,8 @@ pfUI:RegisterModule("target", function ()
pfUI.uf.target.debuff.debuffs[i]:RegisterForClicks("RightButtonUp") pfUI.uf.target.debuff.debuffs[i]:RegisterForClicks("RightButtonUp")
pfUI.uf.target.debuff.debuffs[i]:ClearAllPoints() pfUI.uf.target.debuff.debuffs[i]:ClearAllPoints()
local row = 0; local row = 0
local top = 0; local top = 0
if i > 8 then row = 1 end if i > 8 then row = 1 end
if pfUI.uf.target.buff.buffs[1]:IsShown() then top = top + 1 end if pfUI.uf.target.buff.buffs[1]:IsShown() then top = top + 1 end
if pfUI.uf.target.buff.buffs[9]:IsShown() then top = top + 1 end if pfUI.uf.target.buff.buffs[9]:IsShown() then top = top + 1 end
@@ -449,8 +449,8 @@ pfUI:RegisterModule("target", function ()
function pfUI.uf.target.debuff.RefreshBuffs() function pfUI.uf.target.debuff.RefreshBuffs()
for i=1, 16 do for i=1, 16 do
local row = 0; local row = 0
local top = 0; local top = 0
if i > 8 then row = 1 end if i > 8 then row = 1 end
if pfUI.uf.target.buff.buffs[1]:IsShown() then top = top + 1 end if pfUI.uf.target.buff.buffs[1]:IsShown() then top = top + 1 end
if pfUI.uf.target.buff.buffs[9]:IsShown() then top = top + 1 end if pfUI.uf.target.buff.buffs[9]:IsShown() then top = top + 1 end
+2 -2
View File
@@ -70,7 +70,7 @@ pfUI:RegisterModule("targettarget", function ()
pfUI.uf.targettarget.hp.bar:SetValue(display - ceil(diff / pfUI_config.unitframes.animation_speed)) pfUI.uf.targettarget.hp.bar:SetValue(display - ceil(diff / pfUI_config.unitframes.animation_speed))
end end
PowerColor = ManaBarColor[UnitPowerType("targettarget")]; PowerColor = ManaBarColor[UnitPowerType("targettarget")]
pfUI.uf.targettarget.power.bar:SetStatusBarColor(PowerColor.r + .5, PowerColor.g +.5, PowerColor.b +.5, 1) pfUI.uf.targettarget.power.bar:SetStatusBarColor(PowerColor.r + .5, PowerColor.g +.5, PowerColor.b +.5, 1)
pfUI.uf.targettarget.power.bar:SetMinMaxValues(0, UnitManaMax("targettarget")) pfUI.uf.targettarget.power.bar:SetMinMaxValues(0, UnitManaMax("targettarget"))
@@ -121,7 +121,7 @@ pfUI:RegisterModule("targettarget", function ()
pfUI.uf.targettarget.hp.bar.portrait:SetScript("OnShow", function() this.Update() end) pfUI.uf.targettarget.hp.bar.portrait:SetScript("OnShow", function() this.Update() end)
function pfUI.uf.targettarget.hp.bar.portrait.Update() function pfUI.uf.targettarget.hp.bar.portrait.Update()
pfUI.uf.targettarget.hp.bar.portrait:SetUnit("targettarget"); pfUI.uf.targettarget.hp.bar.portrait:SetUnit("targettarget")
pfUI.uf.targettarget.hp.bar.portrait:SetCamera(0) pfUI.uf.targettarget.hp.bar.portrait:SetCamera(0)
pfUI.uf.targettarget.hp.bar.portrait:SetAlpha(0.10) pfUI.uf.targettarget.hp.bar.portrait:SetAlpha(0.10)
end end
+2 -2
View File
@@ -3,7 +3,7 @@ pfUI:RegisterModule("tooltip", function ()
if pfUI_config.tooltip.position == "cursor" then if pfUI_config.tooltip.position == "cursor" then
function GameTooltip_SetDefaultAnchor(tooltip, parent) function GameTooltip_SetDefaultAnchor(tooltip, parent)
tooltip:SetOwner(parent, "ANCHOR_CURSOR"); tooltip:SetOwner(parent, "ANCHOR_CURSOR")
end end
end end
@@ -40,7 +40,7 @@ pfUI:RegisterModule("tooltip", function ()
pfUI.tooltip:SetScript("OnShow", function() pfUI.tooltip:SetScript("OnShow", function()
pfUI.tooltip:Update() pfUI.tooltip:Update()
if GameTooltip:GetAnchorType() == "ANCHOR_NONE" then if GameTooltip:GetAnchorType() == "ANCHOR_NONE" then
GameTooltip:ClearAllPoints(); GameTooltip:ClearAllPoints()
if pfUI_config.tooltip.position == "bottom" then if pfUI_config.tooltip.position == "bottom" then
GameTooltip:SetPoint("BOTTOMRIGHT",pfUI.panel.right,"TOPRIGHT",0,0) GameTooltip:SetPoint("BOTTOMRIGHT",pfUI.panel.right,"TOPRIGHT",0,0)
elseif pfUI_config.tooltip.position == "chat" then elseif pfUI_config.tooltip.position == "chat" then
+6 -6
View File
@@ -41,7 +41,7 @@ pfUI:RegisterModule("xpbar", function ()
pfUI.xp:SetAlpha(pfUI.xp:GetAlpha() - .05) pfUI.xp:SetAlpha(pfUI.xp:GetAlpha() - .05)
pfUI.xp.restedbar:SetAlpha(pfUI.xp:GetAlpha()/2) pfUI.xp.restedbar:SetAlpha(pfUI.xp:GetAlpha()/2)
end end
end); end)
pfUI.xp:EnableMouse() pfUI.xp:EnableMouse()
pfUI.xp:SetScript("OnEnter", function() pfUI.xp:SetScript("OnEnter", function()
@@ -98,15 +98,15 @@ pfUI:RegisterModule("xpbar", function ()
pfUI.rep:SetScript("OnEvent", function() pfUI.rep:SetScript("OnEvent", function()
pfUI.rep:SetAlpha(0) pfUI.rep:SetAlpha(0)
for i=1, GetNumFactions() do for i=1, GetNumFactions() do
local name, description, standingID, barMin, barMax, barValue, atWarWith, canToggleAtWar, isHeader, isCollapsed, isWatched = GetFactionInfo(i); local name, description, standingID, barMin, barMax, barValue, atWarWith, canToggleAtWar, isHeader, isCollapsed, isWatched = GetFactionInfo(i)
if isWatched then if isWatched then
barMax = barMax - barMin; barMax = barMax - barMin
barValue = barValue - barMin; barValue = barValue - barMin
barMin = 0; barMin = 0
pfUI.rep.bar:SetMinMaxValues(barMin, barMax) pfUI.rep.bar:SetMinMaxValues(barMin, barMax)
pfUI.rep.bar:SetValue(barValue) pfUI.rep.bar:SetValue(barValue)
local color = FACTION_BAR_COLORS[standingID]; local color = FACTION_BAR_COLORS[standingID]
pfUI.rep.bar:SetStatusBarColor((color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5, 1) pfUI.rep.bar:SetStatusBarColor((color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5, 1)
pfUI.rep:SetAlpha(1) pfUI.rep:SetAlpha(1)
pfUI.rep.tick = GetTime() + 3.00 pfUI.rep.tick = GetTime() + 3.00
+3 -3
View File
@@ -1,9 +1,9 @@
SLASH_RELOAD1 = '/rl'; SLASH_RELOAD1 = '/rl'
function SlashCmdList.RELOAD(msg, editbox) function SlashCmdList.RELOAD(msg, editbox)
ReloadUI() ReloadUI()
end end
SLASH_PFUI1 = '/pfui'; SLASH_PFUI1 = '/pfui'
function SlashCmdList.PFUI(msg, editbox) function SlashCmdList.PFUI(msg, editbox)
if pfUI.gui:IsShown() then if pfUI.gui:IsShown() then
pfUI.gui:Hide() pfUI.gui:Hide()
@@ -12,7 +12,7 @@ function SlashCmdList.PFUI(msg, editbox)
end end
end end
SLASH_GM1, SLASH_GM2 = '/gm', '/support'; SLASH_GM1, SLASH_GM2 = '/gm', '/support'
function SlashCmdList.GM(msg, editbox) function SlashCmdList.GM(msg, editbox)
ToggleHelpFrame(1) ToggleHelpFrame(1)
end end