XConquer

Untitled

Jul 1st, 2015
305
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace CM.Arg.Network.GamePackets // donde dice CM.Arg lo cambian al Nombre de su Proyecto!
  4. {
  5.     public class ItemUsage : Writer, Interfaces.IPacket
  6.     {
  7.         public const byte
  8. BuyFromNPC = 1,
  9. SellToNPC = 2,
  10. RemoveInventory = 3,
  11. EquipItem = 4,
  12. UnequipItem = 6,
  13. ArrowReload = 8,
  14. ViewWarehouse = 9,
  15. WarehouseDeposit = 10,
  16. WarehouseWithdraw = 11,
  17. Repair = 14,
  18. VIPRepair = 15,
  19. DragonBallUpgrade = 19,
  20. MeteorUpgrade = 20,
  21. ShowBoothItems = 21,
  22. AddItemOnBoothForSilvers = 22,
  23. RemoveItemFromBooth = 23,
  24. BuyFromBooth = 24,
  25. UpdateDurability = 25,
  26. FireWorks = 26,
  27. AddItemOnBoothForConquerPoints = 29,
  28. Ping = 27,
  29. Enchant = 28,
  30. RedeemGear = 32,
  31. ClaimGear = 33,
  32. Unknown = 34,
  33. SocketTalismanWithItem = 35,
  34. SocketTalismanWithCPs = 36,
  35. DropItem = 37,
  36. DropMoney = 38,
  37. GemCompose = 39,
  38. ItemSell = 55,
  39. Bless = 40,
  40. Accessories = 41,
  41. MainEquipment = 44,
  42. AlternateEquipment = 45,
  43. ItemsReturned = 50,
  44. ToristSuper = 51,
  45. ChatItem = 52,
  46. ObtinedPoints = 53,
  47. LowerEquipment = 54,
  48. SocketerMan = 43,
  49. MergeStackableItems = 48,
  50. SplitStack = 49;
  51.  
  52.         private byte[] Buffer;
  53.  
  54.         public ItemUsage(bool Create)
  55.         {
  56.             if (Create)
  57.             {
  58.                 Buffer = new byte[112];
  59.                 WriteUInt16(104, 0, Buffer);
  60.                 WriteUInt16(1009, 2, Buffer);
  61.                 WriteUInt32((uint)Time32.timeGetTime().GetHashCode(), 4, Buffer);
  62.             }
  63.         }
  64.  
  65.         public uint UID
  66.         {
  67.             get { return BitConverter.ToUInt32(Buffer, 8); }
  68.             set { WriteUInt32(value, 8, Buffer); }
  69.         }
  70.  
  71.         public uint dwParam
  72.         {
  73.             get { return BitConverter.ToUInt32(Buffer, 12); }
  74.             set { WriteUInt32(value, 12, Buffer); }
  75.         }
  76.  
  77.         public uint dwParam2
  78.         {
  79.             get { return BitConverter.ToUInt32(Buffer, 87); }
  80.             set { WriteUInt32(value, 87, Buffer); }
  81.         }
  82.  
  83.         public byte ID
  84.         {
  85.             get
  86.             {
  87.                 return Buffer[20];
  88.             }
  89.             set
  90.             {
  91.                 Buffer[20] = value;
  92.             }
  93.         }
  94.  
  95.         public uint TimeStamp
  96.         {
  97.             get { return BitConverter.ToUInt32(Buffer, 22); }
  98.             set { WriteUInt32(value, 22, Buffer); }
  99.         }
  100.  
  101.         public uint dwExtraInfo
  102.         {
  103.             get { return BitConverter.ToUInt32(Buffer, 26); }
  104.             set { WriteUInt32(value, 26, Buffer); }
  105.         }
  106.  
  107.         public uint dwExtraInfo2
  108.         {
  109.             get { return BitConverter.ToUInt32(Buffer, 30); }
  110.             set { WriteUInt32(value, 30, Buffer); }
  111.         }
  112.  
  113.         public uint dwExtraInfo3
  114.         {
  115.             get { return BitConverter.ToUInt32(Buffer, 34); }
  116.             set { WriteUInt32(value, 34, Buffer); }
  117.         }
  118.  
  119.  
  120.         public byte[] ToArray()
  121.         {
  122.             return Buffer;
  123.         }
  124.  
  125.         public void Deserialize(byte[] buffer)
  126.         {
  127.             Buffer = buffer;
  128.         }
  129.  
  130.         public void Send(Client.GameState client)
  131.         {
  132.             client.Send(Buffer);
  133.         }
  134.     }
  135. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×