Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.50 KB | None | 0 0
  1. [7:05:53 AM] Krill: hey Redacted
  2. [7:05:54 AM] Krill: /* struct:
  3. {CLIENT} Packet: (0x02A3) CMSG_LOOT_MASTER_GIVE PacketSize = 17
  4. |------------------------------------------------|----------------|
  5. |00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F |0123456789ABCDEF|
  6. |------------------------------------------------|----------------|
  7. |39 23 05 00 81 02 27 F0 01 7B FC 02 00 00 00 00 |9#....'..{......|
  8. |00 |. |
  9. -------------------------------------------------------------------
  10. uint64 creatureguid
  11. uint8 slotid
  12. uint64 target_playerguid
  13. */
  14. [7:06:32 AM] Redacted: how do you decipher this to obtain
  15.  
  16. [7:05 AM] Krill:
  17.  
  18. uint64 creatureguid
  19. uint8 slotid
  20. uint64 target_playerguid
  21. [7:07:19 AM] Krill: 39 23Guid
  22.  
  23. [7:05 AM] Krill:
  24.  
  25. <<< 05slotid
  26.  
  27. playerguid
  28. 81 02
  29. [7:07:20 AM] Krill: ?
  30. [7:07:52 AM] Krill: I need to figure a way to obtain such structures like this
  31. [7:11:22 AM] Redacted: read 8 bytes of data for the creature guid... so f027028100052339 - normally chopped down to 52339h
  32. read 1 byte for the slotid.... so 01
  33. read 8 byes of data for the target_playerguid... so 000000000002fc7b
  34.  
  35. the byte order is normally reversed as above
  36. [7:14:59 AM] Krill: alright I understand that now
  37. [7:15:11 AM] Krill: but what about if its a uint or int or 32 or 64
  38. [7:15:12 AM] Krill: ect
  39. [7:15:19 AM] Krill: and how would you know that's what they are
  40. [7:15:43 AM] Krill: like if it was creatureguid
  41. [7:16:09 AM] Redacted: there are strict rules about that... just google int vs uint
  42. [7:16:49 AM] Krill: alright
  43. [7:16:58 AM] Krill: what about knowing What the structure is
  44. [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
  45. [7:18:24 AM] Redacted: most emu's normally ignore the high bit
  46. [7:18:51 AM] Krill: difference and why?
  47. [7:19:29 AM] Redacted: the high bit is often just some flags to indicate the correct level to the client etc.
  48. [7:19:49 AM] Redacted: - which leads to a flaw EVERY emu currently has
  49. [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
  50. [7:21:05 AM] Redacted: when the mob is spawned, its normally ok.... in this example assume lvl 5
  51. [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
  52. [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
  53. [7:23:17 AM] Redated: - the solution involves storing the high bit of the guid AND sending it correctly to the client
  54. [7:23:38 AM] Redated: we are close to having that working in mangos :D
  55. [7:24:28 AM] Krill: Packet?
  56. [7:24:35 AM] Krill: or just simple guid difference
  57. [7:24:52 AM] Redacted: guid difference
  58. [7:25:26 AM] Redacted: but going back to your question as to how to work out the structure.....
  59. [7:25:28 AM] Redacted: uint64 creatureguid
  60. uint8 slotid
  61. uint64 target_playerguid
  62. [7:25:43 AM] Redacted: explains exactly what is needed
  63. [7:26:28 AM] Redacted: uint64 is 8 bytes
  64. uint8 is a single byte
  65. uint64 is 8 bytes
  66.  
  67. 8+1+8 = 17 which is the packet size
  68. [7:28:19 AM] Krill: Oh ok I understand now
  69. [7:28:20 AM] Krill: cool
  70. [7:28:44 AM] Redacted: once you get your head around it, it's fairly simple
  71. [7:28:45 AM] Krill: so you can get structures just by the packet sniff
  72. [7:28:53 AM] Krill: that's pretty cool
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement