Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.getTotWinWithCurRank = function(b) {
- var c = 0,
- d = [];
- console.info("Win with Rank");
- console.info(a)
- console.info(b)
- if (0 < a[b[0]].place_1) {
- var f = a[b[0]].place_1 * s_oGameSettings.getOddWin(b[0]);
- f = parseFloat(f.toFixed(2));
- c += f;
- d.push({
- win: f,
- horses: b[0],
- bet: a[b[0]].place_1,
- type: "win"
- })
- }
- 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({
- win: f,
- horses: b[0],
- bet: a[b[0]].place_2,
- type: "place"
- }));
- 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({
- win: f,
- horses: b[1],
- bet: a[b[1]].place_2,
- type: "place"
- }));
- 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({
- win: f,
- horses: b[0],
- bet: a[b[0]].place_3,
- type: "show"
- }));
- 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({
- win: f,
- horses: b[1],
- bet: a[b[1]].place_3,
- type: "show"
- }));
- 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({
- win: f,
- horses: b[2],
- bet: a[b[2]].place_3,
- type: "show"
- }));
- 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({
- win: f,
- horses: [b[0], b[1]],
- bet: e[b[0]][b[1]],
- type: "forecast"
- }));
- return {
- tot_win: c,
- win_list: d
- }
- };
Add Comment
Please, Sign In to add comment