ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/shop.C
(Generate patch)

Comparing deliantra/server/server/shop.C (file contents):
Revision 1.67 by root, Mon Apr 27 01:38:49 2009 UTC vs.
Revision 1.68 by elmex, Thu Aug 20 18:12:13 2009 UTC

595 } 595 }
596 596
597 for (i = 0; i < NUM_COINS; i++) 597 for (i = 0; i < NUM_COINS; i++)
598 { 598 {
599 object &coin = *coin_objs[i]; 599 object &coin = *coin_objs[i];
600 sint64 num_coins = min ((to_pay + coin.value - 1) / coin.value, coin.nrof); 600 sint64 num_coins = min ((to_pay + coin.value - 1) / coin.value, (sint64) coin.nrof);
601 to_pay -= num_coins * coin.value; 601 to_pay -= num_coins * coin.value;
602 602
603 coin.nrof -= num_coins; 603 coin.nrof -= num_coins;
604 /* Now start making change. Start at the coin value 604 /* Now start making change. Start at the coin value
605 * below the one we just did, and work down to 605 * below the one we just did, and work down to

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines