mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-17 21:08:09 +00:00
idek if ill keep this but yeah
This commit is contained in:
@@ -2752,7 +2752,7 @@ void GameMessages::HandlePropertyEntranceSync(RakNet::BitStream* inStream, Entit
|
||||
bool updateUi{};
|
||||
int32_t numResults{};
|
||||
int32_t reputation{};
|
||||
int32_t sortMethod{};
|
||||
ePropertySortType sortMethod{};
|
||||
int32_t startIndex{};
|
||||
uint32_t filterTextLength{};
|
||||
std::string filterText{};
|
||||
@@ -2769,15 +2769,14 @@ void GameMessages::HandlePropertyEntranceSync(RakNet::BitStream* inStream, Entit
|
||||
|
||||
for (auto i = 0u; i < filterTextLength; i++) {
|
||||
char c;
|
||||
inStream->Read(c);
|
||||
filterText.push_back(c);
|
||||
if (inStream->Read(c)) filterText.push_back(c);
|
||||
}
|
||||
|
||||
auto* player = Player::GetPlayer(sysAddr);
|
||||
|
||||
auto* entranceComponent = entity->GetComponent<PropertyEntranceComponent>();
|
||||
|
||||
if (entranceComponent == nullptr) return;
|
||||
if (!entranceComponent) return;
|
||||
|
||||
entranceComponent->OnPropertyEntranceSync(player,
|
||||
includeNullAddress,
|
||||
|
@@ -3,22 +3,19 @@
|
||||
void PropertySelectQueryProperty::Serialize(RakNet::BitStream& stream) const {
|
||||
stream.Write(CloneId);
|
||||
|
||||
const auto& owner = GeneralUtils::UTF8ToUTF16(OwnerName);
|
||||
stream.Write(uint32_t(owner.size()));
|
||||
for (uint32_t i = 0; i < owner.size(); ++i) {
|
||||
stream.Write(static_cast<uint16_t>(owner[i]));
|
||||
stream.Write<uint32_t>(OwnerName.size());
|
||||
for (const auto& c : OwnerName) {
|
||||
stream.Write<uint16_t>(c);
|
||||
}
|
||||
|
||||
const auto& name = GeneralUtils::UTF8ToUTF16(Name);
|
||||
stream.Write(uint32_t(name.size()));
|
||||
for (uint32_t i = 0; i < name.size(); ++i) {
|
||||
stream.Write(static_cast<uint16_t>(name[i]));
|
||||
stream.Write<uint32_t>(Name.size());
|
||||
for (const auto& c : Name) {
|
||||
stream.Write<uint16_t>(c);
|
||||
}
|
||||
|
||||
const auto& description = GeneralUtils::UTF8ToUTF16(Description);
|
||||
stream.Write(uint32_t(description.size()));
|
||||
for (uint32_t i = 0; i < description.size(); ++i) {
|
||||
stream.Write(static_cast<uint16_t>(description[i]));
|
||||
stream.Write<uint32_t>(Description.size());
|
||||
for (const auto& c : Description) {
|
||||
stream.Write<uint16_t>(c);
|
||||
}
|
||||
|
||||
stream.Write(Reputation);
|
||||
@@ -32,7 +29,3 @@ void PropertySelectQueryProperty::Serialize(RakNet::BitStream& stream) const {
|
||||
stream.Write(PerformanceIndex);
|
||||
stream.Write(PerformanceCost);
|
||||
}
|
||||
|
||||
void PropertySelectQueryProperty::Deserialize(RakNet::BitStream& stream) const {
|
||||
// Do we need this?
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef PROPERTYSELECTQUERY_H
|
||||
#define PROPERTYSELECTQUERY_H
|
||||
#ifndef __PROPERTYSELECTQUERY_H__
|
||||
#define __PROPERTYSELECTQUERY_H__
|
||||
|
||||
#include "Entity.h"
|
||||
|
||||
@@ -10,12 +10,10 @@ class PropertySelectQueryProperty final
|
||||
public:
|
||||
void Serialize(RakNet::BitStream& stream) const;
|
||||
|
||||
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
|
||||
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
|
||||
@@ -28,4 +26,4 @@ public:
|
||||
uint32_t PerformanceIndex = 0; // The performance index of the property? Always 0?
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // __PROPERTYSELECTQUERY_H__
|
||||
|
Reference in New Issue
Block a user