Skip to content

Commit b0aabab

Browse files
committed
fix: Serene and Harmony when closing game client
This PR fixes the Serene and Harmony issues that occur when a player closes the game client using the 'X' button.
1 parent a4c6f69 commit b0aabab

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/server/network/protocol/protocolgame.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,10 @@ void ProtocolGame::connect(const std::string &playerName, OperatingSystem_t oper
776776

777777
player->client = getThis();
778778
player->openPlayerContainers();
779+
780+
player->sendHarmonyProtocol();
781+
player->sendSereneProtocol();
782+
779783
sendAddCreature(player, player->getPosition(), 0, true);
780784
player->lastIP = player->getIP();
781785
player->lastLoad = OTSYS_TIME();

src/server/network/protocol/protocolgame.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ class ProtocolGame final : public Protocol {
541541
void parseWheelGemAction(NetworkMessage &msg);
542542

543543
void sendHarmonyProtocol(const uint8_t harmonyValue);
544-
void sendSereneProtocol(const bool isSerene);
544+
void sendSereneProtocol(const bool isSerene = true);
545545
void sendVirtueProtocol(const uint8_t virtueValue);
546546
void parseSelectSpellAimProtocol(NetworkMessage &msg);
547547

0 commit comments

Comments
 (0)