Add cUUID class (#3871)
This commit is contained in:
committed by
Alexander Harkness
parent
86d52c3e17
commit
f4f2fc7c3d
@@ -54,7 +54,8 @@ void cMobHeadEntity::SetType(const eMobHeadType & a_Type)
|
||||
{
|
||||
if ((!m_OwnerName.empty()) && (a_Type != SKULL_TYPE_PLAYER))
|
||||
{
|
||||
m_OwnerName = m_OwnerUUID = m_OwnerTexture = m_OwnerTextureSignature = "";
|
||||
m_OwnerName = m_OwnerTexture = m_OwnerTextureSignature = "";
|
||||
m_OwnerUUID = cUUID{};
|
||||
}
|
||||
m_Type = a_Type;
|
||||
m_World->BroadcastBlockEntity(m_PosX, m_PosY, m_PosZ);
|
||||
@@ -102,7 +103,7 @@ void cMobHeadEntity::SetOwner(const cPlayer & a_Owner)
|
||||
|
||||
|
||||
|
||||
void cMobHeadEntity::SetOwner(const AString & a_OwnerUUID, const AString & a_OwnerName, const AString & a_OwnerTexture, const AString & a_OwnerTextureSignature)
|
||||
void cMobHeadEntity::SetOwner(const cUUID & a_OwnerUUID, const AString & a_OwnerName, const AString & a_OwnerTexture, const AString & a_OwnerTextureSignature)
|
||||
{
|
||||
if (m_Type != SKULL_TYPE_PLAYER)
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "BlockEntity.h"
|
||||
#include "Defines.h"
|
||||
#include "UUID.h"
|
||||
|
||||
|
||||
|
||||
@@ -42,9 +43,6 @@ public:
|
||||
/** Set the player for mob heads with player type */
|
||||
void SetOwner(const cPlayer & a_Owner);
|
||||
|
||||
/** Sets the player components for the mob heads with player type. */
|
||||
void SetOwner(const AString & a_OwnerUUID, const AString & a_OwnerName, const AString & a_OwnerTexture, const AString & a_OwnerTextureSignature);
|
||||
|
||||
/** Returns the type of the mob head */
|
||||
eMobHeadType GetType(void) const { return m_Type; }
|
||||
|
||||
@@ -54,9 +52,6 @@ public:
|
||||
/** Returns the player name of the mob head */
|
||||
AString GetOwnerName(void) const { return m_OwnerName; }
|
||||
|
||||
/** Returns the player UUID of the mob head */
|
||||
AString GetOwnerUUID(void) const { return m_OwnerUUID; }
|
||||
|
||||
/** Returns the texture of the mob head */
|
||||
AString GetOwnerTexture(void) const { return m_OwnerTexture; }
|
||||
|
||||
@@ -65,6 +60,15 @@ public:
|
||||
|
||||
// tolua_end
|
||||
|
||||
/** Sets the player components for the mob heads with player type. */
|
||||
void SetOwner(
|
||||
const cUUID & a_OwnerUUID, const AString & a_OwnerName,
|
||||
const AString & a_OwnerTexture, const AString & a_OwnerTextureSignature
|
||||
); // Exported in ManualBindings.cpp
|
||||
|
||||
/** Returns the player UUID of the mob head */
|
||||
cUUID GetOwnerUUID(void) const { return m_OwnerUUID; } // Exported in ManualBindings.cpp
|
||||
|
||||
// cBlockEntity overrides:
|
||||
virtual void CopyFrom(const cBlockEntity & a_Src) override;
|
||||
virtual bool UsedBy(cPlayer * a_Player) override;
|
||||
@@ -76,7 +80,7 @@ private:
|
||||
eMobHeadRotation m_Rotation;
|
||||
|
||||
AString m_OwnerName;
|
||||
AString m_OwnerUUID;
|
||||
cUUID m_OwnerUUID;
|
||||
AString m_OwnerTexture;
|
||||
AString m_OwnerTextureSignature;
|
||||
} ; // tolua_export
|
||||
|
||||
Reference in New Issue
Block a user