mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-19 18:25:27 +00:00
refactor(component): group the component files by the client's families
Physics/, Activity/ (activity, scripted activity, shooting gallery, quickbuild, minigame control, racing control base, racing control, gate rush), Vendor/, Character/ (what the client makes with a character, plus ghost, minifig and mission), Sound/ and Property/; the rest stays where it was. File moves only; DLU_COMPONENT_INCLUDE_DIRS gives every target the folders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
45
dGame/dComponents/Vendor/AchievementCacheKey.h
vendored
Normal file
45
dGame/dComponents/Vendor/AchievementCacheKey.h
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "eMissionTaskType.h"
|
||||
|
||||
#ifndef __ACHIEVEMENTCACHEKEY__H__
|
||||
#define __ACHIEVEMENTCACHEKEY__H__
|
||||
|
||||
class AchievementCacheKey {
|
||||
public:
|
||||
AchievementCacheKey() {
|
||||
targets = "";
|
||||
value = 0;
|
||||
type = eMissionTaskType::UNKNOWN;
|
||||
};
|
||||
|
||||
bool operator==(const AchievementCacheKey& point) const {
|
||||
return this->targets == point.targets && this->value == point.value && this->type == point.type;
|
||||
};
|
||||
void SetTargets(const std::string value) { this->targets = value; };
|
||||
void SetValue(uint32_t value) { this->value = value; };
|
||||
void SetType(eMissionTaskType value) { this->type = value; };
|
||||
|
||||
std::string GetTargets() const { return this->targets; };
|
||||
uint32_t GetValue() const { return this->value; };
|
||||
eMissionTaskType GetType() const { return this->type; };
|
||||
private:
|
||||
std::string targets;
|
||||
uint32_t value;
|
||||
eMissionTaskType type;
|
||||
|
||||
};
|
||||
|
||||
// Specialization of hash for the above class
|
||||
namespace std {
|
||||
template<>
|
||||
struct hash<AchievementCacheKey> {
|
||||
size_t operator()(const AchievementCacheKey& key) const {
|
||||
size_t hash = 0;
|
||||
GeneralUtils::hash_combine(hash, key.GetType());
|
||||
GeneralUtils::hash_combine(hash, key.GetValue());
|
||||
GeneralUtils::hash_combine(hash, key.GetTargets());
|
||||
return hash;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#endif //!__ACHIEVEMENTCACHEKEY__H__
|
||||
Reference in New Issue
Block a user