clear ep3 server state on 6F
This commit is contained in:
@@ -2743,13 +2743,12 @@ struct C_VerifyLicense_BB_DB {
|
|||||||
pstring<TextEncoding::ASCII, 0x30> game_tag; // "psopc2"
|
pstring<TextEncoding::ASCII, 0x30> game_tag; // "psopc2"
|
||||||
} __packed__;
|
} __packed__;
|
||||||
|
|
||||||
// DC: Player menu state (Episode 3)
|
// DC: Set battle in progress flag (Episode 3)
|
||||||
// No arguments. It seems the client expects the server to respond with another
|
// No arguments except header.flag when sent by the client. When header.flag is
|
||||||
// DC command, the contents and flag of which are ignored entirely - all it does
|
// 1, the game should be locked - no players should be allowed to join. In this
|
||||||
// is set a global flag on the client. This could be the mechanism for waiting
|
// case, the client waits for the server to respond with another DC command
|
||||||
// until all players are at the counter, like how AC (quest barrier) works. I
|
// before proceeding with battle setup. When header.flag is 0, the game should
|
||||||
// haven't spent any time investigating what this actually does; newserv just
|
// be unlocked, and the client does not wait for a response from the server.
|
||||||
// immediately responds to any DC from an Episode 3 client.
|
|
||||||
|
|
||||||
// DC: Guild card data (BB)
|
// DC: Guild card data (BB)
|
||||||
|
|
||||||
|
|||||||
+17
-10
@@ -1643,13 +1643,6 @@ static void on_CA_Ep3(shared_ptr<Client> c, uint16_t, uint32_t, string& data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (s->ep3_behavior_flags & Episode3::BehaviorFlag::ENABLE_RECORDING) {
|
if (s->ep3_behavior_flags & Episode3::BehaviorFlag::ENABLE_RECORDING) {
|
||||||
if (l->battle_record) {
|
|
||||||
for (const auto& c : l->clients) {
|
|
||||||
if (c) {
|
|
||||||
c->ep3_prev_battle_record = l->battle_record;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
l->battle_record = make_shared<Episode3::BattleRecord>(s->ep3_behavior_flags);
|
l->battle_record = make_shared<Episode3::BattleRecord>(s->ep3_behavior_flags);
|
||||||
for (auto existing_c : l->clients) {
|
for (auto existing_c : l->clients) {
|
||||||
if (existing_c) {
|
if (existing_c) {
|
||||||
@@ -1666,9 +1659,6 @@ static void on_CA_Ep3(shared_ptr<Client> c, uint16_t, uint32_t, string& data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (s->ep3_behavior_flags & Episode3::BehaviorFlag::ENABLE_STATUS_MESSAGES) {
|
if (s->ep3_behavior_flags & Episode3::BehaviorFlag::ENABLE_STATUS_MESSAGES) {
|
||||||
if (c->ep3_prev_battle_record) {
|
|
||||||
send_text_message(l, "$C6Recording complete");
|
|
||||||
}
|
|
||||||
send_text_message(l, "$C6Recording enabled");
|
send_text_message(l, "$C6Recording enabled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4433,6 +4423,23 @@ static void on_6F(shared_ptr<Client> c, uint16_t command, uint32_t, string& data
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (l->ep3_server && l->ep3_server->battle_finished) {
|
||||||
|
auto s = l->require_server_state();
|
||||||
|
l->log.info("Deleting Episode 3 server state");
|
||||||
|
l->ep3_server.reset();
|
||||||
|
if (l->battle_record) {
|
||||||
|
for (const auto& c : l->clients) {
|
||||||
|
if (c) {
|
||||||
|
c->ep3_prev_battle_record = l->battle_record;
|
||||||
|
if ((s->ep3_behavior_flags & Episode3::BehaviorFlag::ENABLE_STATUS_MESSAGES)) {
|
||||||
|
send_text_message(l, "$C6Recording complete");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
l->battle_record.reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
send_server_time(c);
|
send_server_time(c);
|
||||||
if (c->config.check_flag(Client::Flag::DEBUG_ENABLED)) {
|
if (c->config.check_flag(Client::Flag::DEBUG_ENABLED)) {
|
||||||
string variations_str;
|
string variations_str;
|
||||||
|
|||||||
Reference in New Issue
Block a user