mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-05 23:08:31 +00:00
chore: Update render component and delete unused code (#1429)
* Update a few components to use smart pointers for memory management * 'final' keyword added to classes * removed duplicate 'const' * removed unused code * Updated render component to store effects directly in a vector * Use move instead of copy * make pointers const * attribute tags * nitpicking * delete default effect constructor * Added a vector size check to the RemoveEffect() function * use empty() instead of size()
This commit is contained in:
@@ -1,34 +1,22 @@
|
||||
/*
|
||||
* Darkflame Universe
|
||||
* Copyright 2018
|
||||
* Copyright 2024
|
||||
*/
|
||||
|
||||
#ifndef PROPERTYCOMPONENT_H
|
||||
#define PROPERTYCOMPONENT_H
|
||||
|
||||
#include "BitStream.h"
|
||||
#include "Entity.h"
|
||||
#include "Component.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
|
||||
struct PropertyState {
|
||||
LWOOBJID ownerID;
|
||||
LWOOBJID propertyID;
|
||||
bool rented;
|
||||
};
|
||||
|
||||
/**
|
||||
* This component is unused and has no functionality
|
||||
*/
|
||||
class PropertyComponent final : public Component {
|
||||
public:
|
||||
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::PROPERTY;
|
||||
explicit PropertyComponent(Entity* parentEntity);
|
||||
~PropertyComponent() override;
|
||||
[[nodiscard]] PropertyState* GetPropertyState() const { return m_PropertyState; };
|
||||
private:
|
||||
PropertyState* m_PropertyState;
|
||||
std::string m_PropertyName;
|
||||
explicit PropertyComponent(Entity* const parentEntity) noexcept : Component{ parentEntity } {}
|
||||
};
|
||||
|
||||
#endif // PROPERTYCOMPONENT_H
|
||||
#endif // !PROPERTYCOMPONENT_H
|
||||
|
Reference in New Issue
Block a user