Thread Tools Display Modes
05-04-13, 11:21 AM   #1
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Player Unit Type (8) in GUID

The Wowpedia GUID page says that the Unit Type for players (usually) is 0
A GUID can be thought of as being composed of multiple pieces of data.

Consider "0xAABCCCCCDDEEEEEE", where:
B
unit type, mask with 0x7 to get: 0 for players, 1 for world objects, 3 for NPCs, 4 for permanent pets, 5 for vehicles.

But I saw players with 8 as the Unit Type, as early as WotLK/Cata
Code:
UnitGUID("target"), UnitName("target") => "0x03800000041D7D08", "Starky", "Haomarush"
UnitGUID("target"), UnitName("target") => "0x020000000536B807", "Kumax", "Stormscale"
It also seems it's not directly related to cross realm players .. both of the players above were from a different realm than mine
  • What does the 8 stand for, and what makes them different from other players?

  • And if those players would /dump their own UnitGUID would they see the same value, or a different one?
    I tested on my own characters and they all have 0 as the Unit Type
  Reply With Quote
05-04-13, 01:05 PM   #2
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
It appears to have something to do with the realm or battlegroup, possibly to double the available player GUIDs.

I checked a few different servers and my characters and everyone around me started with the same 3 numbers.
  • Wyrmrest Accord: 068
  • Emerald Dream: 048
  • Magtheridon: 020
  • Dentarg: 050
  • Kel'Thuzad: 058
  Reply With Quote
05-04-13, 03:50 PM   #3
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Dont forget the AND

Example: Decomposing a GUID

We have a GUID: "0xF5304D2B00008852".

First of all, let's find out what kind of unit it is. Take the third digit in the GUID, i.e. "3" (or 0x3 to show it's an hex value) and apply an AND mask of 0x7 (equivalent to getting the remainder of division by 8) to get 0x3. This GUID is for a normal NPC, neither a pet nor a player.
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
05-05-13, 07:37 AM   #4
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
I was too lazy to do the bitwise AND .. I feel stupid now

Didn't know on some servers they already are out of (half?) of their guids

But thanks for the answers

Last edited by Ketho : 05-05-13 at 07:52 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Player Unit Type (8) in GUID


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off