mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-26 16:01:34 +00:00
feat(missions): keep the viewed flag of missions in progress, as the client
The client keeps a viewed flag on each mission in progress, sets it with SetMissionViewed (LWOMissionComponent::msgSetMissionViewed 0x00bec7a0, only for missions in progress) and reads it as v on the mission's <cur> entry (LWOMissionComponent::LoadFromSaveData 0x00d171c0, a number or "true", false when missing). The server now handles SetMissionViewed, saves v="1" for a viewed mission in progress and loads it back; saves without v load as not viewed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -149,6 +149,18 @@ namespace GameMessages {
|
||||
std::string type{};
|
||||
};
|
||||
|
||||
// Client -> server. The player looked at a mission in progress (LWOMissionComponent::msgSetMissionViewed 0x00bec7a0);
|
||||
// the server keeps it and saves it as v on the mission's <cur> entry, which the client reads on load.
|
||||
struct SetMissionViewed : public NetGameMsg {
|
||||
SetMissionViewed() : NetGameMsg(MessageType::Game::SET_MISSION_VIEWED) {}
|
||||
void Serialize(RakNet::BitStream& bitStream) const override;
|
||||
bool Deserialize(RakNet::BitStream& bitStream) override;
|
||||
void Handle(Entity& entity, const SystemAddress& sysAddr) override;
|
||||
|
||||
int32_t missionID{};
|
||||
bool viewed{};
|
||||
};
|
||||
|
||||
// Server -> client.
|
||||
struct NotifyLevelRewards : public NetGameMsg {
|
||||
NotifyLevelRewards() : NetGameMsg(MessageType::Game::NOTIFY_LEVEL_REWARDS) {}
|
||||
|
||||
Reference in New Issue
Block a user