Originally Posted by Phanx
This is fine, though unless other things are changing, a bit redundant for elements like Health where the element is already passed:
Code:
OverrideUpdateHealth(self, event, unit, bar, min, max)
Or would bar be going the way of event?
|
Using the old OverrideUpdateHealth as an example:
Lua Code:
local PostUpdate = function(bar, unit, min, max)
end
For the health element the bar variable _is_ the element.
Originally Posted by Phanx
Also, if Spawn will no longer accept a template, how will layouts indicate that a header should show pets? Currently that's done by passing the SecureGroupPetHeaderTemplate template...
|
The goal of this thread is really to catch corner cases such as that. That being said, I'm not entirely sure how I would want to solve it. There's two potential solutions to it that I can see instantly:
A: Add template as the argument after name, or at the end of the list. It should then also be used for the single-units.
B: Split the header part out of :Spawn and into :SpawnHeader. This would also require the arguments to be changed into: name, template, showParty, showRaid. It's also possible that name is removed all together, but that depends on how successful automatic naming will be.