Loading...   

  • Created By Uleat On: 03:39 PM March 09, 2018
  • Link

struct ItemGUIDEngine {
	union {
		char _decode[12];
		struct {
#pragma pack(1)
			uint8 OriginatorType;
			uint32 OriginatorID;
			uint16 OriginatorZoneID;
			uint32 CreationTime;
			uint8 SequenceID;
#pragma pack()
		};
	};
	union {
		char _encode[17];
		char EncodedData[17];
	};

	static const char* NullEncode;
	static const size_t EncodeLength = 16;
		
	ItemGUIDEngine();

	void Reset();

	bool SetEncodedData(const char* encoded_data);

	inline bool IsNullDecode() { return IsNullDecode1(*this); }
	inline bool IsNullEncode() { return IsNullEncode1(*this); }

	inline bool Decode() { return Decode1(*this); }
	inline bool Encode() { return Encode1(*this); }
};

enum ItemGUIDOriginatorType : uint8 {
	itemGUIDTypeNone = 0,
	itemGUIDTypePlayerBindSelfOrphan,
	itemGUIDTypePlayerBindPetOrphan,
	itemGUIDTypePlayerBindMercOrphan,
	itemGUIDTypePlayerBindMercPetOrphan,
	itemGUIDTypePlayerBindBotOrphan,
	itemGUIDTypePlayerBindBotPetOrphan,
	itemGUIDTypePlayerCorpseLoot,
	itemGUIDTypePlayerSummonItem,
	itemGUIDTypePlayerStackSplit,
	itemGUIDTypeNPCCorpseLoot,
	itemGUIDTypeMerchantPurchase,
	itemGUIDTypeLDoNMerchantPurchase,
	itemGUIDTypeDiscordMerchantPurchase,
	itemGUIDTypeNorrathsKeepersMerchantPurchase,
	itemGUIDTypeDarkReignMerchantPurchase,
	itemGUIDTypeAltCurrencyMerchantPurchase,
	itemGUIDTypePerlScript,
	itemGUIDTypeLuaScript,
	itemGUIDTypeCount
};

Raw Paste Data