mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-19 11:12:49 +00:00
feat(messages): RemoveBuffsAppliedByObject struct
Game message 1726 (optional object ID, default 0), as the 1.10.64 client reads it. Live sent it to every player when an object left the world; nothing sends it yet. Tested against a live capture packet. Needs the FromLiveCapture test helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -354,6 +354,15 @@ namespace GameMessages {
|
||||
return true;
|
||||
}
|
||||
|
||||
void RemoveBuffsAppliedByObject::Serialize(RakNet::BitStream& bitStream) const {
|
||||
BitStreamUtils::WriteOptional(bitStream, objectID, LWOOBJID_EMPTY);
|
||||
}
|
||||
|
||||
bool RemoveBuffsAppliedByObject::Deserialize(RakNet::BitStream& bitStream) {
|
||||
VALIDATE_READ(BitStreamUtils::ReadOptional(bitStream, objectID, LWOOBJID_EMPTY));
|
||||
return true;
|
||||
}
|
||||
|
||||
void AddRunSpeedModifier::Serialize(RakNet::BitStream& bitStream) const {
|
||||
BitStreamUtils::WriteOptional(bitStream, i64Caster, LWOOBJID_EMPTY);
|
||||
BitStreamUtils::WriteOptional(bitStream, uiModifier, 500u);
|
||||
|
||||
@@ -231,6 +231,17 @@ namespace GameMessages {
|
||||
uint32_t uiBuffID{};
|
||||
};
|
||||
|
||||
// Server -> client. The client's BuffComponent removes every buff (and immunity) whose source is objectID
|
||||
// (msgRemoveBuffsAppliedByObject @ 00d38f20 in 1.10.64). Live sent it to each player when an object left the
|
||||
// world (see docs/CaptureUnknowns.md).
|
||||
struct RemoveBuffsAppliedByObject : public NetGameMsg {
|
||||
RemoveBuffsAppliedByObject() : NetGameMsg(MessageType::Game::REMOVE_BUFFS_APPLIED_BY_OBJECT) {}
|
||||
void Serialize(RakNet::BitStream& bitStream) const override;
|
||||
bool Deserialize(RakNet::BitStream& bitStream) override;
|
||||
|
||||
LWOOBJID objectID{ LWOOBJID_EMPTY }; // optional
|
||||
};
|
||||
|
||||
// Server -> client.
|
||||
struct AddRunSpeedModifier : public NetGameMsg {
|
||||
AddRunSpeedModifier() : NetGameMsg(MessageType::Game::ADD_RUN_SPEED_MODIFIER) {}
|
||||
|
||||
Reference in New Issue
Block a user