LeaderboardDef Asset: Difference between revisions
Created page with "__NOTOC__ Category:Assets Category:MW2 Category:MW3 Category:BO2 Category:Ghosts The leaderboard defintion asset defines how information sent by the server..." |
No edit summary |
||
| Line 7: | Line 7: | ||
The leaderboard defintion asset defines how information sent by the server about the players on the leaderboard is read. Infinity Ward added it early on Modern Warfare 2, while Treyarch took longer with Black Ops 2 the only game it appears on by them. Subtleties of the asset changed but the main concept remains the same, a header with an array of columns. | The leaderboard defintion asset defines how information sent by the server about the players on the leaderboard is read. Infinity Ward added it early on Modern Warfare 2, while Treyarch took longer with Black Ops 2 the only game it appears on by them. Subtleties of the asset changed but the main concept remains the same, a header with an array of columns. | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
struct | enum LbColType | ||
{ | |||
LBCOL_TYPE_NUMBER = 0x0, | |||
LBCOL_TYPE_TIME = 0x1, | |||
LBCOL_TYPE_LEVELXP = 0x2, | |||
LBCOL_TYPE_PRESTIGE = 0x3, | |||
LBCOL_TYPE_BIGNUMBER = 0x4, | |||
LBCOL_TYPE_PERCENT = 0x5, | |||
LBCOL_TYPE_TIME_FULL = 0x6, | |||
LBCOL_TYPE_COUNT = 0x7 | |||
}; | |||
enum LbAggType | |||
{ | |||
LBAGG_TYPE_MIN = 0x0, | |||
LBAGG_TYPE_MAX = 0x1, | |||
LBAGG_TYPE_ADD = 0x2, | |||
LBAGG_TYPE_REPLACE = 0x3, | |||
LBAGG_TYPE_COUNT = 0x4 | |||
}; | |||
struct LbColumnDef | |||
{ | { | ||
const char * title; | const char * title; | ||
int colId; | |||
int dwColIndex; | |||
bool hidden; | |||
#ifdef Ghosts | #ifdef Ghosts | ||
char unknown15[0x4]; | char unknown15[0x4]; | ||
#endif | #endif | ||
const char * statName; | const char * statName; | ||
LbColType type; | |||
int precision; | |||
LbAggType agg; | |||
#ifdef MW3 || Ghosts | #ifdef MW3 || Ghosts | ||
char unknown3[0x8]; | char unknown3[0x8]; | ||
#elif defined(BO2) | #elif defined(BO2) | ||
const char *localization; | |||
int uiCalColX; | |||
int uiCalColY; | |||
#endif | #endif | ||
}; | |||
enum LbUpdateType | |||
{ | |||
LBUPDATE_TYPE_NORMAL = 0x0, | |||
LBUPDATE_TYPE_RANK = 0x1, | |||
LBUPDATE_TYPE_COMBINE = 0x2, | |||
LBUPDATE_TYPE_COUNT = 0x3, | |||
}; | }; | ||
| Line 27: | Line 61: | ||
{ | { | ||
const char * name; | const char * name; | ||
unsigned int id; | |||
int columnCount; | |||
#ifdef BO2 //Check this on BO, one of the next 2 may have been added instead. | |||
#ifdef BO2 | int dwColumnCount; | ||
#endif | #endif | ||
int xpColId; | |||
int prestigeColId; | |||
LbColumnDef *columns; | |||
#ifdef BO2 | #ifdef BO2 | ||
LbUpdateType updateType; | |||
int trackTypes; | |||
#endif | #endif | ||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 00:46, 21 December 2014
The leaderboard defintion asset defines how information sent by the server about the players on the leaderboard is read. Infinity Ward added it early on Modern Warfare 2, while Treyarch took longer with Black Ops 2 the only game it appears on by them. Subtleties of the asset changed but the main concept remains the same, a header with an array of columns.
enum LbColType
{
LBCOL_TYPE_NUMBER = 0x0,
LBCOL_TYPE_TIME = 0x1,
LBCOL_TYPE_LEVELXP = 0x2,
LBCOL_TYPE_PRESTIGE = 0x3,
LBCOL_TYPE_BIGNUMBER = 0x4,
LBCOL_TYPE_PERCENT = 0x5,
LBCOL_TYPE_TIME_FULL = 0x6,
LBCOL_TYPE_COUNT = 0x7
};
enum LbAggType
{
LBAGG_TYPE_MIN = 0x0,
LBAGG_TYPE_MAX = 0x1,
LBAGG_TYPE_ADD = 0x2,
LBAGG_TYPE_REPLACE = 0x3,
LBAGG_TYPE_COUNT = 0x4
};
struct LbColumnDef
{
const char * title;
int colId;
int dwColIndex;
bool hidden;
#ifdef Ghosts
char unknown15[0x4];
#endif
const char * statName;
LbColType type;
int precision;
LbAggType agg;
#ifdef MW3 || Ghosts
char unknown3[0x8];
#elif defined(BO2)
const char *localization;
int uiCalColX;
int uiCalColY;
#endif
};
enum LbUpdateType
{
LBUPDATE_TYPE_NORMAL = 0x0,
LBUPDATE_TYPE_RANK = 0x1,
LBUPDATE_TYPE_COMBINE = 0x2,
LBUPDATE_TYPE_COUNT = 0x3,
};
struct LeaderboardDef
{
const char * name;
unsigned int id;
int columnCount;
#ifdef BO2 //Check this on BO, one of the next 2 may have been added instead.
int dwColumnCount;
#endif
int xpColId;
int prestigeColId;
LbColumnDef *columns;
#ifdef BO2
LbUpdateType updateType;
int trackTypes;
#endif
};