Originally Posted by Phanx
If it only happens under those conditions, it should be fairly easy to work around. Set a flag on PLAYER_ENTERING_WORLD. Skip all updates (or just the problematic part of the update) if the flag isn't set. Clear the flag on PLAYER_LEAVING_WORLD. You may need to experiment with additional events (you can use RegisterAllEvents to build a log of all events in the order they occur during reload/zone change) and/or using timers (eg. remove the animation if the flag is unset, then add it back with a timer if PEW is too soon).
|
As far as I can tell, it already waits for PEW to update the orb model (model refers to the animation, the non-animated texture of the orb is just refered to as the statusbar in the code)
Lua Code:
--update model func
function model:Update()
local cfg = db.char[self.type].model
self:SetCamDistanceScale(cfg.camDistanceScale)
self:SetPosition(0,cfg.pos_x,cfg.pos_y)
self:SetRotation(cfg.rotation)
self:SetPortraitZoom(cfg.portraitZoom)
self:ClearModel()
--self:SetModel("interface\\buttons\\talktomequestionmark.m2") --in case setdisplayinfo fails
self:SetDisplayInfo(cfg.displayInfo)
end
model.type = orb.type
model:SetScript("OnEvent", function(self) self:Update() end)
model:RegisterEvent("PLAYER_ENTERING_WORLD")
model:SetScript("OnShow", function(self) self:Update() end)
model:Update()
orb.model = model
As always you can find the rest of the code here:
https://github.com/galaxy119/Roth_UI
Also the orb animations don't update properly, as the orb unfills, the animation is suppose to unfill aswell, however it does not.