2023-07-05 05:17:44 +00:00
|
|
|
#ifndef __ITEMCOMPONENT__H__
|
|
|
|
#define __ITEMCOMPONENT__H__
|
2023-02-11 03:33:30 +00:00
|
|
|
#pragma once
|
2023-07-05 05:17:44 +00:00
|
|
|
|
2023-02-11 03:33:30 +00:00
|
|
|
#include "dCommonVars.h"
|
|
|
|
#include "RakNetTypes.h"
|
|
|
|
#include "NiPoint3.h"
|
|
|
|
#include "NiQuaternion.h"
|
|
|
|
#include "Component.h"
|
2023-03-21 02:14:52 +00:00
|
|
|
#include "eReplicaComponentType.h"
|
2023-02-11 03:33:30 +00:00
|
|
|
|
|
|
|
class Entity;
|
|
|
|
enum class eUgcModerationStatus : uint32_t;
|
|
|
|
|
|
|
|
class ItemComponent : public Component {
|
|
|
|
public:
|
2023-03-21 02:14:52 +00:00
|
|
|
static const eReplicaComponentType ComponentType = eReplicaComponentType::ITEM;
|
2023-02-11 03:33:30 +00:00
|
|
|
|
|
|
|
ItemComponent(Entity* parent);
|
|
|
|
|
|
|
|
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags);
|
|
|
|
|
|
|
|
void SetUgId(LWOOBJID id) { m_UgId = id; m_DirtyItemInfo = true; };
|
|
|
|
LWOOBJID GetUgId() { return m_UgId; };
|
|
|
|
|
|
|
|
void SetUgModerationStatus(eUgcModerationStatus status) { m_UgModerationStatus = status; m_DirtyItemInfo = true; };
|
|
|
|
eUgcModerationStatus GetUgModerationStatus() { return m_UgModerationStatus; };
|
|
|
|
|
|
|
|
void SetUgDescription(std::u16string description) { m_UgDescription = description; m_DirtyItemInfo = true; };
|
|
|
|
std::u16string GetUgDescription() { return m_UgDescription;};
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If we have change the item info
|
|
|
|
*/
|
|
|
|
bool m_DirtyItemInfo;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The ID of the user that made the model
|
|
|
|
*/
|
|
|
|
LWOOBJID m_UgId;
|
|
|
|
|
|
|
|
/**
|
2023-07-05 05:17:44 +00:00
|
|
|
* Whether or not the description of this item is approved.
|
2023-02-11 03:33:30 +00:00
|
|
|
*/
|
|
|
|
eUgcModerationStatus m_UgModerationStatus;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The user generated description
|
|
|
|
*/
|
|
|
|
std::u16string m_UgDescription;
|
|
|
|
};
|
2023-07-05 05:17:44 +00:00
|
|
|
|
|
|
|
#endif //!__ITEMCOMPONENT__H__
|