diff options
author | raylu <raylu@gridium.com> | 2013-10-25 00:47:06 -0700 |
---|---|---|
committer | raylu <raylu@gridium.com> | 2013-10-25 00:47:06 -0700 |
commit | 4072a99b40a2782092af9efabefa8f6f79d621a9 (patch) | |
tree | 36c875f4c75e411a51ef36968e1773611a88ceca /update_costs.py | |
parent | 4fb8abde07e94889ba1acfc86e0b36319c136b97 (diff) | |
download | ykill-4072a99b40a2782092af9efabefa8f6f79d621a9.tar.xz |
fix BPC costs
Diffstat (limited to 'update_costs.py')
-rwxr-xr-x | update_costs.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/update_costs.py b/update_costs.py index b2ab85f..088fb45 100755 --- a/update_costs.py +++ b/update_costs.py @@ -49,8 +49,11 @@ def update_kill(kill_id): c.nextset() else: cost = 0 + # singleton is 0 normally and for BPOs and 2 for BPCs + # we want to divide by 1 for BPOs and by 1000 for BPCs c.execute(''' - SELECT SUM(cost * (dropped + destroyed)) FROM items AS i + SELECT SUM(cost * (dropped + destroyed) / (singleton * 499.5 + 1)) + FROM items AS i JOIN item_costs AS ic ON i.type_id = ic.type_id WHERE kill_id = ? ''', (kill_id,)) r = c.fetchone() |