mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-21 14:58:09 +00:00
remove complex queries and move logic to dDatabase
remove unused code Use correct id fix arrows use correct parameter fix queries Update Property.cpp remove unused header remove extra include
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
|
||||
enum ePropertySortType : int32_t;
|
||||
|
||||
class IProperty {
|
||||
public:
|
||||
struct Info {
|
||||
@@ -18,11 +20,33 @@ public:
|
||||
uint32_t lastUpdatedTime{};
|
||||
uint32_t claimedTime{};
|
||||
uint32_t reputation{};
|
||||
float performanceCost{};
|
||||
};
|
||||
|
||||
struct PropertyLookup {
|
||||
uint32_t mapId{};
|
||||
std::string searchString;
|
||||
ePropertySortType sortChoice{};
|
||||
uint32_t playerId{};
|
||||
uint32_t numResults{};
|
||||
uint32_t startIndex{};
|
||||
uint32_t playerSort{};
|
||||
};
|
||||
|
||||
struct PropertyEntranceResult {
|
||||
int32_t totalEntriesMatchingQuery{};
|
||||
// The entries that match the query. This should only contain up to 12 entries.
|
||||
std::vector<IProperty::Info> entries;
|
||||
};
|
||||
|
||||
// Get the property info for the given property id.
|
||||
virtual std::optional<IProperty::Info> GetPropertyInfo(const LWOMAPID mapId, const LWOCLONEID cloneId) = 0;
|
||||
|
||||
// Get the properties for the given property lookup params.
|
||||
// This is expected to return a result set of up to 12 properties
|
||||
// so as not to transfer too much data at once.
|
||||
virtual std::optional<IProperty::PropertyEntranceResult> GetProperties(const PropertyLookup& params) = 0;
|
||||
|
||||
// Update the property moderation info for the given property id.
|
||||
virtual void UpdatePropertyModerationInfo(const IProperty::Info& info) = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user