Esempio n. 1
0
 def get_field_value(self, entry, field):
     value = getattr(entry, field)
     if field in self.ItemIds:
         return get_t9n_item(self.model, "t9n_item", value)
     if field == "equip_type":
         return EquipType(value).name
     return value
Esempio n. 2
0
 def get_field_value(self, entry, field):
     value = getattr(entry, field)
     if field == "augment_type":
         return WeaponAugment(value).name
     if field == "item_id":
         return get_t9n_item(self.model, "t9n_item", value)
     return value
Esempio n. 3
0
 def get_field_value(self, entry, field):
     value = getattr(entry, field)
     if field in self.ItemIds:
         return get_t9n_item(self.model, "t9n_item", value)
     equip_type = self.model.get_attr("equip_type")
     if field == "equip_type" and equip_type:
         return equip_type(value).name
     return value
Esempio n. 4
0
 def get_field_value(self, entry, field):
     if field == "name":
         return get_t9n_item(self.model, "t9n_item", entry.id)
     if field == "skill1_name":
         return get_t9n_skill(self.model, "t9n_skill_pt", entry.skill1_id)
     if field == "skill2_name":
         return get_t9n_skill(self.model, "t9n_skill_pt", entry.skill2_id)
     return getattr(entry, field)
Esempio n. 5
0
 def __init__(self, model, entry):
     self.model = model
     self.entry = entry
     self.description = get_t9n(self.model, "t9n", self.entry.id * 2 + 1)
     self.name = get_t9n_item(self.model, "t9n", self.entry.id)
Esempio n. 6
0
 def get_field_value(self, entry, field):
     if field == "item1_id":
         return get_t9n_item(self.model, "t9n_item", entry.item1_id)
     if field == "item2_id":
         return get_t9n_item(self.model, "t9n_item", entry.item2_id)
     return getattr(entry, field)
Esempio n. 7
0
 def get_field_value(self, entry, field):
     value = getattr(entry, field)
     if field in self.ItemIds:
         return get_t9n_item(self.model, "t9n_item", value)
     return value