This commit is contained in:
Bunny67
2020-09-14 10:12:22 +03:00
parent 6c3f9d925e
commit 0f4f16b6f0
71 changed files with 2302 additions and 2431 deletions
+9 -9
View File
@@ -120,11 +120,11 @@ local function AcquireModel(region, data)
model:RegisterEvent("PLAYER_FOCUS_CHANGED");
end
model:SetScript("OnEvent", function(self, event, unitId)
WeakAuras.StartProfileSystem("model");
Private.StartProfileSystem("model");
if (event ~= "UNIT_MODEL_CHANGED" or UnitIsUnit(unitId, data.model_path)) then
WeakAuras.SetModel(model, data.model_path, data.modelIsUnit, data.modelDisplayInfo)
end
WeakAuras.StopProfileSystem("model");
Private.StopProfileSystem("model");
end
);
else
@@ -138,10 +138,10 @@ local function AcquireModel(region, data)
if(data.advance) then
local elapsed = 0;
model:SetScript("OnUpdate", function(self, elaps)
WeakAuras.StartProfileSystem("model");
Private.StartProfileSystem("model");
elapsed = elapsed + (elaps * 1000);
model:SetSequenceTime(data.sequence, elapsed);
WeakAuras.StopProfileSystem("model");
Private.StopProfileSystem("model");
end)
else
model:SetScript("OnUpdate", nil)
@@ -263,18 +263,18 @@ end
-- Work around for movies and world map hiding all models
do
function WeakAuras.PreShowModels(self, event)
WeakAuras.StartProfileSystem("model");
function Private.PreShowModels(self, event)
Private.StartProfileSystem("model");
for id, data in pairs(WeakAuras.regions) do
WeakAuras.StartProfileAura(id);
Private.StartProfileAura(id);
if data.region.toShow then
if (data.regionType == "model") then
data.region:PreShow();
end
end
WeakAuras.StopProfileAura(id);
Private.StopProfileAura(id);
end
WeakAuras.StopProfileSystem("model");
Private.StopProfileSystem("model");
end
end