MsgRank

This message serves every dynamic leaderboard in the client: the flower rankings, the fate rankings, inner strength, the "Ability Score" leaderboard (CDlgProfessionalRank) and its per-profession top players. A single rank type value both selects the leaderboard and, on some rank types, changes which modes are valid.

Table of Contents

Patch 6609

Verified (Client): Confirmed by reverse engineering the 6609 client binary.

Message Definition

PosTypeNameDescriptionExample
0UInt16MsgSizeSize of the message24
2UInt16MsgTypeType of message1151
4UInt32ActionAction subtype1
8UInt32RankTypeSelects the leaderboard80000000
12UInt16TotalCountRow count of the leaderboard (REQUEST_RANK reply)42
14UInt8PageNumberRequested or returned page0
15UInt8-Padding0
16UInt32EntryCountNumber of entries that follow1
20UInt32-Padding0
24Entry[EntryCount]EntriesLeaderboard rowsSee below

The client's own outgoing message is always exactly 104 bytes (24 header bytes plus a single 80 byte entry), with every field of that one entry zeroed except for Position, which is unused on the request. Requests only need Action, RankType and PageNumber filled in.

Entry

Each entry is 80 bytes.

PosTypeNameDescriptionExample
0UInt64Position1-based rank position1
8UInt64AmountLeaderboard score23041
16UInt32RankTypeOnly used by PROFESSION_TOPS; the profession's rank type80000002
20UInt32IdentityHero ID1000001
24StringNameHero name (16 bytes)Carniato
40StringNameSame string, duplicated (16 bytes)Carniato
56UInt32LevelHero level130
60UInt32ProfessionHero profession21
64UInt32LookFaceHero mesh2011
68UInt32-Unused0
72UInt32-Read only by the 30001000 rank type handler0
76UInt32-Read only by the 30001000 rank type handler0

Action

The meaning of Action depends on RankType. For the rank types listed below, only modes 1 and 2 are handled; every other rank type accepts the full set.

ValNameSenderDescription
1REQUEST_RANKBothClient requests a page of RankType; server replies with TotalCount, PageNumber and up to 10 entries.
2QUERY_HERO_RANKServerReports the hero's own position and score for RankType in a single entry.
6PROFESSION_TOPSBothClient requests with RankType = 0; server replies with one entry per profession, RankType in each entry selecting the profession's rank type (see Profession Rank Types).

Other values are read by dialogs that were not part of this investigation and are left undocumented here.

Rank Type

RangeDescription
30000000 - 30000999Flower rankings
60000001 - 60000004Fate rankings (Dragon, Phoenix, Tiger, Turtle)
70000000Inner strength ranking
80000000Ability Score, overall leaderboard
80000001 - 80000010Ability Score, per profession. See Profession Rank Types
90000000Handled separately; not covered here

Profession Rank Types

The client maps a profession's rank type back to a profession sort with the table below (profession / 10).

RankTypeProfession SortProfession
800000011Trojan
800000022Warrior
800000034Archer
800000045Ninja
800000056Monk
800000067Pirate
800000078Dragon Warrior
8000000813Water Taoist
8000000914Fire Taoist
8000001016Wind Walker

The Ability Score leaderboard itself is computed and stored entirely server side; the client only ever displays whatever Amount is sent to it.