wow-rp-addons / LibMSP

The “Mary Sue Protocol” (“MSP” for short) is a simple challenge/response protocol for RP UI add-ons within WoW to communicate with each other and publish text information to other clients (such as RP character names and descriptions).
Creative Commons Zero v1.0 Universal
2 stars 1 forks source link

Realm name information queried too early #25

Closed Meorawr closed 3 years ago

Meorawr commented 5 years ago

https://github.com/wow-rp-addons/LibMSP/blob/bce4aeb4865c4a7fa2148315fdb89cd5f8bf1116/LibMSP.lua#L66

Realm name information provided by UnitFullName (and GetNormalizedRealmName) isn't available until PLAYER_LOGIN has fired.

Querying it in the script body means MSP may or may not have issues on the initial login of a player in some contexts, but given things have worked fine so far it may also be that this variable missing realm information isn't actually a big deal. Either way it should be fixed.

Meorawr commented 3 years ago

This ends up working since NameMergedRealm queries GetRealmName internally, and Blizzard for whatever genius reason make that work on first login but not GetNormalizedRealmName.

Doesn't change the fact these things probably shouldn't be relied upon, however changing it is likely to break things so we can probably wait until we're actually pushed.