Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. using DragonMose.Networking.Data.Packet;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace DragonMose.Protocol.Internal.Maps
  9. {
  10. public class NC_MAP_ZONE : NC_STRUCTURE
  11. {
  12. public byte ZoneId;
  13.  
  14. public ushort MapId;
  15.  
  16. public ushort InstanceId;
  17.  
  18. public NC_MAP_ZONE()
  19. {
  20. }
  21.  
  22. public NC_MAP_ZONE(byte ZoneId, ushort MapId, ushort InstanceId)
  23. {
  24. this.MapId = MapId;
  25. this.InstanceId = InstanceId;
  26. this.ZoneId = ZoneId;
  27. }
  28.  
  29. public static bool Read(PacketReader Reader, out NC_MAP_ZONE Map)
  30. {
  31. Map = new NC_MAP_ZONE();
  32.  
  33. return Map.Read(Reader);
  34. }
  35.  
  36. public bool Read(PacketReader Reader)
  37. {
  38. if (!Reader.Read(out ZoneId) ||
  39. !Reader.Read(out MapId) ||
  40. !Reader.Read(out InstanceId))
  41. {
  42. return false;
  43. }
  44.  
  45. return true;
  46. }
  47.  
  48. public void Write(PacketWriter Writer)
  49. {
  50. Writer.Write(ZoneId);
  51. Writer.Write(MapId);
  52. Writer.Write(InstanceId);
  53. }
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement