mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-06 13:40:00 +00:00
codestyle: remove trailing semicolons
This commit is contained in:
+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 = {}
|
||||
|
||||
Reference in New Issue
Block a user