local unitEvent = OmaRFEvents.UnitEvent;
local Settings = OmaRFSettings;
-local positions = Settings.Positions;
-local width, height = Settings.Character.Width, Settings.Character.Height;
-local anchorX, anchorY = Settings.Character.AnchorX, Settings.Character.AnchorY;
local indSize = Settings.IndSize;
local baseColor = Settings.BaseColor;
local bgColor = Settings.BgColor;
local shieldhlColor = Settings.ShieldhlColor;
local healpredColor = Settings.HealpredColor;
local healabsorbColor = Settings.HealabsorbColor;
-local attributes = Settings.Character.Clickheal;
+-- placeholders with visible values when error happens
+local positions = {};
+local width, height = 10, 10;
+local anchorX, anchorY = 10, 10;
+local attributes = {};
local CFrame = CreateFrame("Frame", "OmaRFFrame", UIParent);
local inheritedFrames = "SecureUnitButtonTemplate,SecureHandlerStateTemplate";
if i == 1 then
frame.major[i]:SetPoint("TOPLEFT", frame.major, "TOPLEFT");
else
- frame.major[i]:SetPoint("TOPLEFT", frame.major[i-1], "TOPLEFT");
+ frame.major[i]:SetPoint("TOPLEFT", frame.major[i-1], "TOPRIGHT");
end
frame.major[i]:SetWidth(indSize*2);
frame.major[i]:SetHeight(indSize*2);
frame:RegisterEvent("UNIT_PET");
frame:RegisterEvent("PLAYER_ROLES_ASSIGNED");
frame:RegisterEvent("GROUP_ROSTER_UPDATE");
+ frame:RegisterEvent("PLAYER_ENTERING_WORLD");
+ frame:RegisterEvent("READY_CHECK");
+ frame:RegisterEvent("READY_CHECK_CONFIRM");
+ frame:RegisterEvent("READY_CHECK_FINISHED");
registerEvents(frame);
frame:SetScript("OnUpdate", unitUpdate);
unitEvent(frame, "UPDATE_ALL_BARS", frame.displayed);
frame.rez:SetPoint("BOTTOMRIGHT", frame.background, "CENTER", 12, -12);
frame.rez:SetTexture("Interface\\RaidFrame\\Raid-Icon-Rez");
frame.rez:Hide();
+ frame.ready = frame:CreateTexture(nil, "OVERLAY");
+ frame.ready:SetPoint("TOPLEFT", frame.background, "BOTTOMLEFT", 0, 12);
+ frame.ready:SetPoint("BOTTOMRIGHT", frame.background, "BOTTOMLEFT", 12, 0);
+ frame.ready:Hide();
-- set up indicators
setupIndicators(frame);
-- set scripts
initializeRaid(CFrame);
end
+local function loadCharSettings()
+ width, height = Settings.Character.Width, Settings.Character.Height;
+ anchorX, anchorY = Settings.Character.AnchorX, Settings.Character.AnchorY;
+ attributes = Settings.Character.Clickheal;
+ positions = Settings.Character.Positions;
+end
+
+CFrame:RegisterEvent("ADDON_LOADED");
CFrame:RegisterEvent("PLAYER_LOGIN");
CFrame:SetScript("OnEvent", function(self, event)
if event == "PLAYER_LOGIN" then
initialize();
+ elseif event == "ADDON_LOADED" then
+ OmaRFLoadChar();
+ loadCharSettings();
+ OmaRFEvents.LoadChar();
+ OmaRFIndicators.LoadChar();
end
end);