question

yzx2002 avatar image
yzx2002 asked

how can i get character's name on client side?

I try GetCharacterData but the result doesn't contain character's name.

Characters
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

The GetCharacterData call is for retrieving the custom data set on that character. The GetAllUsersCharacters call is the one that returns the basic info about the player's characters, including their names.

3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

yzx2002 avatar image yzx2002 commented ·

So I get all character''s info first, and then search for specific one? No API for getting one character basic info by character id?

0 Likes 0 ·
brendan avatar image brendan yzx2002 commented ·

The amount of data is extremely small - just ID, Name, and Type. So getting all the player's characters in one call is the most efficient path. The array returned can then be iterated on trivially to get the specific info for each character. Is there something specific about your scenario that makes this an inefficient process? What all do you need to do with the character info?

0 Likes 0 ·
yzx2002 avatar image yzx2002 brendan commented ·

Thank you ,I think it's ok to use getalluserscharactersc call.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.