mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-26 07:27:18 +00:00
PropertyComponent pass
This commit is contained in:
parent
4d88f63338
commit
37bcc81694
@ -2,10 +2,4 @@
|
||||
#include "GameMessages.h"
|
||||
#include "dZoneManager.h"
|
||||
|
||||
PropertyComponent::PropertyComponent(Entity* parent) : Component(parent) {
|
||||
m_PropertyName = parent->GetVar<std::string>(u"propertyName");
|
||||
m_PropertyState = new PropertyState();
|
||||
}
|
||||
|
||||
PropertyComponent::~PropertyComponent() = default;
|
||||
|
||||
PropertyComponent::PropertyComponent(Entity* parent) : Component(parent) { }
|
||||
|
@ -3,32 +3,16 @@
|
||||
* Copyright 2018
|
||||
*/
|
||||
|
||||
#ifndef PROPERTYCOMPONENT_H
|
||||
#define PROPERTYCOMPONENT_H
|
||||
#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 : public Component {
|
||||
public:
|
||||
inline static const 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;
|
||||
PropertyComponent(Entity* parentEntity);
|
||||
};
|
||||
|
||||
#endif // PROPERTYCOMPONENT_H
|
||||
#endif // __PROPERTYCOMPONENT_H__
|
||||
|
Loading…
Reference in New Issue
Block a user