Add support for explicitly converting items to another.

This commit is contained in:
blitzmann
2014-05-20 12:41:57 -04:00
parent 3bd66f174d
commit 0bf956e9b3
3 changed files with 40 additions and 27 deletions

View File

@@ -23,6 +23,7 @@ from sqlalchemy.sql import and_, or_, select, func
from sqlalchemy.orm import join, exc
from eos.types import Item, Category, Group, MarketGroup, AttributeInfo, MetaData, MetaGroup
from eos.db.util import processEager, processWhere
from eos.itemMapping import itemMapping
import eos.config
configVal = getattr(eos.config, "gamedataCache", None)
@@ -86,6 +87,8 @@ def getItem(lookfor, eager=None):
itemNameMap[lookfor] = item.ID
else:
raise TypeError("Need integer or string as argument")
if item.name in itemMapping:
item = getItem(itemMapping[item.name], eager)
return item
groupNameMap = {}