add static generator for item rewards txts

This commit is contained in:
Bryce Allen
2015-03-28 12:36:37 -05:00
parent 3145f1415a
commit 7a3d7cc9b8
3 changed files with 75 additions and 1 deletions

View File

@@ -68,7 +68,7 @@ class MHDB(object):
def get_item_names(self):
v = self._get_memoized("item_names", """
SELECT name FROM items
SELECT _id, name FROM items
WHERE type IN ('Bone', 'Flesh', 'Sac/Fluid')
""")
return v

View File

@@ -168,6 +168,11 @@ class HuntReward(object):
self.percentage = reward["percentage"]
self.item_id = reward["item_id"]
if not self.percentage:
# TODO: this is an error in the db, print warning in higher
# level code
self.percentage = 0
self.cap = False
self.kill = False
self.shiny = False