unmask ep3 commands on proxy server
This commit is contained in:
@@ -2099,6 +2099,12 @@ struct C_SetBlockedSenders_BB_C6 : C_SetBlockedSenders_C6<28> { } __packed__;
|
|||||||
// This command is not valid on Episode 3 Trial Edition.
|
// This command is not valid on Episode 3 Trial Edition.
|
||||||
// header.flag determines the client's registration state - 1 if the client is
|
// header.flag determines the client's registration state - 1 if the client is
|
||||||
// registered for the tournament, 0 if not.
|
// registered for the tournament, 0 if not.
|
||||||
|
// This command controls what's shown in the Check Tactics pane in the pause
|
||||||
|
// menu. If the client is registered (header.flag==1), the option is enabled and
|
||||||
|
// the bracket data in the command is shown there, and a third pane on the
|
||||||
|
// Status item shows the other information (tournament name, ship name, and
|
||||||
|
// start time). If the client is not registered, the Check Tactics option is
|
||||||
|
// disabled and the Status item has only two panes.
|
||||||
|
|
||||||
struct S_ConfirmTournamentEntry_GC_Ep3_CC {
|
struct S_ConfirmTournamentEntry_GC_Ep3_CC {
|
||||||
ptext<char, 0x40> tournament_name;
|
ptext<char, 0x40> tournament_name;
|
||||||
|
|||||||
+15
-1
@@ -890,7 +890,21 @@ static HandlerResult S_6x(shared_ptr<ServerState>,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool modified = false;
|
||||||
if (!data.empty()) {
|
if (!data.empty()) {
|
||||||
|
// Unmask any masked Episode 3 commands from the server
|
||||||
|
if ((session.version == GameVersion::GC) && (data.size() > 8) &&
|
||||||
|
((static_cast<uint8_t>(data[0]) == 0xB3) ||
|
||||||
|
(static_cast<uint8_t>(data[0]) == 0xB4) ||
|
||||||
|
(static_cast<uint8_t>(data[0]) == 0xB5))) {
|
||||||
|
const auto& header = check_size_t<G_CardBattleCommandHeader>(
|
||||||
|
data, sizeof(G_CardBattleCommandHeader), 0xFFFF);
|
||||||
|
if (header.mask_key) {
|
||||||
|
set_mask_for_ep3_game_command(data.data(), data.size(), 0);
|
||||||
|
modified = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (data[0] == 0x46) {
|
if (data[0] == 0x46) {
|
||||||
const auto& cmd = check_size_t<G_AttackFinished_6x46>(data,
|
const auto& cmd = check_size_t<G_AttackFinished_6x46>(data,
|
||||||
offsetof(G_AttackFinished_6x46, entries),
|
offsetof(G_AttackFinished_6x46, entries),
|
||||||
@@ -962,7 +976,7 @@ static HandlerResult S_6x(shared_ptr<ServerState>,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return HandlerResult::Type::FORWARD;
|
return modified ? HandlerResult::Type::MODIFIED : HandlerResult::Type::FORWARD;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
Reference in New Issue
Block a user