Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.32 KB | None | 0 0
  1. if (BitConverter.ToUInt32(generalData, 4) == client.Entity.UID)
  2. {
  3. Client.GameState pclient = null;
  4. if (ServerBase.Kernel.GamePool.TryGetValue(BitConverter.ToUInt32(generalData, 8), out pclient))
  5. {
  6. foreach (Network.GamePackets.ConquerItem item in pclient.Equipment.Objects)
  7. {
  8. if (item != null)
  9. {
  10. byte[] packet1 = new byte[92]
  11. {
  12. 0x54 ,0x00 ,0x54 ,0x04 ,0xAB ,0x20 ,0x78 ,0x1C ,0x9E ,0x98 ,0x1A ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 // ;T T« xž˜
  13. ,0x77 ,0x6D ,0x06 ,0x00 ,0x61 ,0x18 ,0xBB ,0x1B ,0x04 ,0x00 ,0x04 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 // ;wm a» 
  14. ,0x02 ,0x02 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x03 ,0x00 ,0x00 ,0x39 ,0x00 ,0x00 ,0x00 // ;  9
  15. ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x01 ,0x00 ,0x03 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 // ;  
  16. ,0x45 ,0x1E ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x02 ,0x37 ,0x0C ,0x00 // ;E 7
  17. ,0x00 ,0x00 ,0x00 ,0x00 ,0x54 ,0x51 ,0x53 ,0x65 ,0x72 ,0x76 ,0x65 ,0x72 // ; TQServer
  18.  
  19. };
  20. WriteUInt32(pclient.Entity.UID, 8, packet1);
  21. /*WriteUInt32(client.Entity.UID, 12, packet1);*/
  22. WriteUInt32(item.UID, 4, packet1);
  23. WriteUInt32(item.ID, 16, packet1);
  24. WriteUInt16(item.Durability, 20, packet1);
  25. WriteUInt16(item.MaximDurability, 22, packet1);
  26. WriteByte((byte)item.Position, 26, packet1);
  27. WriteByte((byte)item.SocketOne, 32, packet1);
  28. WriteByte((byte)item.SocketTwo, 33, packet1);
  29. WriteByte(item.Plus, 41, packet1);
  30. WriteByte(item.Bless, 42, packet1);
  31. WriteByte(item.Enchant, 44, packet1);
  32. WriteUInt32(item.PlusProgress, 60, packet1);
  33. WriteUInt32(item.Durability, 64, packet1);
  34. WriteUInt32(item.Purification_ID_, 76, packet1);
  35. client.Send(packet1);
  36. if (item.Purification_ID != 0)
  37. {
  38. if (item.Purification_Time == 0)
  39. {
  40. Network.GamePackets.PurificationItem purification = new Conquer_Online_Server.Network.GamePackets.PurificationItem();
  41. purification.ID_Purification_Item = item.Purification_ID;
  42. purification.Level = item.Purification_level;
  43. purification.Position = 1;
  44. purification.Time = 0;
  45. purification.tip = 6;
  46. purification.UID = item.UID;
  47. client.Send(purification.ToArry());
  48.  
  49. }
  50. else if ((long)item.Purification_Time > DateTime.Now.Ticks)
  51. {
  52. Network.GamePackets.PurificationItem purification = new Conquer_Online_Server.Network.GamePackets.PurificationItem();
  53. purification.ID_Purification_Item = item.Purification_ID;
  54. purification.Level = item.Purification_level;
  55. purification.Position = 1;
  56.  
  57. string time = ((long)item.Purification_Time - DateTime.Now.Ticks).ToString();
  58. purification.Time =
  59. uint.Parse(pclient.FixedTime(long.Parse(time)));
  60. purification.tip = 6;
  61. purification.UID = item.UID;
  62. client.Send(purification.ToArry());
  63.  
  64. }
  65. }
  66. }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement