From 4072a99b40a2782092af9efabefa8f6f79d621a9 Mon Sep 17 00:00:00 2001 From: raylu Date: Fri, 25 Oct 2013 00:47:06 -0700 Subject: fix BPC costs --- db/queries.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'db/queries.py') diff --git a/db/queries.py b/db/queries.py index b998132..435f4dc 100644 --- a/db/queries.py +++ b/db/queries.py @@ -112,13 +112,15 @@ def kill(kill_id): except db.NoRowsException: victim['ship_cost'] = 0 + # see update_costs for an explanation of the ORDER BY item_rows = db.query(c, ''' SELECT items.type_id, flag, dropped, destroyed, singleton, cost, typeName AS item_name, capacity FROM items JOIN item_costs ON item_costs.type_id = items.type_id JOIN eve.invTypes ON items.type_id = typeID - WHERE kill_id = ? ORDER BY flag ASC + WHERE kill_id = ? + ORDER BY (cost * (dropped + destroyed) / (singleton * 499.5 + 1)) DESC ''', kill_id) items = defaultdict(list) for item in item_rows: -- cgit v1.2.3