Guest User

Untitled

a guest
Jun 23rd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. this.getTotWinWithCurRank = function(b) {
  2. var c = 0,
  3. d = [];
  4.  
  5. console.info("Win with Rank");
  6. console.info(a)
  7. console.info(b)
  8.  
  9.  
  10. if (0 < a[b[0]].place_1) {
  11. var f = a[b[0]].place_1 * s_oGameSettings.getOddWin(b[0]);
  12. f = parseFloat(f.toFixed(2));
  13. c += f;
  14. d.push({
  15. win: f,
  16. horses: b[0],
  17. bet: a[b[0]].place_1,
  18. type: "win"
  19. })
  20. }
  21. 0 < a[b[0]].place_2 && (f = a[b[0]].place_2 * s_oGameSettings.getOddPlace(b[0]), f = parseFloat(f.toFixed(2)), c += f, d.push({
  22. win: f,
  23. horses: b[0],
  24. bet: a[b[0]].place_2,
  25. type: "place"
  26. }));
  27. 0 < a[b[1]].place_2 && (f = a[b[1]].place_2 * s_oGameSettings.getOddPlace(b[1]), f = parseFloat(f.toFixed(2)), c += f, d.push({
  28. win: f,
  29. horses: b[1],
  30. bet: a[b[1]].place_2,
  31. type: "place"
  32. }));
  33. 0 < a[b[0]].place_3 && (f = a[b[0]].place_3 * parseFloat(s_oGameSettings.getOddShow(b[0])), f = parseFloat(f.toFixed(2)), c += f, d.push({
  34. win: f,
  35. horses: b[0],
  36. bet: a[b[0]].place_3,
  37. type: "show"
  38. }));
  39. 0 < a[b[1]].place_3 && (f = a[b[1]].place_3 * s_oGameSettings.getOddShow(b[1]), f = parseFloat(f.toFixed(2)), c += f, d.push({
  40. win: f,
  41. horses: b[1],
  42. bet: a[b[1]].place_3,
  43. type: "show"
  44. }));
  45. 0 < a[b[2]].place_3 && (f = a[b[2]].place_3 * s_oGameSettings.getOddShow(b[2]), f = parseFloat(f.toFixed(2)), c += f, d.push({
  46. win: f,
  47. horses: b[2],
  48. bet: a[b[2]].place_3,
  49. type: "show"
  50. }));
  51. 0 < e[b[0]][b[1]] && (f = e[b[0]][b[1]] * s_oGameSettings.getForecastOdd(b[0], b[1]), f = parseFloat(f.toFixed(2)), c += f, d.push({
  52. win: f,
  53. horses: [b[0], b[1]],
  54. bet: e[b[0]][b[1]],
  55. type: "forecast"
  56. }));
  57. return {
  58. tot_win: c,
  59. win_list: d
  60. }
  61. };
Add Comment
Please, Sign In to add comment