Closed ghost closed 6 years ago
I have no problem with this, but probably i will fill this field anyway in my addon as i don't like to think about which field i have to set and which not. For me it is more consistent if i set all fields, so i know i have nothing forgotten. :-)
And beside this, good work from you here in this projekt and also from Ellypse. I'm happy that we try to get a common baseline for our addons.
It'll work perfectly fine if you set them yourself. This is mainly a fallback to make sure that addons like MRP don't run into the situation with UnitGUID()
where it doesn't get filled because they're trying to do it before PLAYER_LOGIN.
Also, please test GnomTEC as much as you can with the latest development branch (8.0 only), and file bugs with any problems you encounter! The new LibMSP should be API-compatible with the old, but it's possible I made a mistake somewhere along the way.
I'll be tagging a v10 release by the end of this weekend, which should be ideal for shipping with 8.0-only updates to addons.
Fixed in development branch, closing.
These, along with
VP
, should be the domain of LibMSP. Duringmsp:Update()
it may make sense to fill out all the unit fields with their proper data, instead of relying on the parent addon to do it for us.The Unit function fields are:
GC
fromselect(2, GetPlayerInfoByGUID(UnitGUID("player")))
orselect(2, UnitClass("player"))
.GF
fromUnitFactionGroup("player")
GR
fromselect(4, GetPlayerInfoByGUID(UnitGUID("player")))
orselect(2, UnitRace("player")
GS
fromselect(5, GetPlayerInfoByGUID(UnitGUID("player")))
orUnitSex("player")
GU
fromUnitGUID("player")
As these are supposed to be filled exclusively with appropriate data from those functions, it makes more sense to me if we handle them in LibMSP during
msp:Update()
, rather than expect other addons to handle them properly.The downside is that this may necessitate adding a
PLAYER_LOGIN
handler of some sort, as some of those functions (notablyUnitGUID()
) are not necessarily guaranteed to work prior to login being completed. I've considered adding a "Chomp loaded" callback to Chomp (which would occur duringPLAYER_LOGIN
), so if I do that we could make use of that here to save a bit of overhead with a frame and such.The upside of the downside is that some addons don't currently delay their user of
UnitGUID()
toPLAYER_LOGIN
, so it doesn't always get reliably set.Any comments, additions, or objections @Ellypse?