Jump to content

Difference between GetObjectGuid and GetPackGUID


terrorio

Recommended Posts

Object GUID is always 64 bits.

Packed GUID is 8 to 72 bits.

Packed GUID consists of:

[8 bits (mask)] + [8*n bits (data) (n = 'on' bit count in mask)]

Packed GUID is used to reduce GUID size for less data usage over network.

Take bit from mask, if it's 0 put 0x00 in your GUID, if it's 1 put next two bytes of data and put in your guid.

Example of packed GUID vs GUID:

GUID= 0x0000000012345678 (player guid, because high part is 0x0000)

Packed GUID:

-mask (binary): 00001111 (0x0F)

-data: 0x12345678

-together: 0x0F12345678

GUID= 0x0012003400560078

Packed GUID:

-mask (binary): 01010101 (0x55)

-data: 0x12345678

-together: 0x5512345678

Link to comment
Share on other sites

you _must_ use the guid format that is expected to be sent by the client.

If you chose the wrong one, the client will either crash (most likely) or produce total crap..

Edit: To be clear: This is a choice that was made by blizzard developers, and if you want to talk to the client, you must use the 'language' the client understands. This is nothing where you can chose.

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use