From 4072a99b40a2782092af9efabefa8f6f79d621a9 Mon Sep 17 00:00:00 2001 From: raylu Date: Fri, 25 Oct 2013 00:47:06 -0700 Subject: fix BPC costs --- update_costs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'update_costs.py') 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() -- cgit v1.2.3