Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.18 KB | None | 0 0
  1.  
  2.         private void OnMovement(PacketReader packet)
  3.         {
  4.             uint objectID = packet.Read<uint>();
  5.             byte hasDestination = packet.Read<byte>();
  6.             if (hasDestination == 1)
  7.             {
  8.                 ushort destinationSectors = packet.Read<ushort>();
  9.                 ushort xDestination = packet.Read<ushort>();
  10.                 float zDestination = packet.Read<float>();
  11.                 ushort yDestination = packet.Read<ushort>();
  12.  
  13.                 if (objectID == playerID)
  14.                 {
  15.                     Console.WriteLine("Player is moving to : " + xDestination + "|" + yDestination + "|" + zDestination);
  16.                 }
  17.             }
  18.             else
  19.             {
  20.                 byte unknown = packet.Read<byte>();
  21.                 ushort angle = packet.Read<ushort>();
  22.             }
  23.  
  24.             byte hasSource = packet.Read<byte>();
  25.             if (hasSource == 1)
  26.             {
  27.                 ushort sourceSectors = packet.Read<ushort>();
  28.                 ushort xSource = packet.Read<ushort>();
  29.                 float zSource = packet.Read<float>();
  30.                 ushort ySource = packet.Read<ushort>();
  31.             }
  32.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement