-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
301 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#pragma once | ||
|
||
struct MountEvent | ||
{ | ||
MountEvent(uint32_t aRiderID, uint32_t aMountID) | ||
: RiderID(aRiderID), MountID(aMountID) | ||
{} | ||
|
||
uint32_t RiderID; | ||
uint32_t MountID; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include <Messages/MountRequest.h> | ||
|
||
void MountRequest::SerializeRaw(TiltedPhoques::Buffer::Writer& aWriter) const noexcept | ||
{ | ||
Serialization::WriteVarInt(aWriter, RiderId); | ||
Serialization::WriteVarInt(aWriter, MountId); | ||
} | ||
|
||
void MountRequest::DeserializeRaw(TiltedPhoques::Buffer::Reader& aReader) noexcept | ||
{ | ||
ClientMessage::DeserializeRaw(aReader); | ||
|
||
RiderId = Serialization::ReadVarInt(aReader) & 0xFFFFFFFF; | ||
MountId = Serialization::ReadVarInt(aReader) & 0xFFFFFFFF; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#pragma once | ||
|
||
#include "Message.h" | ||
|
||
struct MountRequest final : ClientMessage | ||
{ | ||
static constexpr ClientOpcode Opcode = kMountRequest; | ||
|
||
MountRequest() : ClientMessage(Opcode) | ||
{ | ||
} | ||
|
||
void SerializeRaw(TiltedPhoques::Buffer::Writer& aWriter) const noexcept override; | ||
void DeserializeRaw(TiltedPhoques::Buffer::Reader& aReader) noexcept override; | ||
|
||
bool operator==(const MountRequest& acRhs) const noexcept | ||
{ | ||
return GetOpcode() == acRhs.GetOpcode() && | ||
RiderId == acRhs.RiderId && | ||
MountId == acRhs.MountId; | ||
} | ||
|
||
uint32_t RiderId; | ||
uint32_t MountId; | ||
}; |
Oops, something went wrong.