mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-28 10:26:02 +00:00
codestyle: remove trailing semicolons
This commit is contained in:
@@ -23,22 +23,22 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
|
||||
function ActionButton_GetPagedID(button)
|
||||
if ( button.isBonus and CURRENT_ACTIONBAR_PAGE == 1 ) then
|
||||
local offset = GetBonusBarOffset();
|
||||
local offset = GetBonusBarOffset()
|
||||
if ( offset == 0 and BonusActionBarFrame and BonusActionBarFrame.lastBonusBar ) then
|
||||
offset = BonusActionBarFrame.lastBonusBar;
|
||||
offset = BonusActionBarFrame.lastBonusBar
|
||||
end
|
||||
return (button:GetID() + ((NUM_ACTIONBAR_PAGES + offset - 1) * NUM_ACTIONBAR_BUTTONS));
|
||||
return (button:GetID() + ((NUM_ACTIONBAR_PAGES + offset - 1) * NUM_ACTIONBAR_BUTTONS))
|
||||
end
|
||||
|
||||
local parentName = button:GetParent():GetName();
|
||||
local parentName = button:GetParent():GetName()
|
||||
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
|
||||
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
|
||||
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
|
||||
return (button:GetID() + ((RIGHT_ACTIONBAR_PAGE - 1) * NUM_ACTIONBAR_BUTTONS));
|
||||
return (button:GetID() + ((RIGHT_ACTIONBAR_PAGE - 1) * NUM_ACTIONBAR_BUTTONS))
|
||||
else
|
||||
return (button:GetID() + ((CURRENT_ACTIONBAR_PAGE - 1) * NUM_ACTIONBAR_BUTTONS))
|
||||
end
|
||||
|
||||
@@ -84,7 +84,7 @@ pfUI:RegisterModule("autoshift", function ()
|
||||
for id, errorstring in pairs(pfUI.autoshift.errors) do
|
||||
if arg1 == errorstring then
|
||||
for i=0,15,1 do
|
||||
currBuffTex = GetPlayerBuffTexture(i);
|
||||
currBuffTex = GetPlayerBuffTexture(i)
|
||||
if (currBuffTex) then
|
||||
for id, bufftype in pairs(pfUI.autoshift.buffs) do
|
||||
if string.find(string.lower(currBuffTex), bufftype) then
|
||||
|
||||
+2
-2
@@ -272,9 +272,9 @@ pfUI:RegisterModule("bags", function ()
|
||||
else
|
||||
local bagtype
|
||||
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
|
||||
local _, _, _, _, itemType, subType = GetItemInfo(id);
|
||||
local _, _, _, _, itemType, subType = GetItemInfo(id)
|
||||
bagtype = pfLocaleBagtypes[pfUI.cache["locale"]][itemType]
|
||||
bagsubtype = pfLocaleBagtypes[pfUI.cache["locale"]][subType]
|
||||
|
||||
|
||||
+4
-4
@@ -47,7 +47,7 @@ pfUI:RegisterModule("buff", function ()
|
||||
|
||||
-- weapon enchants
|
||||
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 _, _, mainhand, _, _, offhand = GetWeaponEnchantInfo()
|
||||
|
||||
@@ -62,7 +62,7 @@ pfUI:RegisterModule("buff", function ()
|
||||
|
||||
if buff:GetID() == 16 then
|
||||
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)
|
||||
if itemRarity then buff:SetBackdropBorderColor(GetItemQualityColor(itemRarity)) end
|
||||
|
||||
@@ -74,7 +74,7 @@ pfUI:RegisterModule("buff", function ()
|
||||
end
|
||||
elseif buff:GetID() == 17 then
|
||||
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)
|
||||
if itemRarity then buff:SetBackdropBorderColor(GetItemQualityColor(itemRarity)) end
|
||||
if offhand and offhand > 0 then
|
||||
@@ -89,7 +89,7 @@ pfUI:RegisterModule("buff", function ()
|
||||
-- buffs
|
||||
for i=0,15,1 do
|
||||
local buff = getglobal("BuffButton" .. i)
|
||||
local icon = getglobal(buff:GetName().."Icon");
|
||||
local icon = getglobal(buff:GetName().."Icon")
|
||||
local border = getglobal(buff:GetName().."Border")
|
||||
if border then
|
||||
buff:SetBackdrop({
|
||||
|
||||
+57
-57
@@ -15,8 +15,8 @@ pfUI:RegisterModule("castbar", function ()
|
||||
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("TOPLEFT",pfUI.uf.player,"BOTTOMLEFT",0,-1)
|
||||
pfUI.castbar.player:Hide();
|
||||
pfUI.castbar.player.delay = 0;
|
||||
pfUI.castbar.player:Hide()
|
||||
pfUI.castbar.player.delay = 0
|
||||
|
||||
-- statusbar
|
||||
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")
|
||||
|
||||
-- events
|
||||
pfUI.castbar.player:RegisterEvent("SPELLCAST_START");
|
||||
pfUI.castbar.player:RegisterEvent("SPELLCAST_STOP");
|
||||
pfUI.castbar.player:RegisterEvent("SPELLCAST_DELAYED");
|
||||
pfUI.castbar.player:RegisterEvent("SPELLCAST_CHANNEL_START");
|
||||
pfUI.castbar.player:RegisterEvent("SPELLCAST_CHANNEL_STOP");
|
||||
pfUI.castbar.player:RegisterEvent("SPELLCAST_CHANNEL_UPDATE");
|
||||
pfUI.castbar.player:RegisterEvent("SPELLCAST_FAILED");
|
||||
pfUI.castbar.player:RegisterEvent("SPELLCAST_INTERRUPTED");
|
||||
pfUI.castbar.player:RegisterEvent("SPELLCAST_START")
|
||||
pfUI.castbar.player:RegisterEvent("SPELLCAST_STOP")
|
||||
pfUI.castbar.player:RegisterEvent("SPELLCAST_DELAYED")
|
||||
pfUI.castbar.player:RegisterEvent("SPELLCAST_CHANNEL_START")
|
||||
pfUI.castbar.player:RegisterEvent("SPELLCAST_CHANNEL_STOP")
|
||||
pfUI.castbar.player:RegisterEvent("SPELLCAST_CHANNEL_UPDATE")
|
||||
pfUI.castbar.player:RegisterEvent("SPELLCAST_FAILED")
|
||||
pfUI.castbar.player:RegisterEvent("SPELLCAST_INTERRUPTED")
|
||||
|
||||
pfUI.castbar.player:SetScript("OnEvent", function ()
|
||||
if ( event == "SPELLCAST_START" ) then
|
||||
pfUI.castbar.player.delay = 0;
|
||||
pfUI.castbar.player.delay = 0
|
||||
pfUI.castbar.player.spell = arg1
|
||||
pfUI.castbar.player.bar.left:SetText(arg1)
|
||||
pfUI.castbar.player.bar:SetStatusBarColor(.7,.7,.9,.8)
|
||||
pfUI.castbar.player.startTime = GetTime();
|
||||
pfUI.castbar.player.maxValue = pfUI.castbar.player.startTime + (arg2 / 1000);
|
||||
pfUI.castbar.player.startTime = GetTime()
|
||||
pfUI.castbar.player.maxValue = pfUI.castbar.player.startTime + (arg2 / 1000)
|
||||
pfUI.castbar.player.endTime = nil
|
||||
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.holdTime = 0;
|
||||
pfUI.castbar.player.casting = 1;
|
||||
pfUI.castbar.player.mode = "casting";
|
||||
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.holdTime = 0
|
||||
pfUI.castbar.player.casting = 1
|
||||
pfUI.castbar.player.mode = "casting"
|
||||
pfUI.castbar.player.fadeout = nil
|
||||
pfUI.castbar.player:SetAlpha(1)
|
||||
pfUI.castbar.player:Show()
|
||||
|
||||
elseif ( event == "SPELLCAST_CHANNEL_START" ) then
|
||||
pfUI.castbar.player.delay = 0;
|
||||
pfUI.castbar.player.delay = 0
|
||||
pfUI.castbar.player.spell = arg2
|
||||
pfUI.castbar.player.bar.left:SetText(arg2)
|
||||
pfUI.castbar.player.bar:SetStatusBarColor(.9,.9,.7,.8)
|
||||
pfUI.castbar.player.maxValue = nil;
|
||||
pfUI.castbar.player.startTime = GetTime();
|
||||
pfUI.castbar.player.endTime = pfUI.castbar.player.startTime + (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:SetValue(pfUI.castbar.player.endTime);
|
||||
pfUI.castbar.player.holdTime = 0;
|
||||
pfUI.castbar.player.casting = nil;
|
||||
pfUI.castbar.player.channeling = 1;
|
||||
pfUI.castbar.player.maxValue = nil
|
||||
pfUI.castbar.player.startTime = GetTime()
|
||||
pfUI.castbar.player.endTime = pfUI.castbar.player.startTime + (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:SetValue(pfUI.castbar.player.endTime)
|
||||
pfUI.castbar.player.holdTime = 0
|
||||
pfUI.castbar.player.casting = nil
|
||||
pfUI.castbar.player.channeling = 1
|
||||
pfUI.castbar.player.fadeout = nil
|
||||
pfUI.castbar.player:SetAlpha(1)
|
||||
pfUI.castbar.player:Show()
|
||||
@@ -119,9 +119,9 @@ pfUI:RegisterModule("castbar", function ()
|
||||
elseif ( event == "SPELLCAST_DELAYED" ) then
|
||||
if( pfUI.castbar.player:IsShown() ) then
|
||||
pfUI.castbar.player.delay = pfUI.castbar.player.delay + 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.bar:SetMinMaxValues(pfUI.castbar.player.startTime, pfUI.castbar.player.maxValue);
|
||||
pfUI.castbar.player.startTime = pfUI.castbar.player.startTime + (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)
|
||||
end
|
||||
|
||||
elseif ( event == "SPELLCAST_CHANNEL_UPDATE" ) then
|
||||
@@ -130,7 +130,7 @@ pfUI:RegisterModule("castbar", function ()
|
||||
local origDuration = pfUI.castbar.player.endTime - pfUI.castbar.player.startTime
|
||||
pfUI.castbar.player.endTime = GetTime() + (arg1 / 1000)
|
||||
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)
|
||||
@@ -149,7 +149,7 @@ pfUI:RegisterModule("castbar", function ()
|
||||
|
||||
-- cast
|
||||
if ( pfUI.castbar.player.casting ) then
|
||||
local status = GetTime();
|
||||
local status = GetTime()
|
||||
local cur = round(GetTime() - pfUI.castbar.player.startTime,1)
|
||||
local max = round(pfUI.castbar.player.maxValue - pfUI.castbar.player.startTime,1)
|
||||
local delay = pfUI.castbar.player.delay
|
||||
@@ -163,12 +163,12 @@ pfUI:RegisterModule("castbar", function ()
|
||||
else
|
||||
pfUI.castbar.player.bar.right:SetText(cur .. " / " .. max)
|
||||
end
|
||||
pfUI.castbar.player.bar:SetValue(status);
|
||||
pfUI.castbar.player.bar:SetValue(status)
|
||||
|
||||
-- channel
|
||||
elseif ( pfUI.castbar.player.channeling ) then
|
||||
local time = GetTime();
|
||||
local barValue = pfUI.castbar.player.startTime + (pfUI.castbar.player.endTime - time);
|
||||
local time = GetTime()
|
||||
local barValue = pfUI.castbar.player.startTime + (pfUI.castbar.player.endTime - time)
|
||||
local cur = round(pfUI.castbar.player.endTime - GetTime(),1)
|
||||
local max = round(pfUI.castbar.player.endTime - pfUI.castbar.player.startTime,1)
|
||||
local delay = pfUI.castbar.player.delay
|
||||
@@ -177,9 +177,9 @@ pfUI:RegisterModule("castbar", function ()
|
||||
time = pfUI.castbar.player.endTime
|
||||
end
|
||||
if ( time == pfUI.castbar.player.endTime ) then
|
||||
pfUI.castbar.player.channeling = nil;
|
||||
pfUI.castbar.player.fadeout = 1;
|
||||
return;
|
||||
pfUI.castbar.player.channeling = nil
|
||||
pfUI.castbar.player.fadeout = 1
|
||||
return
|
||||
end
|
||||
if delay > 0 then
|
||||
delay = "|cffffaaaa-" .. round(delay,1) .. " |r "
|
||||
@@ -187,7 +187,7 @@ pfUI:RegisterModule("castbar", function ()
|
||||
else
|
||||
pfUI.castbar.player.bar.right:SetText(cur)
|
||||
end
|
||||
pfUI.castbar.player.bar:SetValue( barValue );
|
||||
pfUI.castbar.player.bar:SetValue( barValue )
|
||||
end
|
||||
end)
|
||||
end
|
||||
@@ -234,23 +234,23 @@ pfUI:RegisterModule("castbar", function ()
|
||||
pfUI.castbar.target.bar.right:SetText("right")
|
||||
pfUI.castbar.target.bar.right:SetJustifyH("right")
|
||||
|
||||
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_BUFF");
|
||||
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_PERIODIC_HOSTILEPLAYER_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_FRIENDLYPLAYER_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_BUFF");
|
||||
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_CREATURE_DAMAGE");
|
||||
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_SELF_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_FRIENDLYPLAYER_DAMAGE")
|
||||
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_FRIENDLYPLAYER_BUFFS")
|
||||
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_SELF_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_PERIODIC_PARTY_DAMAGE")
|
||||
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_BUFFS")
|
||||
pfUI.castbar.target:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE")
|
||||
pfUI.castbar.target:RegisterEvent("PLAYER_TARGET_CHANGED")
|
||||
|
||||
pfUI.castbar.target.casterDB = {}
|
||||
|
||||
+35
-35
@@ -71,14 +71,14 @@ pfUI:RegisterModule("chat", function ()
|
||||
if pfUI.chat.left.panelTop.proxy.enabled == false then return end
|
||||
|
||||
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
|
||||
|
||||
if arg2 == forwardto then
|
||||
local isForward, _, name, message = string.find(arg1, "(.*): (.*)")
|
||||
if isForward then
|
||||
SendChatMessage(message, "WHISPER", nil, name);
|
||||
SendChatMessage("-> " .. name, "WHISPER", nil, forwardto);
|
||||
SendChatMessage(message, "WHISPER", nil, name)
|
||||
SendChatMessage("-> " .. name, "WHISPER", nil, forwardto)
|
||||
end
|
||||
end
|
||||
end)
|
||||
@@ -88,7 +88,7 @@ pfUI:RegisterModule("chat", function ()
|
||||
pfUI.chat.left.panelTop.proxyName:SetHeight(100)
|
||||
pfUI.chat.left.panelTop.proxyName:SetWidth(200)
|
||||
pfUI.chat.left.panelTop.proxyName:SetBackdrop(pfUI.backdrop)
|
||||
pfUI.chat.left.panelTop.proxyName:SetScript("OnShow", function()
|
||||
pfUI.chat.left.panelTop.proxyName:SetScript("OnShow", function()
|
||||
pfUI.chat.left.panelTop.proxyName.input:SetText(pfUI.chat.left.panelTop.proxy.forwardto)
|
||||
end)
|
||||
|
||||
@@ -337,22 +337,22 @@ pfUI:RegisterModule("chat", function ()
|
||||
|
||||
FCF_SetLocked(ChatFrame1, 1)
|
||||
FCF_SetWindowName(ChatFrame1, GENERAL)
|
||||
FCF_SetWindowColor(ChatFrame1, 0, 0, 0);
|
||||
FCF_SetWindowAlpha(ChatFrame1, 0);
|
||||
FCF_SetWindowColor(ChatFrame1, 0, 0, 0)
|
||||
FCF_SetWindowAlpha(ChatFrame1, 0)
|
||||
FCF_SetChatWindowFontSize(ChatFrame1, 12)
|
||||
|
||||
-- set position of Combat
|
||||
if not ChatFrame2:IsShown() then
|
||||
FCF_OpenNewWindow("Combat Log")
|
||||
end
|
||||
FCF_SetLocked(ChatFrame2, 1);
|
||||
FCF_SetWindowName(ChatFrame2, COMBAT_LOG);
|
||||
FCF_SetWindowColor(ChatFrame2, 0, 0, 0);
|
||||
FCF_SetWindowAlpha(ChatFrame2, 0);
|
||||
FCF_SetLocked(ChatFrame2, 1)
|
||||
FCF_SetWindowName(ChatFrame2, COMBAT_LOG)
|
||||
FCF_SetWindowColor(ChatFrame2, 0, 0, 0)
|
||||
FCF_SetWindowAlpha(ChatFrame2, 0)
|
||||
FCF_SetChatWindowFontSize(ChatFrame2, 12)
|
||||
ChatFrame_RemoveAllChannels(ChatFrame2);
|
||||
ChatFrame_RemoveAllMessageGroups(ChatFrame2);
|
||||
ChatFrame_ActivateCombatMessages(ChatFrame2);
|
||||
ChatFrame_RemoveAllChannels(ChatFrame2)
|
||||
ChatFrame_RemoveAllMessageGroups(ChatFrame2)
|
||||
ChatFrame_ActivateCombatMessages(ChatFrame2)
|
||||
|
||||
-- set position of Loot & Spam
|
||||
if not ChatFrame3:IsShown() then
|
||||
@@ -360,19 +360,19 @@ pfUI:RegisterModule("chat", function ()
|
||||
end
|
||||
FCF_SetLocked(ChatFrame3, 1)
|
||||
FCF_SetWindowName(ChatFrame3, "Loot & Spam")
|
||||
FCF_SetWindowColor(ChatFrame3, 0, 0, 0);
|
||||
FCF_SetWindowAlpha(ChatFrame3, 0);
|
||||
FCF_SetWindowColor(ChatFrame3, 0, 0, 0)
|
||||
FCF_SetWindowAlpha(ChatFrame3, 0)
|
||||
FCF_SetChatWindowFontSize(ChatFrame3, 12)
|
||||
FCF_UnDockFrame(ChatFrame3)
|
||||
FCF_SetTabPosition(ChatFrame3, 0);
|
||||
FCF_SetTabPosition(ChatFrame3, 0)
|
||||
ChatFrame3:ClearAllPoints()
|
||||
ChatFrame3:SetPoint("TOPLEFT", pfUI.chat.right ,"TOPLEFT", 5, -25)
|
||||
ChatFrame3:SetPoint("BOTTOMRIGHT", pfUI.chat.right ,"BOTTOMRIGHT", -5, 25)
|
||||
|
||||
-- save positions on logout
|
||||
ChatFrame1:SetUserPlaced(1);
|
||||
ChatFrame2:SetUserPlaced(1);
|
||||
ChatFrame3:SetUserPlaced(1);
|
||||
ChatFrame1:SetUserPlaced(1)
|
||||
ChatFrame2:SetUserPlaced(1)
|
||||
ChatFrame3:SetUserPlaced(1)
|
||||
end
|
||||
|
||||
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
|
||||
if ( not ChatFrame1.init ) then
|
||||
for i=1, NUM_CHAT_WINDOWS do
|
||||
getglobal("ChatFrame"..i.."TabDockRegion"):Show();
|
||||
FCF_UpdateButtonSide(getglobal("ChatFrame"..i));
|
||||
getglobal("ChatFrame"..i.."TabDockRegion"):Show()
|
||||
FCF_UpdateButtonSide(getglobal("ChatFrame"..i))
|
||||
end
|
||||
ChatFrame1.init = 1;
|
||||
return;
|
||||
ChatFrame1.init = 1
|
||||
return
|
||||
elseif ( ChatFrame1.init == 1 ) then
|
||||
for i=1, NUM_CHAT_WINDOWS do
|
||||
getglobal("ChatFrame"..i.."TabDockRegion"):Hide();
|
||||
getglobal("ChatFrame"..i.."TabDockRegion"):Hide()
|
||||
end
|
||||
ChatFrame1.init = 2;
|
||||
ChatFrame1.init = 2
|
||||
end
|
||||
|
||||
-- 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
|
||||
-- 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
|
||||
local updateAllButtons = nil;
|
||||
local updateAllButtons = nil
|
||||
if (FCF_UpdateButtonSide(MOVING_CHATFRAME) and MOVING_CHATFRAME == DEFAULT_CHAT_FRAME ) then
|
||||
updateAllButtons = 1;
|
||||
updateAllButtons = 1
|
||||
end
|
||||
local dockRegion;
|
||||
local dockRegion
|
||||
for index, value in DOCKED_CHAT_FRAMES do
|
||||
if ( updateAllButtons ) then
|
||||
FCF_UpdateButtonSide(value);
|
||||
FCF_UpdateButtonSide(value)
|
||||
end
|
||||
|
||||
dockRegion = getglobal(value:GetName().."TabDockRegion");
|
||||
dockRegion = getglobal(value:GetName().."TabDockRegion")
|
||||
if ( MouseIsOver(dockRegion) and MOVING_CHATFRAME ~= DEFAULT_CHAT_FRAME ) then
|
||||
dockRegion:Show();
|
||||
dockRegion:Show()
|
||||
else
|
||||
dockRegion:Hide();
|
||||
dockRegion:Hide()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- If the default chat frame is resizing, then resize the dock
|
||||
if ( DEFAULT_CHAT_FRAME.resizing ) then
|
||||
FCF_DockUpdate();
|
||||
FCF_DockUpdate()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -488,7 +488,7 @@ pfUI:RegisterModule("chat", function ()
|
||||
ChatFrameEditBox:SetAltArrowKeyMode(false)
|
||||
|
||||
local default = " " .. "%s" .. "|r:" .. "\32"
|
||||
CHAT_CHANNEL_GET = "%s" .. "|r:" .. "\32";
|
||||
CHAT_CHANNEL_GET = "%s" .. "|r:" .. "\32"
|
||||
CHAT_GUILD_GET = '[G]' .. default
|
||||
CHAT_OFFICER_GET = '[O]'.. default
|
||||
CHAT_PARTY_GET = '[P]' .. default
|
||||
|
||||
@@ -2,13 +2,13 @@ pfUI:RegisterModule("cooldown", function ()
|
||||
function CooldownFrame_SetTimer(this, start, duration, enable)
|
||||
if not this then return end
|
||||
-- disable animation
|
||||
this:SetPosition(1,1,1);
|
||||
this:SetPosition(1,1,1)
|
||||
|
||||
if ( start > 0 and duration > 0 and enable > 0) then
|
||||
this.start = start;
|
||||
this.duration = duration;
|
||||
this.stopping = 0;
|
||||
this:SetSequence(0);
|
||||
this.start = start
|
||||
this.duration = duration
|
||||
this.stopping = 0
|
||||
this:SetSequence(0)
|
||||
|
||||
if not this.cd then
|
||||
this.cd = CreateFrame("Frame")
|
||||
@@ -28,7 +28,7 @@ pfUI:RegisterModule("cooldown", function ()
|
||||
this.cd.text:SetJustifyH("CENTER")
|
||||
this.cd.text:SetFontObject(GameFontWhite)
|
||||
end
|
||||
this:Show();
|
||||
this:Show()
|
||||
else
|
||||
this:Hide()
|
||||
if this.cd then this.cd:Hide() end
|
||||
@@ -55,16 +55,16 @@ pfUI:RegisterModule("cooldown", function ()
|
||||
|
||||
this.cd.text:SetText(ceil(remaining)..unit)
|
||||
else
|
||||
this:Hide();
|
||||
this:Hide()
|
||||
this.cd:Hide()
|
||||
this.stopping = 1;
|
||||
this.stopping = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function CooldownFrame_OnAnimFinished()
|
||||
if ( this.stopping == 1 ) then
|
||||
this:Hide();
|
||||
this:Hide()
|
||||
this.cd:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
+9
-9
@@ -146,8 +146,8 @@ pfUI:RegisterModule("group", function ()
|
||||
pfUI.uf.group[i]:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
|
||||
|
||||
pfUI.uf.group[i]:SetScript("OnEnter", function()
|
||||
GameTooltip:SetOwner(this, "ANCHOR_NONE");
|
||||
GameTooltip:SetUnit("party" .. this.id);
|
||||
GameTooltip:SetOwner(this, "ANCHOR_NONE")
|
||||
GameTooltip:SetUnit("party" .. this.id)
|
||||
GameTooltip:Show()
|
||||
end)
|
||||
|
||||
@@ -157,20 +157,20 @@ pfUI:RegisterModule("group", function ()
|
||||
|
||||
pfUI.uf.group[i]:SetScript("OnClick", function ()
|
||||
if ( SpellIsTargeting() and arg1 == "RightButton" ) then
|
||||
SpellStopTargeting();
|
||||
return;
|
||||
SpellStopTargeting()
|
||||
return
|
||||
end
|
||||
|
||||
if ( arg1 == "LeftButton" ) then
|
||||
if ( SpellIsTargeting() ) then
|
||||
SpellTargetUnit("party" .. this.id);
|
||||
SpellTargetUnit("party" .. this.id)
|
||||
elseif ( CursorHasItem() ) then
|
||||
DropItemOnUnit("party" .. this.id);
|
||||
DropItemOnUnit("party" .. this.id)
|
||||
else
|
||||
TargetUnit("party" .. this.id);
|
||||
TargetUnit("party" .. this.id)
|
||||
end
|
||||
else
|
||||
local x, y = GetCursorPosition();
|
||||
local x, y = GetCursorPosition()
|
||||
ToggleDropDownMenu(1, nil, getglobal("PartyMemberFrame" .. this.id .. "DropDown"), "cursor")
|
||||
end
|
||||
end)
|
||||
@@ -213,7 +213,7 @@ pfUI:RegisterModule("group", function ()
|
||||
|
||||
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.caption:SetText(UnitName("party"..this.id))
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui = CreateFrame("Frame",nil,UIParent)
|
||||
|
||||
pfUI.gui:RegisterEvent("PLAYER_ENTERING_WORLD");
|
||||
pfUI.gui:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
|
||||
pfUI.gui:SetFrameStrata("DIALOG")
|
||||
pfUI.gui:SetWidth(480)
|
||||
@@ -9,7 +9,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui:Hide()
|
||||
|
||||
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:SetMovable(true)
|
||||
pfUI.gui:EnableMouse(true)
|
||||
@@ -65,7 +65,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui.reloadDialog.yes:SetText("Yes")
|
||||
pfUI.gui.reloadDialog.yes:SetScript("OnClick", function()
|
||||
pfUI.gui.settingChanged = nil
|
||||
ReloadUI();
|
||||
ReloadUI()
|
||||
end)
|
||||
|
||||
pfUI.gui.reloadDialog.no = CreateFrame("Button", "pfReloadNo", pfUI.gui.reloadDialog, "UIPanelButtonTemplate")
|
||||
@@ -430,7 +430,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
end
|
||||
|
||||
UIDropDownMenu_Initialize(frame.input, createValues)
|
||||
UIDropDownMenu_SetWidth(120, frame.input);
|
||||
UIDropDownMenu_SetWidth(120, frame.input)
|
||||
UIDropDownMenu_SetButtonWidth(125, frame.input)
|
||||
UIDropDownMenu_JustifyText("RIGHT", frame.input)
|
||||
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("BOTTOMRIGHT", pfUI.gui, "BOTTOMRIGHT", 0,0)
|
||||
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:SetPoint("TOPRIGHT", 0,0)
|
||||
|
||||
+7
-7
@@ -21,10 +21,10 @@ pfUI:RegisterModule("loot", function ()
|
||||
|
||||
frame:SetScript("OnClick", function()
|
||||
if ( IsControlKeyDown() ) then
|
||||
DressUpItemLink(GetLootSlotLink(this:GetID()));
|
||||
DressUpItemLink(GetLootSlotLink(this:GetID()))
|
||||
elseif ( IsShiftKeyDown() ) then
|
||||
if ( ChatFrameEditBox:IsVisible() ) then
|
||||
ChatFrameEditBox:Insert(GetLootSlotLink(this:GetID()));
|
||||
ChatFrameEditBox:Insert(GetLootSlotLink(this:GetID()))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -182,7 +182,7 @@ pfUI:RegisterModule("loot", function ()
|
||||
|
||||
if event == "LOOT_CLOSED" then
|
||||
StaticPopup_Hide("LOOT_BIND")
|
||||
HideUIPanel(this);
|
||||
HideUIPanel(this)
|
||||
for _, v in pairs(this.slots) do
|
||||
v:Hide()
|
||||
end
|
||||
@@ -194,14 +194,14 @@ pfUI:RegisterModule("loot", function ()
|
||||
|
||||
function GroupLootDropDown_GiveLoot()
|
||||
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
|
||||
dialog.data = this.value;
|
||||
dialog.data = this.value
|
||||
end
|
||||
else
|
||||
GiveMasterLoot(pfUI.loot.selectedSlot, this.value);
|
||||
GiveMasterLoot(pfUI.loot.selectedSlot, this.value)
|
||||
end
|
||||
CloseDropDownMenus();
|
||||
CloseDropDownMenus()
|
||||
end
|
||||
|
||||
StaticPopupDialogs["CONFIRM_LOOT_DISTRIBUTION"].OnAccept = function(data)
|
||||
|
||||
+29
-29
@@ -18,23 +18,23 @@ pfUI:RegisterModule("panel", function ()
|
||||
pfUI.panel:SetScript("OnEvent", function()
|
||||
if event == "PLAYER_ENTERING_WORLD" then
|
||||
pfUI.panel:UpdateGold()
|
||||
pfUI.panel:UpdateRepair();
|
||||
pfUI.panel:UpdateRepair()
|
||||
pfUI.panel:UpdateExp()
|
||||
pfUI.panel:UpdateFriend()
|
||||
pfUI.panel:UpdateGuild();
|
||||
pfUI.panel:UpdateRepair();
|
||||
pfUI.panel:UpdateZone();
|
||||
pfUI.panel:UpdateGuild()
|
||||
pfUI.panel:UpdateRepair()
|
||||
pfUI.panel:UpdateZone()
|
||||
elseif event == "PLAYER_MONEY" then
|
||||
pfUI.panel:UpdateGold()
|
||||
pfUI.panel:UpdateRepair();
|
||||
pfUI.panel:UpdateRepair()
|
||||
elseif event == "PLAYER_XP_UPDATE" then
|
||||
pfUI.panel:UpdateExp()
|
||||
elseif event == "FRIENDLIST_UPDATE" then
|
||||
pfUI.panel:UpdateFriend()
|
||||
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
|
||||
pfUI.panel:UpdateRepair();
|
||||
pfUI.panel:UpdateRepair()
|
||||
elseif event == "MINIMAP_ZONE_CHANGED" then
|
||||
pfUI.panel:UpdateZone()
|
||||
end
|
||||
@@ -46,11 +46,11 @@ pfUI:RegisterModule("panel", function ()
|
||||
if GetTime() >= pfUI.panel.clock.tick + 1 then
|
||||
pfUI.panel.clock.tick = GetTime()
|
||||
pfUI.panel:OutputPanel("time", date("%H:%M:%S"))
|
||||
local _, _, lag = GetNetStats();
|
||||
local fps = floor(GetFramerate());
|
||||
local _, _, lag = GetNetStats()
|
||||
local fps = floor(GetFramerate())
|
||||
pfUI.panel:OutputPanel("fps", floor(GetFramerate()) .. " fps & " .. lag .. " ms")
|
||||
end
|
||||
end);
|
||||
end)
|
||||
|
||||
-- Update "exp"
|
||||
function pfUI.panel:UpdateExp ()
|
||||
@@ -147,12 +147,12 @@ pfUI:RegisterModule("panel", function ()
|
||||
|
||||
-- Update "friends"
|
||||
function pfUI.panel:UpdateFriend ()
|
||||
local online = 0;
|
||||
local all = GetNumFriends();
|
||||
local online = 0
|
||||
local all = GetNumFriends()
|
||||
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
|
||||
online = online + 1;
|
||||
online = online + 1
|
||||
end
|
||||
end
|
||||
pfUI.panel:OutputPanel("friends", "Friends: " .. online)
|
||||
@@ -161,8 +161,8 @@ pfUI:RegisterModule("panel", function ()
|
||||
-- Update "guild"
|
||||
function pfUI.panel:UpdateGuild ()
|
||||
GuildRoster()
|
||||
local online = GetNumGuildMembers();
|
||||
local all = GetNumGuildMembers(true);
|
||||
local online = GetNumGuildMembers()
|
||||
local all = GetNumGuildMembers(true)
|
||||
pfUI.panel:OutputPanel("guild", "Guild: "..online)
|
||||
end
|
||||
|
||||
@@ -170,29 +170,29 @@ pfUI:RegisterModule("panel", function ()
|
||||
local repairToolTip = CreateFrame('GameTooltip', "repairToolTip", this, "GameTooltipTemplate")
|
||||
function pfUI.panel:UpdateRepair ()
|
||||
local slotnames = { "Head", "Shoulder", "Chest", "Wrist",
|
||||
"Hands", "Waist", "Legs", "Feet", "MainHand", "SecondaryHand", "Ranged", };
|
||||
local id, hasItem, repairCost;
|
||||
local itemName, durability, tmpText, midpt, lval, rval;
|
||||
"Hands", "Waist", "Legs", "Feet", "MainHand", "SecondaryHand", "Ranged", }
|
||||
local id, hasItem, repairCost
|
||||
local itemName, durability, tmpText, midpt, lval, rval
|
||||
|
||||
duraLowestslotName = nil;
|
||||
repPercent = 100;
|
||||
lowestPercent = 100;
|
||||
duraLowestslotName = nil
|
||||
repPercent = 100
|
||||
lowestPercent = 100
|
||||
|
||||
for i,slotName in pairs(slotnames) do
|
||||
id, _ = GetInventorySlotInfo(slotName.. "Slot");
|
||||
id, _ = GetInventorySlotInfo(slotName.. "Slot")
|
||||
repairToolTip:Hide()
|
||||
repairToolTip:SetOwner(this, "ANCHOR_LEFT");
|
||||
hasItem, _, repCost = repairToolTip:SetInventoryItem("player", id);
|
||||
repairToolTip:SetOwner(this, "ANCHOR_LEFT")
|
||||
hasItem, _, repCost = repairToolTip:SetInventoryItem("player", id)
|
||||
if (not hasItem) then repairToolTip:ClearLines()
|
||||
else
|
||||
for i=1, 30, 1 do
|
||||
tmpText = getglobal("repairToolTipTextLeft"..i);
|
||||
tmpText = getglobal("repairToolTipTextLeft"..i)
|
||||
if (tmpText ~= nil) and (tmpText:GetText()) then
|
||||
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
|
||||
repPercent = math.floor(lval / rval * 100)
|
||||
break;
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -207,7 +207,7 @@ pfUI:RegisterModule("panel", function ()
|
||||
|
||||
function pfUI.panel:UpdateZone ()
|
||||
local tooltip = function ()
|
||||
local posX, posY = GetPlayerMapPosition("player");
|
||||
local posX, posY = GetPlayerMapPosition("player")
|
||||
local real = GetRealZoneText()
|
||||
local sub = GetSubZoneText()
|
||||
GameTooltip:ClearLines()
|
||||
|
||||
+10
-10
@@ -14,11 +14,11 @@ pfUI:RegisterModule("pet", function ()
|
||||
|
||||
pfUI.uf.pet:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
pfUI.uf.pet:RegisterEvent("UNIT_PET")
|
||||
pfUI.uf.pet:RegisterEvent("UNIT_COMBAT");
|
||||
pfUI.uf.pet:RegisterEvent("UNIT_AURA");
|
||||
pfUI.uf.pet:RegisterEvent("PET_ATTACK_START");
|
||||
pfUI.uf.pet:RegisterEvent("PET_ATTACK_STOP");
|
||||
pfUI.uf.pet:RegisterEvent("UNIT_HAPPINESS");
|
||||
pfUI.uf.pet:RegisterEvent("UNIT_COMBAT")
|
||||
pfUI.uf.pet:RegisterEvent("UNIT_AURA")
|
||||
pfUI.uf.pet:RegisterEvent("PET_ATTACK_START")
|
||||
pfUI.uf.pet:RegisterEvent("PET_ATTACK_STOP")
|
||||
pfUI.uf.pet:RegisterEvent("UNIT_HAPPINESS")
|
||||
|
||||
pfUI.uf.pet:RegisterEvent("UNIT_HEALTH")
|
||||
pfUI.uf.pet:RegisterEvent("UNIT_MAXHEALTH")
|
||||
@@ -71,7 +71,7 @@ pfUI:RegisterModule("pet", function ()
|
||||
pfUI.uf.pet.hpReal = hp
|
||||
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:SetMinMaxValues(0, UnitManaMax("pet"))
|
||||
end)
|
||||
@@ -234,8 +234,8 @@ pfUI:RegisterModule("pet", function ()
|
||||
pfUI.uf.pet.debuff.debuffs[i]:RegisterForClicks("RightButtonUp")
|
||||
pfUI.uf.pet.debuff.debuffs[i]:ClearAllPoints()
|
||||
|
||||
local row = 0;
|
||||
local top = 0;
|
||||
local row = 0
|
||||
local top = 0
|
||||
local debuffsize = pfUI.uf.pet.hp:GetWidth()/8 - 1
|
||||
if i > 8 then row = 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()
|
||||
local debuffsize = pfUI.uf.pet.hp:GetWidth()/8 - 1
|
||||
for i=1, 16 do
|
||||
local row = 0;
|
||||
local top = 0;
|
||||
local row = 0
|
||||
local top = 0
|
||||
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[9]:IsShown() then top = top + 1 end
|
||||
|
||||
+6
-6
@@ -120,7 +120,7 @@ pfUI:RegisterModule("player", function ()
|
||||
pfUI.uf.player.hpText:SetText(hp)
|
||||
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:SetMinMaxValues(0, UnitManaMax("player"))
|
||||
|
||||
@@ -209,7 +209,7 @@ pfUI:RegisterModule("player", function ()
|
||||
pfUI.uf.player.hp.bar.portrait:SetScript("OnShow", function() this:Update() end)
|
||||
|
||||
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:SetAlpha(0.10)
|
||||
end
|
||||
@@ -372,8 +372,8 @@ pfUI:RegisterModule("player", function ()
|
||||
pfUI.uf.player.debuff.debuffs[i]:RegisterForClicks("RightButtonUp")
|
||||
pfUI.uf.player.debuff.debuffs[i]:ClearAllPoints()
|
||||
|
||||
local row = 0;
|
||||
local top = 0;
|
||||
local row = 0
|
||||
local top = 0
|
||||
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[9]:IsShown() then top = top + 1 end
|
||||
@@ -421,8 +421,8 @@ pfUI:RegisterModule("player", function ()
|
||||
|
||||
function pfUI.uf.player.debuff.RefreshBuffs()
|
||||
for i=1, 16 do
|
||||
local row = 0;
|
||||
local top = 0;
|
||||
local row = 0
|
||||
local top = 0
|
||||
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[9]:IsShown() then top = top + 1 end
|
||||
|
||||
+13
-13
@@ -14,7 +14,7 @@ pfUI:RegisterModule("raid", function ()
|
||||
|
||||
-- sort players into roster
|
||||
for i=1, GetNumRaidMembers() do
|
||||
local name, _, subgroup = GetRaidRosterInfo(i);
|
||||
local name, _, subgroup = GetRaidRosterInfo(i)
|
||||
if name then
|
||||
for subindex = 1, 5 do
|
||||
ids = subindex + 5*(subgroup-1)
|
||||
@@ -111,8 +111,8 @@ pfUI:RegisterModule("raid", function ()
|
||||
pfUI.uf.raid[i]:RegisterForClicks('LeftButtonUp', 'RightButtonUp')
|
||||
|
||||
pfUI.uf.raid[i]:SetScript("OnEnter", function()
|
||||
GameTooltip:SetOwner(this, "ANCHOR_NONE");
|
||||
GameTooltip:SetUnit("raid" .. this.id);
|
||||
GameTooltip:SetOwner(this, "ANCHOR_NONE")
|
||||
GameTooltip:SetUnit("raid" .. this.id)
|
||||
GameTooltip:Show()
|
||||
end)
|
||||
|
||||
@@ -122,17 +122,17 @@ pfUI:RegisterModule("raid", function ()
|
||||
|
||||
pfUI.uf.raid[i]:SetScript("OnClick", function ()
|
||||
if ( SpellIsTargeting() and arg1 == "RightButton" ) then
|
||||
SpellStopTargeting();
|
||||
return;
|
||||
SpellStopTargeting()
|
||||
return
|
||||
end
|
||||
|
||||
if ( arg1 == "LeftButton" ) then
|
||||
if ( SpellIsTargeting() ) then
|
||||
SpellTargetUnit("raid" .. this.id);
|
||||
SpellTargetUnit("raid" .. this.id)
|
||||
elseif ( CursorHasItem() ) then
|
||||
DropItemOnUnit("raid" .. this.id);
|
||||
DropItemOnUnit("raid" .. this.id)
|
||||
else
|
||||
TargetUnit("raid" .. this.id);
|
||||
TargetUnit("raid" .. this.id)
|
||||
-- clickcast: shift modifier
|
||||
if IsShiftKeyDown() then
|
||||
if pfUI_config.unitframes.raid.clickcast_shift ~= "" then
|
||||
@@ -166,15 +166,15 @@ pfUI:RegisterModule("raid", function ()
|
||||
return
|
||||
else
|
||||
-- no clickcast: default action
|
||||
TargetUnit("raid" .. this.id);
|
||||
TargetUnit("raid" .. this.id)
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
ToggleDropDownMenu(1, nil, getglobal("RaidMemberFrame" .. this.id .. "DropDown"), "cursor")
|
||||
FriendsDropDown.initialize = RaidFrameDropDown_Initialize;
|
||||
FriendsDropDown.displayMode = "MENU";
|
||||
ToggleDropDownMenu(1, nil, FriendsDropDown, "cursor");
|
||||
FriendsDropDown.initialize = RaidFrameDropDown_Initialize
|
||||
FriendsDropDown.displayMode = "MENU"
|
||||
ToggleDropDownMenu(1, nil, FriendsDropDown, "cursor")
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -222,7 +222,7 @@ pfUI:RegisterModule("raid", function ()
|
||||
|
||||
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)
|
||||
|
||||
else
|
||||
|
||||
+4
-4
@@ -85,13 +85,13 @@ pfUI:RegisterModule("skin", function ()
|
||||
TicketStatusFrame:SetPoint("TOPLEFT", 5, -5)
|
||||
function TicketStatusFrame_OnEvent()
|
||||
if ( event == "PLAYER_ENTERING_WORLD" ) then
|
||||
GetGMTicket();
|
||||
GetGMTicket()
|
||||
else
|
||||
if ( arg1 ~= 0 ) then
|
||||
this:Show();
|
||||
refreshTime = GMTICKET_CHECK_INTERVAL;
|
||||
this:Show()
|
||||
refreshTime = GMTICKET_CHECK_INTERVAL
|
||||
else
|
||||
this:Hide();
|
||||
this:Hide()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+7
-7
@@ -146,7 +146,7 @@ pfUI:RegisterModule("target", function ()
|
||||
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())
|
||||
|
||||
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:SetMinMaxValues(0, UnitManaMax("target"))
|
||||
|
||||
@@ -246,7 +246,7 @@ pfUI:RegisterModule("target", function ()
|
||||
pfUI.uf.target.hp.bar.portrait:SetScript("OnShow", function() this:Update() end)
|
||||
|
||||
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:SetAlpha(0.10)
|
||||
end
|
||||
@@ -295,7 +295,7 @@ pfUI:RegisterModule("target", function ()
|
||||
pfUI.uf.target.combopoints:RegisterEvent("PLAYER_COMBO_POINTS")
|
||||
pfUI.uf.target.combopoints:RegisterEvent("UNIT_DISPLAYPOWER")
|
||||
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.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]:ClearAllPoints()
|
||||
|
||||
local row = 0;
|
||||
local top = 0;
|
||||
local row = 0
|
||||
local top = 0
|
||||
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[9]:IsShown() then top = top + 1 end
|
||||
@@ -449,8 +449,8 @@ pfUI:RegisterModule("target", function ()
|
||||
|
||||
function pfUI.uf.target.debuff.RefreshBuffs()
|
||||
for i=1, 16 do
|
||||
local row = 0;
|
||||
local top = 0;
|
||||
local row = 0
|
||||
local top = 0
|
||||
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[9]:IsShown() then top = top + 1 end
|
||||
|
||||
@@ -70,7 +70,7 @@ pfUI:RegisterModule("targettarget", function ()
|
||||
pfUI.uf.targettarget.hp.bar:SetValue(display - ceil(diff / pfUI_config.unitframes.animation_speed))
|
||||
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:SetMinMaxValues(0, UnitManaMax("targettarget"))
|
||||
|
||||
@@ -121,7 +121,7 @@ pfUI:RegisterModule("targettarget", function ()
|
||||
pfUI.uf.targettarget.hp.bar.portrait:SetScript("OnShow", function() this.Update() end)
|
||||
|
||||
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:SetAlpha(0.10)
|
||||
end
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@ pfUI:RegisterModule("tooltip", function ()
|
||||
|
||||
if pfUI_config.tooltip.position == "cursor" then
|
||||
function GameTooltip_SetDefaultAnchor(tooltip, parent)
|
||||
tooltip:SetOwner(parent, "ANCHOR_CURSOR");
|
||||
tooltip:SetOwner(parent, "ANCHOR_CURSOR")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -40,7 +40,7 @@ pfUI:RegisterModule("tooltip", function ()
|
||||
pfUI.tooltip:SetScript("OnShow", function()
|
||||
pfUI.tooltip:Update()
|
||||
if GameTooltip:GetAnchorType() == "ANCHOR_NONE" then
|
||||
GameTooltip:ClearAllPoints();
|
||||
GameTooltip:ClearAllPoints()
|
||||
if pfUI_config.tooltip.position == "bottom" then
|
||||
GameTooltip:SetPoint("BOTTOMRIGHT",pfUI.panel.right,"TOPRIGHT",0,0)
|
||||
elseif pfUI_config.tooltip.position == "chat" then
|
||||
|
||||
+6
-6
@@ -41,7 +41,7 @@ pfUI:RegisterModule("xpbar", function ()
|
||||
pfUI.xp:SetAlpha(pfUI.xp:GetAlpha() - .05)
|
||||
pfUI.xp.restedbar:SetAlpha(pfUI.xp:GetAlpha()/2)
|
||||
end
|
||||
end);
|
||||
end)
|
||||
|
||||
pfUI.xp:EnableMouse()
|
||||
pfUI.xp:SetScript("OnEnter", function()
|
||||
@@ -98,15 +98,15 @@ pfUI:RegisterModule("xpbar", function ()
|
||||
pfUI.rep:SetScript("OnEvent", function()
|
||||
pfUI.rep:SetAlpha(0)
|
||||
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
|
||||
barMax = barMax - barMin;
|
||||
barValue = barValue - barMin;
|
||||
barMin = 0;
|
||||
barMax = barMax - barMin
|
||||
barValue = barValue - barMin
|
||||
barMin = 0
|
||||
|
||||
pfUI.rep.bar:SetMinMaxValues(barMin, barMax)
|
||||
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:SetAlpha(1)
|
||||
pfUI.rep.tick = GetTime() + 3.00
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
SLASH_RELOAD1 = '/rl';
|
||||
SLASH_RELOAD1 = '/rl'
|
||||
function SlashCmdList.RELOAD(msg, editbox)
|
||||
ReloadUI()
|
||||
end
|
||||
|
||||
SLASH_PFUI1 = '/pfui';
|
||||
SLASH_PFUI1 = '/pfui'
|
||||
function SlashCmdList.PFUI(msg, editbox)
|
||||
if pfUI.gui:IsShown() then
|
||||
pfUI.gui:Hide()
|
||||
@@ -12,7 +12,7 @@ function SlashCmdList.PFUI(msg, editbox)
|
||||
end
|
||||
end
|
||||
|
||||
SLASH_GM1, SLASH_GM2 = '/gm', '/support';
|
||||
SLASH_GM1, SLASH_GM2 = '/gm', '/support'
|
||||
function SlashCmdList.GM(msg, editbox)
|
||||
ToggleHelpFrame(1)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user