add details about Ep3 rank text
This commit is contained in:
@@ -2204,8 +2204,11 @@ struct C_ExecuteCodeResult_B3 {
|
||||
// B7 (S->C): Rank update (Episode 3)
|
||||
|
||||
struct S_RankUpdate_GC_Ep3_B7 {
|
||||
// If rank is not zero, the client sets its rank text to "<rank>:<rank_text>",
|
||||
// truncated to 11 characters. If rank is zero, the client uses rank_text
|
||||
// without modifying it.
|
||||
le_uint32_t rank = 0;
|
||||
ptext<char, 0x0C> rank_text;
|
||||
ptext<char, 0x0C> rank_text; // Encrypted (with encrypt_challenge_rank_text)
|
||||
le_uint32_t meseta = 0;
|
||||
le_uint32_t max_meseta = 0;
|
||||
le_uint32_t unlocked_jukebox_songs = 0xFFFFFFFF;
|
||||
|
||||
+26
-26
@@ -445,19 +445,19 @@ PlayerRecordsBB_Challenge::PlayerRecordsBB_Challenge(const PlayerRecordsPC_Chall
|
||||
unknown_l7(0) {}
|
||||
|
||||
PlayerRecordsBB_Challenge::PlayerRecordsBB_Challenge(const PlayerRecordsV3_Challenge<false>& rec)
|
||||
: title_color(rec.title_color),
|
||||
unknown_u0(rec.unknown_u0),
|
||||
times_ep1_online(rec.times_ep1_online),
|
||||
times_ep2_online(rec.times_ep2_online),
|
||||
times_ep1_offline(rec.times_ep1_offline),
|
||||
unknown_g3(rec.unknown_g3),
|
||||
grave_deaths(rec.grave_deaths),
|
||||
unknown_u4(rec.unknown_u4),
|
||||
grave_coords_time(rec.grave_coords_time),
|
||||
grave_team(rec.grave_team),
|
||||
grave_message(rec.grave_message),
|
||||
unknown_m5(rec.unknown_m5),
|
||||
unknown_t6(rec.unknown_t6),
|
||||
: title_color(rec.stats.title_color),
|
||||
unknown_u0(rec.stats.unknown_u0),
|
||||
times_ep1_online(rec.stats.times_ep1_online),
|
||||
times_ep2_online(rec.stats.times_ep2_online),
|
||||
times_ep1_offline(rec.stats.times_ep1_offline),
|
||||
unknown_g3(rec.stats.unknown_g3),
|
||||
grave_deaths(rec.stats.grave_deaths),
|
||||
unknown_u4(rec.stats.unknown_u4),
|
||||
grave_coords_time(rec.stats.grave_coords_time),
|
||||
grave_team(rec.stats.grave_team),
|
||||
grave_message(rec.stats.grave_message),
|
||||
unknown_m5(rec.stats.unknown_m5),
|
||||
unknown_t6(rec.stats.unknown_t6),
|
||||
rank_title(encrypt_challenge_rank_text(decode_sjis(decrypt_challenge_rank_text(rec.rank_title)))),
|
||||
unknown_l7(rec.unknown_l7) {}
|
||||
|
||||
@@ -495,19 +495,19 @@ PlayerRecordsBB_Challenge::operator PlayerRecordsPC_Challenge() const {
|
||||
|
||||
PlayerRecordsBB_Challenge::operator PlayerRecordsV3_Challenge<false>() const {
|
||||
PlayerRecordsV3_Challenge<false> ret;
|
||||
ret.title_color = this->title_color;
|
||||
ret.unknown_u0 = this->unknown_u0;
|
||||
ret.times_ep1_online = this->times_ep1_online;
|
||||
ret.times_ep2_online = this->times_ep2_online;
|
||||
ret.times_ep1_offline = this->times_ep1_offline;
|
||||
ret.unknown_g3 = this->unknown_g3;
|
||||
ret.grave_deaths = this->grave_deaths;
|
||||
ret.unknown_u4 = this->unknown_u4;
|
||||
ret.grave_coords_time = this->grave_coords_time;
|
||||
ret.grave_team = this->grave_team;
|
||||
ret.grave_message = this->grave_message;
|
||||
ret.unknown_m5 = this->unknown_m5;
|
||||
ret.unknown_t6 = this->unknown_t6;
|
||||
ret.stats.title_color = this->title_color;
|
||||
ret.stats.unknown_u0 = this->unknown_u0;
|
||||
ret.stats.times_ep1_online = this->times_ep1_online;
|
||||
ret.stats.times_ep2_online = this->times_ep2_online;
|
||||
ret.stats.times_ep1_offline = this->times_ep1_offline;
|
||||
ret.stats.unknown_g3 = this->unknown_g3;
|
||||
ret.stats.grave_deaths = this->grave_deaths;
|
||||
ret.stats.unknown_u4 = this->unknown_u4;
|
||||
ret.stats.grave_coords_time = this->grave_coords_time;
|
||||
ret.stats.grave_team = this->grave_team;
|
||||
ret.stats.grave_message = this->grave_message;
|
||||
ret.stats.unknown_m5 = this->unknown_m5;
|
||||
ret.stats.unknown_t6 = this->unknown_t6;
|
||||
ret.rank_title = encrypt_challenge_rank_text(encode_sjis(decrypt_challenge_rank_text(this->rank_title)));
|
||||
ret.unknown_l7 = this->unknown_l7;
|
||||
return ret;
|
||||
|
||||
+29
-16
@@ -357,20 +357,32 @@ struct PlayerRecordsV3_Challenge {
|
||||
|
||||
// Offsets are (1) relative to start of C5 entry, and (2) relative to start
|
||||
// of save file structure
|
||||
/* 0000:001C */ U16T title_color = 0x7FFF; // XRGB1555
|
||||
/* 0002:001E */ parray<uint8_t, 2> unknown_u0;
|
||||
/* 0004:0020 */ parray<U32T, 9> times_ep1_online; // Encrypted; see decrypt_challenge_time
|
||||
/* 0028:0044 */ parray<U32T, 5> times_ep2_online; // Encrypted; see decrypt_challenge_time
|
||||
/* 003C:0058 */ parray<U32T, 9> times_ep1_offline; // Encrypted; see decrypt_challenge_time
|
||||
/* 0060:007C */ parray<uint8_t, 4> unknown_g3;
|
||||
/* 0064:0080 */ U16T grave_deaths = 0;
|
||||
/* 0066:0082 */ parray<uint8_t, 2> unknown_u4;
|
||||
/* 0068:0084 */ parray<U32T, 5> grave_coords_time;
|
||||
/* 007C:0098 */ ptext<char, 0x14> grave_team;
|
||||
/* 0090:00AC */ ptext<char, 0x20> grave_message;
|
||||
/* 00B0:00CC */ parray<uint8_t, 4> unknown_m5;
|
||||
/* 00B4:00D0 */ parray<U32T, 9> unknown_t6;
|
||||
/* 00D8:00F4 */ ptext<char, 0x0C> rank_title; // Encrypted; see decrypt_challenge_rank_text
|
||||
struct Stats {
|
||||
/* 00:1C */ U16T title_color = 0x7FFF; // XRGB1555
|
||||
/* 02:1E */ parray<uint8_t, 2> unknown_u0;
|
||||
/* 04:20 */ parray<U32T, 9> times_ep1_online; // Encrypted; see decrypt_challenge_time
|
||||
/* 28:44 */ parray<U32T, 5> times_ep2_online; // Encrypted; see decrypt_challenge_time
|
||||
/* 3C:58 */ parray<U32T, 9> times_ep1_offline; // Encrypted; see decrypt_challenge_time
|
||||
/* 60:7C */ parray<uint8_t, 4> unknown_g3;
|
||||
/* 64:80 */ U16T grave_deaths = 0;
|
||||
/* 66:82 */ parray<uint8_t, 2> unknown_u4;
|
||||
/* 68:84 */ parray<U32T, 5> grave_coords_time;
|
||||
/* 7C:98 */ ptext<char, 0x14> grave_team;
|
||||
/* 90:AC */ ptext<char, 0x20> grave_message;
|
||||
/* B0:CC */ parray<uint8_t, 4> unknown_m5;
|
||||
/* B4:D0 */ parray<U32T, 9> unknown_t6;
|
||||
/* D8:F4 */
|
||||
} __attribute__((packed));
|
||||
/* 0000:001C */ Stats stats;
|
||||
// On Episode 3, there are special cases that apply to this field - if the
|
||||
// text ends with certain strings (after decrypt_challenge_rank_text), the
|
||||
// player will have particle effects emanate from their character in the
|
||||
// lobby every 2 seconds. These effects are:
|
||||
// Ends with ":GOD" => blue circle
|
||||
// Ends with ":KING" => white particles
|
||||
// Ends with ":LORD" => rising yellow sparkles
|
||||
// Ends with ":CHAMP" => green circle
|
||||
/* 00D8:00F4 */ ptext<char, 0x0C> rank_title;
|
||||
/* 00E4:0100 */ parray<uint8_t, 0x1C> unknown_l7;
|
||||
/* 0100:011C */
|
||||
} __attribute__((packed));
|
||||
@@ -409,10 +421,11 @@ struct PlayerRecordsBB_Challenge {
|
||||
template <bool IsBigEndian>
|
||||
struct PlayerRecords_Battle {
|
||||
using U16T = typename std::conditional<IsBigEndian, be_uint16_t, le_uint16_t>::type;
|
||||
// On Episode 3, battle_place_counts[0] is win count and [1] is loss count
|
||||
// On Episode 3, place_counts[0] is win count and [1] is loss count
|
||||
/* 00 */ parray<U16T, 4> place_counts;
|
||||
/* 08 */ U16T disconnect_count;
|
||||
/* 0A */ parray<uint8_t, 0x0E> unknown_a1;
|
||||
/* 0A */ parray<uint16_t, 3> unknown_a1;
|
||||
/* 10 */ parray<uint32_t, 2> unknown_a2;
|
||||
/* 18 */
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
@@ -1069,14 +1069,14 @@ static HandlerResult C_GXB_61(shared_ptr<ServerState>,
|
||||
}
|
||||
if (session.options.red_name && pd->disp.visual.name_color != 0xFFFF0000) {
|
||||
pd->disp.visual.name_color = 0xFFFF0000;
|
||||
pd->records.challenge.title_color = 0x7C00;
|
||||
pd->records.challenge.stats.title_color = 0x7C00;
|
||||
modified = true;
|
||||
} else if (session.options.blank_name && pd->disp.visual.name_color != 0x00000000) {
|
||||
pd->disp.visual.name_color = 0x00000000;
|
||||
modified = true;
|
||||
}
|
||||
if (!session.challenge_rank_title_override.empty()) {
|
||||
pd->records.challenge.title_color = encode_xrgb1555(session.challenge_rank_color_override);
|
||||
pd->records.challenge.stats.title_color = encode_xrgb1555(session.challenge_rank_color_override);
|
||||
pd->records.challenge.rank_title = encrypt_challenge_rank_text(session.challenge_rank_title_override);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,12 +212,10 @@ struct PSOGCEp3CharacterFile {
|
||||
/* 0D7C:0960 */ parray<PSOGCSaveFileChatShortcutEntry, 20> chat_shortcuts;
|
||||
/* 140C:0FF0 */ ptext<char, 0xAC> auto_reply;
|
||||
/* 14B8:109C */ ptext<char, 0xAC> info_board;
|
||||
/* 1564:1148 */ be_uint16_t win_count;
|
||||
/* 1566:114A */ be_uint16_t lose_count;
|
||||
/* 1568:114C */ parray<be_uint16_t, 5> unknown_a8;
|
||||
/* 1572:1156 */ parray<uint8_t, 2> unused;
|
||||
/* 1574:1158 */ parray<be_uint32_t, 2> unknown_a9;
|
||||
/* 157C:1160 */ parray<uint8_t, 0xDC> unknown_a10;
|
||||
// In this struct, place_counts[0] is win_count and [1] is loss_count
|
||||
/* 1564:1148 */ PlayerRecords_Battle<true> battle_records;
|
||||
/* 157C:1160 */ parray<uint8_t, 4> unknown_a10;
|
||||
/* 1580:1164 */ PlayerRecordsV3_Challenge<true>::Stats challenge_record_stats;
|
||||
/* 1658:123C */ Episode3::PlayerConfig ep3_config;
|
||||
/* 39A8:358C */ be_uint32_t unknown_a11;
|
||||
/* 39AC:3590 */ be_uint32_t unknown_a12;
|
||||
@@ -226,7 +224,7 @@ struct PSOGCEp3CharacterFile {
|
||||
} __attribute__((packed));
|
||||
/* 00004 */ parray<Character, 7> characters;
|
||||
/* 193F0 */ ptext<char, 0x10> serial_number; // As %08X (not decimal)
|
||||
/* 19400 */ ptext<char, 0x10> access_key;
|
||||
/* 19400 */ ptext<char, 0x10> access_key; // As 12 ASCII characters (decimal)
|
||||
/* 19410 */ ptext<char, 0x10> password;
|
||||
// In Episode 3, this field still exists, but is unused since BGM test was
|
||||
// removed from the options menu in favor of the jukebox. The jukebox is
|
||||
|
||||
+2
-2
@@ -1382,7 +1382,7 @@ void send_lobby_list(shared_ptr<Client> c, shared_ptr<ServerState> s) {
|
||||
// lobby joining
|
||||
|
||||
template <typename EntryT>
|
||||
void send_player_records(shared_ptr<Client> c, shared_ptr<Lobby> l, shared_ptr<Client> joining_client) {
|
||||
void send_player_records_t(shared_ptr<Client> c, shared_ptr<Lobby> l, shared_ptr<Client> joining_client) {
|
||||
vector<EntryT> entries;
|
||||
auto add_client = [&](shared_ptr<Client> lc) -> void {
|
||||
auto lp = lc->game_data.player();
|
||||
@@ -1635,7 +1635,7 @@ void send_join_lobby_t(shared_ptr<Client> c, shared_ptr<Lobby> l,
|
||||
}
|
||||
|
||||
if ((c->version() != GameVersion::DC) || !(c->flags & Client::Flag::IS_DC_V1)) {
|
||||
send_player_records<RecordsT>(c, l, joining_client);
|
||||
send_player_records_t<RecordsT>(c, l, joining_client);
|
||||
}
|
||||
|
||||
uint8_t lobby_type = (l->type > 14) ? (l->block - 1) : l->type;
|
||||
|
||||
Reference in New Issue
Block a user