@Oppugno
Hmm. I need to check back on that aswell. But I think if you are having the hookscript handlers on oldPlate and oldPlate.castbar and only show/hide the newPlate each frame that will not trigger the onshow scripts of oldPlate and oldPlate.castbar. Thus it should be ok. But I'm not sure. Gonna test it.
Btw...Rainrider have you read
http://www.wowinterface.com/forums/s...ad.php?t=46740 ?
Currently the best practice for doing nameplates is doing sth like this:
Lua Code:
--RepositionAllNamePlates func
local function RepositionAllNamePlates()
RNP:Hide()
for blizzPlate, newPlate in pairs(RNP.nameplates) do
newPlate:Hide()
if blizzPlate:IsShown() then
newPlate:SetPoint("CENTER", WorldFrame, "BOTTOMLEFT", blizzPlate:GetCenter())
newPlate:SetAlpha(blizzPlate:GetAlpha())
newPlate:Show()
end
end
RNP:Show()
end
--OnUpdate func
RNP.lastUpdate = 0
RNP.updateInterval = 1.0
local function OnUpdate(self,elapsed)
RNP.lastUpdate = RNP.lastUpdate + elapsed
RepositionAllNamePlates()
if RNP.lastUpdate > RNP.updateInterval then
SearchForNamePlates(self)
RNP.lastUpdate = 0
end
end
WorldFrame:HookScript("OnUpdate", OnUpdate)
Basically you move all your visible nameplate elements to a new nameplate object and you hide that nameplate object each frame before applying a setpoint. So basically the object points change while being hidden. The fps gain is incredible.
Elv UI integrated that concept into the new nameplates aswell.