Winamax: Fix tournament buyin and rake info

This commit is contained in:
Worros 2011-02-11 00:02:45 +08:00
parent ee5d2feba2
commit 4605b371f1

View File

@ -276,8 +276,15 @@ class Winamax(HandHistoryConverter):
hand.isKO = False hand.isKO = False
info['BIRAKE'] = info['BIRAKE'].strip(u'$€') info['BIRAKE'] = info['BIRAKE'].strip(u'$€')
hand.buyin = int(100*Decimal(info['BIAMT'])) rake_factor = 1
hand.fee = int(100*Decimal(info['BIRAKE'])) bi_factor = 1
if info['BIAMT'].find(".") == -1:
bi_factor = 100
if info['BIRAKE'].find(".") == -1:
rake_factor = 100
hand.buyin = bi_factor*info['BIAMT']
hand.fee = rake_factor*info['BIRAKE']
else: else:
hand.buyin = int(Decimal(info['BIAMT'])) hand.buyin = int(Decimal(info['BIAMT']))
hand.fee = 0 hand.fee = 0