Core/Housing: stage 38 expose Housing decor GUID fields
This commit is contained in:
@@ -69,6 +69,21 @@ namespace Housing
|
||||
return !guid.IsEmpty() && guid.GetHigh() == HighGuid::Housing && guid.GetSubType() == 1;
|
||||
}
|
||||
|
||||
// Housing subtype 1 has its own GUID layout. ObjectGuid::GetEntry() is for
|
||||
// world-object GUID formats and does not expose the DecorID stored in the
|
||||
// lower 32 bits of the Housing GUID high word.
|
||||
inline uint32 GetDecorId(ObjectGuid const& guid)
|
||||
{
|
||||
return IsDecorGuid(guid) ? uint32(guid.GetRawValue(1) & 0xFFFFFFFFu) : 0;
|
||||
}
|
||||
|
||||
inline uint32 GetHousingGuidNamespace(ObjectGuid const& guid)
|
||||
{
|
||||
return guid.GetHigh() == HighGuid::Housing
|
||||
? uint32((guid.GetRawValue(1) >> 32) & 0xFFFFu)
|
||||
: 0;
|
||||
}
|
||||
|
||||
inline bool IsHousingAttachmentGuid(ObjectGuid const& guid)
|
||||
{
|
||||
return guid.IsEmpty() || guid.GetHigh() == HighGuid::Housing || guid.GetHigh() == HighGuid::MeshObject;
|
||||
|
||||
Reference in New Issue
Block a user