Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [7:05:53 AM] Krill: hey Redacted
- [7:05:54 AM] Krill: /* struct:
- {CLIENT} Packet: (0x02A3) CMSG_LOOT_MASTER_GIVE PacketSize = 17
- |------------------------------------------------|----------------|
- |00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F |0123456789ABCDEF|
- |------------------------------------------------|----------------|
- |39 23 05 00 81 02 27 F0 01 7B FC 02 00 00 00 00 |9#....'..{......|
- |00 |. |
- -------------------------------------------------------------------
- uint64 creatureguid
- uint8 slotid
- uint64 target_playerguid
- */
- [7:06:32 AM] Redacted: how do you decipher this to obtain
- [7:05 AM] Krill:
- uint64 creatureguid
- uint8 slotid
- uint64 target_playerguid
- [7:07:19 AM] Krill: 39 23Guid
- [7:05 AM] Krill:
- <<< 05slotid
- playerguid
- 81 02
- [7:07:20 AM] Krill: ?
- [7:07:52 AM] Krill: I need to figure a way to obtain such structures like this
- [7:11:22 AM] Redacted: read 8 bytes of data for the creature guid... so f027028100052339 - normally chopped down to 52339h
- read 1 byte for the slotid.... so 01
- read 8 byes of data for the target_playerguid... so 000000000002fc7b
- the byte order is normally reversed as above
- [7:14:59 AM] Krill: alright I understand that now
- [7:15:11 AM] Krill: but what about if its a uint or int or 32 or 64
- [7:15:12 AM] Krill: ect
- [7:15:19 AM] Krill: and how would you know that's what they are
- [7:15:43 AM] Krill: like if it was creatureguid
- [7:16:09 AM] Redacted: there are strict rules about that... just google int vs uint
- [7:16:49 AM] Krill: alright
- [7:16:58 AM] Krill: what about knowing What the structure is
- [7:18:07 AM] Redacted: my understanding of this is a bit ropey.... but the guid is normally composed of two parts.... a high guid and a low guid
- [7:18:24 AM] Redacted: most emu's normally ignore the high bit
- [7:18:51 AM] Krill: difference and why?
- [7:19:29 AM] Redacted: the high bit is often just some flags to indicate the correct level to the client etc.
- [7:19:49 AM] Redacted: - which leads to a flaw EVERY emu currently has
- [7:20:29 AM] Redacted: the emu's normally randomly select a level for a mob from a range of values ... ie. level 5-7
- [7:21:05 AM] Redacted: when the mob is spawned, its normally ok.... in this example assume lvl 5
- [7:21:54 AM] Redacted: when the creature is killed and it's time for it to respawn, if the lvl is anything other than 5, you will see the levelling animation on the mob
- [7:22:43 AM] Redacted: because the client 'remembers' the original level and when it's respawned the client detects that it's levelled up
- [7:23:17 AM] Redated: - the solution involves storing the high bit of the guid AND sending it correctly to the client
- [7:23:38 AM] Redated: we are close to having that working in mangos :D
- [7:24:28 AM] Krill: Packet?
- [7:24:35 AM] Krill: or just simple guid difference
- [7:24:52 AM] Redacted: guid difference
- [7:25:26 AM] Redacted: but going back to your question as to how to work out the structure.....
- [7:25:28 AM] Redacted: uint64 creatureguid
- uint8 slotid
- uint64 target_playerguid
- [7:25:43 AM] Redacted: explains exactly what is needed
- [7:26:28 AM] Redacted: uint64 is 8 bytes
- uint8 is a single byte
- uint64 is 8 bytes
- 8+1+8 = 17 which is the packet size
- [7:28:19 AM] Krill: Oh ok I understand now
- [7:28:20 AM] Krill: cool
- [7:28:44 AM] Redacted: once you get your head around it, it's fairly simple
- [7:28:45 AM] Krill: so you can get structures just by the packet sniff
- [7:28:53 AM] Krill: that's pretty cool
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement