<?xml version="1.0"?>
<rss version="2.0"><channel><title>Wiki: Wiki</title><link>https://www.getmangos.eu/wiki/referenceinfo/packetinfo/?d=4</link><description>Wiki: Wiki</description><language>en</language><item><title>Data types of packet fields</title><link>https://www.getmangos.eu/wiki/referenceinfo/packetinfo/data-types-of-packet-fields-r20087/</link><description><![CDATA[<p>
	The numeric data longer than 1 byte are represented in the big-endian form. The cores provide the conversion (if needed) by the "&gt;&gt;" and "&lt;&lt;" operators.
</p>

<table border="1" cellpadding="1" cellspacing="1" style="width:650px;"><caption>
		Data formats
	</caption>
	<thead><tr><th scope="col" style="text-align:center;">
				Type
			</th>
			<th scope="col" style="text-align:center;">
				Getting it in the core
			</th>
			<th scope="col" style="text-align:center;">
				Description
			</th>
		</tr></thead><tbody><tr><td>
				uint8, uint16, uint32, int8, int16, int32
			</td>
			<td>
				Direct conversion of numbers and enum members to the corresponding type, like uint8(SPELL_FAILED_DONT_REPORT)
			</td>
			<td>
				Signed and unsigned versions are interchangeable if the representation is correct. Boolean true/false are represented usually as uint8(1), uint8(0) respectively.
			</td>
		</tr><tr><td>
				uint64 (GUID)
			</td>
			<td>
				Object::GetObjectGuid()
			</td>
			<td>
				A 8-bytes value, see class ObjectGuid. It is used for nothing but GUIDs, so uint64(0) in the code should be changed to ObjectGuid().
			</td>
		</tr><tr><td>
				PackedGUID
			</td>
			<td>
				Object::GetPackGUID(), ObjectGuid::ReadAsPacked()
			</td>
			<td>
				A GUID in the packed form can be 2 to 9 bytes long. A brief description is presented below.
			</td>
		</tr><tr><td>
				C string
			</td>
			<td>
				string::c_str()
			</td>
			<td>
				A zero-terminated sequence of characters. Read/write operators for string type ("&lt;&lt; string" so on) provide this conversion, making call to c_str() optional.
			</td>
		</tr><tr><td>
				Raw data
			</td>
			<td>
				ByteBuffer::contents(), BigNumber::AsByteArray()
			</td>
			<td>
				An arbitrary sequence of bytes, following the uint8, uint16, or uint32 field which stores the length of the sequence.
			</td>
		</tr></tbody></table><p>
	A packed GUID consists of a flag byte followed by the GUID data. This is based on the 1:1 mapping of a bit of the flag byte to the byte in 8-bytes GUID. The flag byte contains only those bits set which correspond to the non-zero bytes of the full GUID. The packed GUID length varies from 2 bytes (the best case for a player with low GUID under 256) and 9 bytes (with the flag byte 0xFF followed by the full GUID). The most saving in size provide player GUIDs since any other GUID contains non-zero data in the highest bytes, at least in the 12 highest bits (see ObjectGuid class for details).
</p>
]]></description><guid isPermaLink="false">20087</guid><pubDate>Sun, 30 Jul 2017 13:11:46 +0000</pubDate></item><item><title>Packet Information coming soon</title><link>https://www.getmangos.eu/wiki/referenceinfo/packetinfo/packet-information-coming-soon-r20044/</link><description><![CDATA[<p>
	Packet Information coming soon
</p>]]></description><guid isPermaLink="false">20044</guid><pubDate>Tue, 02 Aug 2016 22:04:17 +0000</pubDate></item><item><title>README</title><link>https://www.getmangos.eu/wiki/referenceinfo/packetinfo/readme-r20101/</link><description><![CDATA[<p>
	This is the early attempt to publically document the packets used in <abbr title="Massive Network Game Object Server">MaNGOS</abbr><br>
	<br>
	<abbr title="Massive Network Game Object Server">MaNGOS</abbr> has existed for over 10 years and noone has ever attempted this before !!<br>
	- There is a ton of stuff missing..... and it's up to us to finish documenting it all
</p>
]]></description><guid isPermaLink="false">20101</guid><pubDate>Tue, 16 Jul 2019 22:47:43 +0000</pubDate></item></channel></rss>
