charinfo object - pvpgn/api.pvpgn.pro GitHub Wiki
Most of properties of charinfo are updated each time when a player leaves a game, and D2GS saves charinfo. D2GS sends request to D2DBS which updates charinfo data from the charsave file.
charinfo is used in PvPGN in account screen with characters list, and a character portrait in game chat.
Key | Data Type | Description |
---|---|---|
fileType |
string | Type of this object structure, should be "charinfo" |
hash |
string[32] | (readonly) MD5 hash of data
|
data |
string | Base64 encoded raw bytes of this charinfo |
version |
byte | (readonly) File version |
createdTime |
int | File created date |
lastSeenTime |
int | Last file modified (actually last played time) |
totalPlayedMinutes |
int | Total played minutes in a game |
name |
string[16] | Character name |
userName |
string[16] | PvPGN account name |
realmName |
string[32] | D2GS realm name |
`class`` | byte | Character class index. Allowed values [0, 1, 2, 3, 4, 5, 6] |
classTitle |
string | (readonly) String representation of the class . Allowed values ["Amazon", "Sorceress", "Necromancer", "Paladin", "Barbarian", "Druid", "Assassin"] |
difficulty |
byte | Character difficulty |
charTitle |
string | (readonly) String representation of values set: difficulty , expansion , hardcore , class
|
difficultyTitle |
string | (readonly) String representation of values set: difficulty , expansion . Allowed values ["Normal", "Nightmare", "Hell"] |
level |
byte | Character level |
experience |
unsigned int | Character experience |
expansion |
bool | Is expansion or original |
died |
bool | Character has died or alive. If died and hardcore then it is not allowed to join a game. |
ladder |
bool | Is ladder or non-ladder |
hardcore |
bool | Is hardcore or softcore |
init |
bool | Init flag is true when a character is just created, it set always by D2GS for newbie chars. It should set to false when it was played and modified. |
portrait |
object | Raw data of the charinfo portrait. gfx , color , u2 are bytes encoded with base64. Need help to decode it to draw complete portrait image like in a game. |
Json Response Example
{
"fileType": "charinfo",
"createdTime": 1197090484,
"lastSeenTime": 1198632569,
"totalPlayedMinutes": 946,
"name": "ACBewu_BROH",
"userName": "Lu",
"realmName": "UTech Realm",
"class": 4,
"level": 1,
"version": 65536,
"experience": 0,
"difficulty": 0,
"portrait": {
"header": -32629,
"gfx": "//////////////8=",
"chClass": 5,
"color": "//////////////8=",
"level": 1,
"status": 224,
"u1": "gICA",
"ladder": 255,
"u2": "//8="
},
"hash": "4a8a7d45c6249e3ed3bcf2aafe135b38",
"classTitle": "Barbarian",
"init": false,
"expansion": true,
"died": false,
"ladder": true,
"hardcore": false,
"charTitle": "",
"difficultyTitle": "Normal"
}