Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(raceType == 4){
- switch (place) {
- case 1 :
- params['records'] = {'first/+': 1, 'starts/+': 1};
- break;
- case 2 :
- params['records'] = {'second/+': 1, 'starts/+': 1};
- break;
- case 3 :
- params['records'] = {'third/+': 1, 'starts/+': 1};
- break;
- default:
- params['records'] = {'starts/+': 1};
- }
- params['challenge_race'] = true;
- params['money'] = 0;
- params['challenge_id'] = challengeId;
- params['place'] = place;
- params['allocated_xp'] = allocatedXP;
- }else{
- switch (place) {
- case 1 :
- economy['gainedCoins'] = economy['first'];
- earnings = (economy['gainedCoins'] - economy['entryFee'] > 0) ? economy['gainedCoins'] - economy['entryFee'] : 0;
- params['records'] = {'first/+': 1, 'starts/+': 1, 'career_earnings/+': earnings};
- break;
- case 2 :
- economy['gainedCoins'] = economy['second'];
- earnings = (economy['gainedCoins'] - economy['entryFee'] > 0) ? economy['gainedCoins'] - economy['entryFee'] : 0;
- params['records'] = {'second/+': 1, 'starts/+': 1, 'career_earnings/+': earnings};
- break;
- case 3 :
- economy['gainedCoins'] = economy['third'];
- earnings = (economy['gainedCoins'] - economy['entryFee'] > 0) ? economy['gainedCoins'] - economy['entryFee'] : 0;
- params['records'] = {'third/+': 1, 'starts/+': 1, 'career_earnings/+': earnings};
- break;
- default:
- economy['gainedCoins'] = 0;
- params['records'] = {'starts/+': 1};
- }
- params['xp'] = economy['rewardXP'];
- params['money'] = economy['gainedCoins'] - economy['entryFee'];
- params['allocated_xp'] = allocatedXP;
- params['energy'] = economy['requiredEnergy'];
- params['challenge_race'] = false;
- }
Add Comment
Please, Sign In to add comment