Advertisement
Guest User

Untitled

a guest
Sep 13th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. import Dispatcher from './Dispatcher';
  2. import HaapiConnection from './HaapiConnection';
  3. import Network from './Network';
  4. import movement from './movement';
  5. import DTConstants from './DTConstants';
  6.  
  7. export default class data {
  8. public haapi: HaapiConnection;
  9. public network: Network;
  10. public dis: Dispatcher;
  11.  
  12. public Movement = new movement();
  13.  
  14. public key: number[];
  15. public salt: string;
  16. public ticket: string;
  17. public login: string;
  18.  
  19. public username: string;
  20. public password: string;
  21.  
  22.  
  23. public sequence = 0;
  24. public subscriber = false;
  25. public createdCamp = false;
  26. public characterId = 0;
  27. public currentCell = 0;
  28. public serverId = 403
  29. public mapId = 0;
  30. public createNew = false; // si il est a false on en créé pas
  31. public blackList = [];
  32.  
  33. public tutoGroupe = -4618;
  34. public tutoInventory = [];
  35.  
  36. public itemId = 0;
  37. public canScrap = true;
  38. public canScrap2 = true;
  39. public allId = {};
  40. public weCanBuy = true;
  41. public alreadyHDV = true;
  42. public inventoryHDV = {};
  43. public crafted = false;
  44. public idCraft = 100
  45. public alreadyOnMap = false
  46.  
  47. public async init(username, password, serverId) {
  48.  
  49. this.haapi = new HaapiConnection();
  50. this.username = username;
  51. this.password = password;
  52. this.serverId = serverId;
  53.  
  54.  
  55. await this.haapi.processHaapi(username, password, serverId);
  56.  
  57. this.dis = new Dispatcher();
  58.  
  59. this.network = new Network(this.dis);
  60. this.network.connect(DTConstants.config.sessionId, DTConstants.config.dataUrl);
  61. }
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement