tmg-pub / crossrp

addon to help talking to the stinky horde
2 stars 3 forks source link

LUA error when mouseover a character when some BNet friends from another area are logged in #3

Closed LenweSaralonde closed 2 years ago

LenweSaralonde commented 2 years ago

Steps:

  1. Have a BNet account with friends in Area 1 (ie EU)
  2. Create a trial WoW account in another Area 2 (ie US)
  3. Create character on the trial account in Area 2 (ie Moonguard)
  4. Wait approx 20s
  5. Mouse over a character

The following LUA error occurs: Interface\AddOns\CrossRP\CrossRP.lua:732: attempt to index field 'realmName' (a nil value)

The root cause is the object returned by the C_BattleNet.GetFriendGameAccountInfo( friend, account_index ) function is missing the realmName property.

Since there is no way to interact with players from other areas, we could just ignore those who realmName that is nil.

tmg-pub commented 2 years ago

Merged your changes. Thanks!