beta
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user