mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 18:24:12 +00:00
format codebase
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,7 @@
|
||||
#include "../dDatabase/CDClientDatabase.h"
|
||||
|
||||
namespace GameMessageHandler {
|
||||
void HandleMessage(RakNet::BitStream* inStream, const SystemAddress& sysAddr, LWOOBJID objectID, GAME_MSG messageID);
|
||||
void HandleMessage(RakNet::BitStream* inStream, const SystemAddress& sysAddr, LWOOBJID objectID, GAME_MSG messageID);
|
||||
};
|
||||
|
||||
#endif // GAMEMESSAGEHANDLER_H
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -6,8 +6,7 @@
|
||||
#include "dLogger.h"
|
||||
#include "CDClientManager.h"
|
||||
|
||||
void GameMessages::PropertyDataMessage::Serialize(RakNet::BitStream& stream) const
|
||||
{
|
||||
void GameMessages::PropertyDataMessage::Serialize(RakNet::BitStream& stream) const {
|
||||
stream.Write<int64_t>(0); // - property id
|
||||
|
||||
stream.Write<int32_t>(TemplateID); // - template id
|
||||
@@ -39,9 +38,9 @@ void GameMessages::PropertyDataMessage::Serialize(RakNet::BitStream& stream) con
|
||||
stream.Write<uint32_t>(0); // - zone code
|
||||
stream.Write<uint32_t>(0); // - minimum price
|
||||
stream.Write<uint32_t>(1); // - rent duration
|
||||
|
||||
|
||||
stream.Write<uint64_t>(LastUpdatedTime); // - timestamp
|
||||
|
||||
|
||||
stream.Write<uint32_t>(1);
|
||||
|
||||
stream.Write<uint32_t>(reputation); // Reputation
|
||||
@@ -52,7 +51,7 @@ void GameMessages::PropertyDataMessage::Serialize(RakNet::BitStream& stream) con
|
||||
for (uint32_t i = 0; i < spawn.size(); ++i) {
|
||||
stream.Write(uint16_t(spawn[i]));
|
||||
}
|
||||
|
||||
|
||||
stream.Write<uint32_t>(0); // String length
|
||||
stream.Write<uint32_t>(0); // String length
|
||||
|
||||
@@ -89,13 +88,12 @@ void GameMessages::PropertyDataMessage::Serialize(RakNet::BitStream& stream) con
|
||||
stream.Write<float>(MaxBuildHeight);
|
||||
|
||||
stream.Write(ClaimedTime); // - timestamp
|
||||
|
||||
|
||||
stream.Write<char>(PrivacyOption);
|
||||
|
||||
stream.Write(uint32_t(Paths.size()));
|
||||
|
||||
for (const auto& path : Paths)
|
||||
{
|
||||
for (const auto& path : Paths) {
|
||||
stream.Write(path.x);
|
||||
stream.Write(path.y);
|
||||
stream.Write(path.z);
|
||||
@@ -103,11 +101,11 @@ void GameMessages::PropertyDataMessage::Serialize(RakNet::BitStream& stream) con
|
||||
}
|
||||
|
||||
GameMessages::PropertyDataMessage::PropertyDataMessage(uint32_t mapID) {
|
||||
const auto propertyTemplate = CDClientManager::Instance()->
|
||||
GetTable<CDPropertyTemplateTable>("PropertyTemplate")->GetByMapID(mapID);
|
||||
const auto propertyTemplate = CDClientManager::Instance()->
|
||||
GetTable<CDPropertyTemplateTable>("PropertyTemplate")->GetByMapID(mapID);
|
||||
|
||||
TemplateID = propertyTemplate.id;
|
||||
ZoneId = propertyTemplate.mapID;
|
||||
VendorMapId = propertyTemplate.vendorMapID;
|
||||
SpawnName = propertyTemplate.spawnName;
|
||||
TemplateID = propertyTemplate.id;
|
||||
ZoneId = propertyTemplate.mapID;
|
||||
VendorMapId = propertyTemplate.vendorMapID;
|
||||
SpawnName = propertyTemplate.spawnName;
|
||||
}
|
||||
|
@@ -8,12 +8,11 @@
|
||||
#include "NiPoint3.h"
|
||||
#include "dCommonVars.h"
|
||||
|
||||
namespace GameMessages
|
||||
{
|
||||
namespace GameMessages {
|
||||
class PropertyDataMessage final
|
||||
{
|
||||
public:
|
||||
explicit PropertyDataMessage(uint32_t mapID);
|
||||
explicit PropertyDataMessage(uint32_t mapID);
|
||||
|
||||
void Serialize(RakNet::BitStream& stream) const;
|
||||
|
||||
@@ -47,4 +46,4 @@ namespace GameMessages
|
||||
REJECTION_STATUS_REJECTED = 2
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,7 @@
|
||||
#include "PropertySelectQueryProperty.h"
|
||||
|
||||
void PropertySelectQueryProperty::Serialize(RakNet::BitStream& stream) const
|
||||
{
|
||||
stream.Write(CloneId);
|
||||
void PropertySelectQueryProperty::Serialize(RakNet::BitStream& stream) const {
|
||||
stream.Write(CloneId);
|
||||
|
||||
const auto& owner = GeneralUtils::ASCIIToUTF16(OwnerName);
|
||||
stream.Write(uint32_t(owner.size()));
|
||||
@@ -34,7 +33,6 @@ void PropertySelectQueryProperty::Serialize(RakNet::BitStream& stream) const
|
||||
stream.Write(PerformanceCost);
|
||||
}
|
||||
|
||||
void PropertySelectQueryProperty::Deserialize(RakNet::BitStream& stream) const
|
||||
{
|
||||
// Do we need this?
|
||||
void PropertySelectQueryProperty::Deserialize(RakNet::BitStream& stream) const {
|
||||
// Do we need this?
|
||||
}
|
||||
|
@@ -12,20 +12,20 @@ public:
|
||||
|
||||
void Deserialize(RakNet::BitStream& stream) const;
|
||||
|
||||
LWOCLONEID CloneId = LWOCLONEID_INVALID; // The cloneID of the property
|
||||
std::string OwnerName = ""; // The property owners name
|
||||
std::string Name = ""; // The property name
|
||||
std::string Description = ""; // The property description
|
||||
float Reputation = 0; // The reputation of the property
|
||||
bool IsBestFriend = false; // Whether or not the property belongs to a best friend
|
||||
bool IsFriend = false; // Whether or not the property belongs to a friend
|
||||
bool IsModeratorApproved = false; // Whether or not a moderator has approved this property
|
||||
bool IsAlt = false; // Whether or not the property is owned by an alt of the account owner
|
||||
bool IsOwned = false; // Whether or not the property is owned
|
||||
uint32_t AccessType = 0; // The privacy option of the property
|
||||
uint32_t DateLastPublished = 0; // The last day the property was published
|
||||
float PerformanceCost = 0; // The performance cost of the property
|
||||
uint32_t PerformanceIndex = 0; // The performance index of the property? Always 0?
|
||||
LWOCLONEID CloneId = LWOCLONEID_INVALID; // The cloneID of the property
|
||||
std::string OwnerName = ""; // The property owners name
|
||||
std::string Name = ""; // The property name
|
||||
std::string Description = ""; // The property description
|
||||
float Reputation = 0; // The reputation of the property
|
||||
bool IsBestFriend = false; // Whether or not the property belongs to a best friend
|
||||
bool IsFriend = false; // Whether or not the property belongs to a friend
|
||||
bool IsModeratorApproved = false; // Whether or not a moderator has approved this property
|
||||
bool IsAlt = false; // Whether or not the property is owned by an alt of the account owner
|
||||
bool IsOwned = false; // Whether or not the property is owned
|
||||
uint32_t AccessType = 0; // The privacy option of the property
|
||||
uint32_t DateLastPublished = 0; // The last day the property was published
|
||||
float PerformanceCost = 0; // The performance cost of the property
|
||||
uint32_t PerformanceIndex = 0; // The performance index of the property? Always 0?
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user