View previous topic :: View next topic |
Author |
Message |
Vanoi Site Admin

Joined: 25 Aug 2005 Posts: 1403 Location: Avoiding You (The Void)
|
Posted: Tue Mar 12, 2013 12:28 pm Post subject: #81 - [Urgent] Dominus Payout Fix (Added) |
|
|
https://sourceforge.net/p/dropshock/tickets/81/
5 votes, approved.
Code: | if($pay->count<=4) {$payOutFp=7*$pay->count;} elseif($pay->count<=8) {$payOutFp=6*$pay->count;} elseif ($pay->count<=12) {$payOutFp=5*$pay->count;} elseif($pay->count<=16) {$payOutFp=4*$pay->count;} elseif($pay->count<=20) {$payOutFp=3*$pay->count;} elseif($pay->count<=24) {$payOutFp=2*$pay->count;} |
Code: | $sql = "UPDATE factions SET i_factionpoints = (i_factionpoints + ".($pay->count * $nodePayout * $payOutFp)."), i_factionpoints_spend = (i_factionpoints_spend + ".($pay->count * $nodePayout * $payOutFp).") WHERE id=? ";
$res =& $db->query($sql, Array($faction_owner) );
if (DB::isError($res)) { ReportDBError($res); } |
If we examine these 2 codes you'll see that pay->count has been considered twice... so therefore the payout is actually exponentially higher than it's supposed to be... Nice to know that for a month it goes unreported by Ressurrected.
Proposed change:
Code: | if($pay->count<=4) {$payOutFp=7;} elseif($pay->count<=8) {$payOutFp=6;} elseif ($pay->count<=12) {$payOutFp=5;} elseif($pay->count<=16) {$payOutFp=4;} elseif($pay->count<=20) {$payOutFp=3;} elseif($pay->count<=24) {$payOutFp=2;} |
Will commit and push when I get home. _________________ The person who will go to great lengths to fight boredom...

Last edited by Vanoi on Tue Mar 12, 2013 6:09 pm; edited 3 times in total |
|
Back to top |
|
 |
Slayer_666 Council Member
Joined: 20 Dec 2012 Posts: 226
|
Posted: Tue Mar 12, 2013 12:46 pm Post subject: |
|
|
Disgusting, they should be deducted.
Support
Slayer |
|
Back to top |
|
 |
krisjaniz Mentor
Joined: 17 May 2009 Posts: 471
|
Posted: Tue Mar 12, 2013 1:18 pm Post subject: |
|
|
AYE, also an important bug fix! _________________
 |
|
Back to top |
|
 |
Walterohdim Site Admin

Joined: 15 Jun 2006 Posts: 1629 Location: Somewhere with lots of doors
|
Posted: Tue Mar 12, 2013 1:23 pm Post subject: |
|
|
I reported this as soon as soon as we started getting crazy payouts.
Walterohdim _________________ Wannabee historian of Tinywarz. Through the building of myth we will build community. M. Scott Peck
 |
|
Back to top |
|
 |
Vanoi Site Admin

Joined: 25 Aug 2005 Posts: 1403 Location: Avoiding You (The Void)
|
Posted: Tue Mar 12, 2013 1:26 pm Post subject: |
|
|
With the nodelimit now fixed it's 1k~ FP every 600 turns... but without the nodelimit it would be 5k~ FP every 600 turns.
I confronted a random Ress (Lycurgus) about the values of their Dominus payout and he went into a defensive/denial state about it.
I second the notion of them having their FP reduced. _________________ The person who will go to great lengths to fight boredom...

Last edited by Vanoi on Tue Mar 12, 2013 2:29 pm; edited 2 times in total |
|
Back to top |
|
 |
Dark Leth Council Member
Joined: 05 Jul 2005 Posts: 1498
|
Posted: Tue Mar 12, 2013 2:22 pm Post subject: |
|
|
Aye on the change. |
|
Back to top |
|
 |
|