Apply auto formatting to all source files
This commit is contained in:
@@ -19,7 +19,7 @@ omif.events = {} -- event (str) to list of handlers
|
|||||||
omif.db = nil
|
omif.db = nil
|
||||||
|
|
||||||
OmicronFrames = {}
|
OmicronFrames = {}
|
||||||
omif.modules = {public=OmicronFrames}
|
omif.modules = { public = OmicronFrames }
|
||||||
-- Simple function that creates or returns a local module table
|
-- Simple function that creates or returns a local module table
|
||||||
function omif.GetModule(name)
|
function omif.GetModule(name)
|
||||||
if omif.modules[name] == nil then
|
if omif.modules[name] == nil then
|
||||||
@@ -66,6 +66,7 @@ function omif.OnAddonLoaded(name)
|
|||||||
omif.MainEventHandler(nil, "OMICRON_LOADING")
|
omif.MainEventHandler(nil, "OMICRON_LOADING")
|
||||||
print("Loaded", AddonName)
|
print("Loaded", AddonName)
|
||||||
end
|
end
|
||||||
|
|
||||||
omif.SetEventHandler("ADDON_LOADED", omif.OnAddonLoaded)
|
omif.SetEventHandler("ADDON_LOADED", omif.OnAddonLoaded)
|
||||||
|
|
||||||
-- Fire custom event OMICRON_FULLY_LOADED. This event is fired when the player
|
-- Fire custom event OMICRON_FULLY_LOADED. This event is fired when the player
|
||||||
@@ -75,6 +76,7 @@ function omif.FireFullyLoadedEvent(initialLogin, reloadUI)
|
|||||||
omif.MainEventHandler(nil, "OMICRON_FULLY_LOADED")
|
omif.MainEventHandler(nil, "OMICRON_FULLY_LOADED")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
omif.SetEventHandler("PLAYER_ENTERING_WORLD", omif.FireFullyLoadedEvent)
|
omif.SetEventHandler("PLAYER_ENTERING_WORLD", omif.FireFullyLoadedEvent)
|
||||||
|
|
||||||
function omif.SlashCommand(args)
|
function omif.SlashCommand(args)
|
||||||
|
@@ -24,39 +24,86 @@ types.AuraList = AuraList
|
|||||||
|
|
||||||
local statusLists = {
|
local statusLists = {
|
||||||
Immune = {
|
Immune = {
|
||||||
[642] = true, -- Divine Shield, Paladin
|
[642] = true, -- Divine Shield, Paladin
|
||||||
[186265] = true, -- Aspect of the Turtle, Hunter
|
[186265] = true, -- Aspect of the Turtle, Hunter
|
||||||
[45438] = true, -- Ice Block
|
[45438] = true, -- Ice Block
|
||||||
[31224] = true, -- Cloak of Shadows
|
[31224] = true, -- Cloak of Shadows
|
||||||
[196555] = true, -- Netherwalk
|
[196555] = true, -- Netherwalk
|
||||||
},
|
},
|
||||||
Bomb = {
|
Bomb = {
|
||||||
[381615] = true, -- Raszageth, Static Charge
|
[381615] = true, -- Raszageth, Static Charge
|
||||||
[377467] = true, -- Raszageth, Fulminating Charge
|
[377467] = true, -- Raszageth, Fulminating Charge
|
||||||
[399713] = true, -- Raszageth, Magnetic Charge
|
[399713] = true, -- Raszageth, Magnetic Charge
|
||||||
[397797] = true, -- Corrupted Vortex, Jade Serpent Temple
|
[397797] = true, -- Corrupted Vortex, Jade Serpent Temple
|
||||||
[387843] = true, -- Astral Bomb, Algeth'ar Academy
|
[387843] = true, -- Astral Bomb, Algeth'ar Academy
|
||||||
[386181] = true, -- Mana Bomb, Algeth'ar Academy
|
[386181] = true, -- Mana Bomb, Algeth'ar Academy
|
||||||
[411241] = true, -- Sarkareth, Void Claws (p2 tank)
|
[401330] = true, -- Sarkareth, Burning Claws (p1 tank)
|
||||||
[408429] = true, -- Sarkareth, Void Slash (p3 tank)
|
[411241] = true, -- Sarkareth, Void Claws (p2 tank)
|
||||||
[410642] = true, -- Sarkareth, Void fracture (bombs)
|
[408429] = true, -- Sarkareth, Void Slash (p3 tank)
|
||||||
|
[404218] = true, -- Sarkareth, Void fracture (bombs)
|
||||||
},
|
},
|
||||||
Burn = {
|
Burn = {
|
||||||
[114803] = true, -- Throw Torch, Jade Serpent Temple
|
-- Jade Serpent Temple
|
||||||
[397914] = true, -- Defiling Mist, Jade Serpent Temple
|
[114803] = true, -- Throw Torch
|
||||||
[106114] = true, -- Touch of Nothingness, Jade Serpent temple
|
[397914] = true, -- Defiling Mist
|
||||||
[152819] = true, -- Shadow Word: Frailty, Shadowmoon Burial Ground
|
[106114] = true, -- Touch of Nothingness
|
||||||
[153524] = true, -- Plague Spit, Shadowmoon Burial Ground
|
|
||||||
[397907] = true, -- Impending Doom, ???
|
-- Shadow moon Burial Ground
|
||||||
[209516] = true, -- Mana Fang, Court of Stars
|
[152819] = true, -- Shadow Word: Frailty
|
||||||
[207980] = true, -- Disintegration Beam, Court of Stars
|
[153524] = true, -- Plague Spit
|
||||||
[211464] = true, -- Fel Detonation, Court of Stars
|
|
||||||
[376997] = true, -- Savage Peck, Algeth'ar Academy
|
-- Court of Stars
|
||||||
[388912] = true, -- Severing Slash, Algeth'ar Academy
|
[397907] = true, -- Impending Doom
|
||||||
[388866] = true, -- Mana Void, Algeth'ar Academy
|
[209516] = true, -- Mana Fang
|
||||||
[390911] = true, -- Raszageth, Lingering Charge
|
[207980] = true, -- Disintegration Beam
|
||||||
[255582] = true, -- Priestess Alun'za, Molten Gold
|
[211464] = true, -- Fel Detonation
|
||||||
[259853] = true, -- Rixxa Fluxflame, Chemical Burn
|
|
||||||
|
-- Algeth'ar Academy
|
||||||
|
[376997] = true, -- Savage Peck, Algeth'ar Academy
|
||||||
|
[388912] = true, -- Severing Slash, Algeth'ar Academy
|
||||||
|
[388866] = true, -- Mana Void, Algeth'ar Academy
|
||||||
|
|
||||||
|
-- Vault of the Incarnates
|
||||||
|
[390911] = true, -- Raszageth, Lingering Charge
|
||||||
|
|
||||||
|
-- Atal'Dazar
|
||||||
|
[255582] = true, -- Priestess Alun'za, Molten Gold
|
||||||
|
|
||||||
|
-- The MOTHERLODE!!
|
||||||
|
[259853] = true, -- Rixxa Fluxflame, Chemical Burn
|
||||||
|
|
||||||
|
-- Halls of Infusion
|
||||||
|
|
||||||
|
-- Uldaman: Legacy of Tyr
|
||||||
|
[372718] = true, -- Earthen Shards
|
||||||
|
|
||||||
|
-- Brackenhide Hollow
|
||||||
|
[367521] = true, -- Bone Bolt
|
||||||
|
[367484] = true, -- Vicious Clawmangle
|
||||||
|
[378020] = true, -- Gash Frenzy
|
||||||
|
[385058] = true, -- Withering Poison
|
||||||
|
[384575] = true, -- Crippling Bite
|
||||||
|
|
||||||
|
-- Neltharus
|
||||||
|
[373735] = true, -- Dragon Strike
|
||||||
|
[372224] = true, -- Draogonbone Axe
|
||||||
|
[377018] = true, -- Molten Gold
|
||||||
|
[372570] = true, -- Bold Ambush
|
||||||
|
|
||||||
|
-- Neltharion's Lair
|
||||||
|
-- Freehold
|
||||||
|
[413131] = true, -- Whirling Dagger
|
||||||
|
|
||||||
|
-- The Underrot
|
||||||
|
[265019] = true, -- Savage Cleave
|
||||||
|
[265568] = true, -- Dark Omen
|
||||||
|
[273226] = true, -- Decaying Spores
|
||||||
|
|
||||||
|
-- Vortex Pinnacle
|
||||||
|
|
||||||
|
-- Aberrus
|
||||||
|
[404010] = true, -- Zkarn, ???
|
||||||
|
[405462] = true, -- Zkarn, ???
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +112,7 @@ local statusLists = {
|
|||||||
local function ForEachAuraSlots(unit, fn, continuationToken, ...)
|
local function ForEachAuraSlots(unit, fn, continuationToken, ...)
|
||||||
local GetAuraDataBySlot = C_UnitAuras.GetAuraDataBySlot
|
local GetAuraDataBySlot = C_UnitAuras.GetAuraDataBySlot
|
||||||
local n = select('#', ...)
|
local n = select('#', ...)
|
||||||
for i=1, n do
|
for i = 1, n do
|
||||||
local slot = select(i, ...)
|
local slot = select(i, ...)
|
||||||
fn(GetAuraDataBySlot(unit, slot))
|
fn(GetAuraDataBySlot(unit, slot))
|
||||||
end
|
end
|
||||||
|
@@ -77,7 +77,6 @@ function BorderIndicator:Show(data)
|
|||||||
frame:Show()
|
frame:Show()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function BorderIndicator:Update(data)
|
function BorderIndicator:Update(data)
|
||||||
if data.color then
|
if data.color then
|
||||||
self:SetColor(data.color)
|
self:SetColor(data.color)
|
||||||
@@ -90,7 +89,7 @@ function BorderIndicator:GetFrame()
|
|||||||
frame.backdropInfo = {
|
frame.backdropInfo = {
|
||||||
edgeFile = "Interface\\Addons\\OmicronFrames\\media\\textures\\pixel_edge",
|
edgeFile = "Interface\\Addons\\OmicronFrames\\media\\textures\\pixel_edge",
|
||||||
edgeSize = 1,
|
edgeSize = 1,
|
||||||
insets = {left=0, right=0, top=0, bottom=0},
|
insets = { left = 0, right = 0, top = 0, bottom = 0 },
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -109,4 +108,3 @@ function BorderIndicator:Hide()
|
|||||||
self.frame = nil
|
self.frame = nil
|
||||||
borderPool:Release(frame)
|
borderPool:Release(frame)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -36,4 +36,3 @@ end
|
|||||||
--- Hide the indicator
|
--- Hide the indicator
|
||||||
function Indicator:Hide()
|
function Indicator:Hide()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -70,13 +70,13 @@ function StatusBar:Hide()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function StatusBar:SetInterpolatedColor(start, stop, progress)
|
function StatusBar:SetInterpolatedColor(start, stop, progress)
|
||||||
local r = start[1] + (stop[1] - start[1])*progress
|
local r = start[1] + (stop[1] - start[1]) * progress
|
||||||
local g = start[2] + (stop[2] - start[2])*progress
|
local g = start[2] + (stop[2] - start[2]) * progress
|
||||||
local b = start[3] + (stop[3] - start[3])*progress
|
local b = start[3] + (stop[3] - start[3]) * progress
|
||||||
self:SetColor(r, g, b)
|
self:SetColor(r, g, b)
|
||||||
end
|
end
|
||||||
|
|
||||||
function StatusBar:SetColor(r, g, b)
|
function StatusBar:SetColor(r, g, b)
|
||||||
self.bar:SetStatusBarColor(r, g, b)
|
self.bar:SetStatusBarColor(r, g, b)
|
||||||
self.bg:SetVertexColor(0.2*r, 0.2*g, 0.2*b)
|
self.bg:SetVertexColor(0.2 * r, 0.2 * g, 0.2 * b)
|
||||||
end
|
end
|
||||||
|
@@ -48,6 +48,7 @@ function types.IsDerivedFrom(a, b)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
current = current.__typeInfo.parent
|
current = current.__typeInfo.parent
|
||||||
until current == nil;
|
until current == nil
|
||||||
|
;
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@@ -121,14 +121,14 @@ function UnitGroup:Sort()
|
|||||||
table.sort(self.units, UnitFrameDefaultCompare)
|
table.sort(self.units, UnitFrameDefaultCompare)
|
||||||
local left, top, width, height = self.left, self.top, self.width, self.height
|
local left, top, width, height = self.left, self.top, self.width, self.height
|
||||||
local maxFrameIndex = #self.units
|
local maxFrameIndex = #self.units
|
||||||
for y=0,5 do
|
for y = 0, 5 do
|
||||||
for x=0,4 do
|
for x = 0, 4 do
|
||||||
local num = y*5 + x + 1
|
local num = y * 5 + x + 1
|
||||||
if num > maxFrameIndex then
|
if num > maxFrameIndex then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local frame = self.units[num]
|
local frame = self.units[num]
|
||||||
frame:SetPosition(left + (x-2)*width, top - y*height)
|
frame:SetPosition(left + (x - 2) * width, top - y * height)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user