Quantcast WoWInterface - View Single Post - Addon causing UI elements to turn transparent
View Single Post
08-15-16, 12:29 AM   #3
Galaxy119
A Flamescale Wyrmkin
 
Galaxy119's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 111
Originally Posted by Phanx View Post
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:
  1. --update model func
  2.     function model:Update()
  3.       local cfg = db.char[self.type].model
  4.       self:SetCamDistanceScale(cfg.camDistanceScale)
  5.       self:SetPosition(0,cfg.pos_x,cfg.pos_y)
  6.       self:SetRotation(cfg.rotation)
  7.       self:SetPortraitZoom(cfg.portraitZoom)
  8.       self:ClearModel()
  9.       --self:SetModel("interface\\buttons\\talktomequestionmark.m2") --in case setdisplayinfo fails
  10.       self:SetDisplayInfo(cfg.displayInfo)
  11.     end
  12.     model.type = orb.type
  13.     model:SetScript("OnEvent", function(self) self:Update() end)
  14.     model:RegisterEvent("PLAYER_ENTERING_WORLD")
  15.     model:SetScript("OnShow", function(self) self:Update() end)
  16.     model:Update()
  17.     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.
  Reply With Quote