Guest User

Untitled

a guest
Jun 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. public int Cooldown(string type)
  2. {
  3. uint inttype = 0;
  4. switch (type)
  5. {
  6. case "attack":
  7. inttype = 1;
  8. break;
  9. case "healing":
  10. inttype = 2;
  11. break;
  12. case "support":
  13. inttype = 3;
  14. break;
  15. case "special":
  16. inttype = 4;
  17. break;
  18. default:
  19. inttype = 0;
  20. break;
  21.  
  22. }
  23. uint End_Node = this.Memory.ReadUInt32(Addresses.Cooldown.GroupCD);
  24. uint Next_Node = this.Memory.ReadUInt32(End_Node);
  25. uint runningtime = Util.WinApi.GetTime() - this.Memory.ReadUInt32(Addresses.Cooldown.clientTime);
  26. while (Next_Node != End_Node)
  27. {
  28. uint Spell_ID = this.Memory.ReadUInt32(Next_Node + 8);
  29. uint Cooldown_Start = this.Memory.ReadUInt32(Next_Node + 12);
  30. uint Cooldown_End = this.Memory.ReadUInt32(Next_Node + 16);
  31. uint time = (Cooldown_End - runningtime);
  32. if (time > 0 & time < 600000 & Spell_ID == inttype)
  33. {
  34. return (int)time;
  35. }
  36. Next_Node = this.Memory.ReadUInt32(Next_Node);
  37. }
  38. return 0;
  39. }
Add Comment
Please, Sign In to add comment