Exemplo n.º 1
0
 def getSlotAttr(self):
     """获取插槽中宝石属性加成"""
     attr = {}
     if self.slot_1:
         attr = gs.addDict(eval(dbItems.ALL_GEMINFO[self.slot_1]["effect"]), attr)
     if self.slot_2:
         attr = gs.addDict(eval(dbItems.ALL_GEMINFO[self.slot_2]["effect"]), attr)
     if self.slot_3:
         attr = gs.addDict(eval(dbItems.ALL_GEMINFO[self.slot_3]["effect"]), attr)
     if self.slot_4:
         attr = gs.addDict(eval(dbItems.ALL_GEMINFO[self.slot_4]["effect"]), attr)
     return attr
Exemplo n.º 2
0
 def getSlotAttr(self):
     '''获取插槽中宝石属性加成'''
     attr = {}
     if self.slot_1:
         attr = gs.addDict(eval(dbItems.ALL_GEMINFO[self.slot_1]['effect']),attr)
     if self.slot_2:
         attr = gs.addDict(eval(dbItems.ALL_GEMINFO[self.slot_2]['effect']),attr)
     if self.slot_3:
         attr = gs.addDict(eval(dbItems.ALL_GEMINFO[self.slot_3]['effect']),attr)
     if self.slot_4:
         attr = gs.addDict(eval(dbItems.ALL_GEMINFO[self.slot_4]['effect']),attr)
     return attr
 def getAllFateAttr(self):
     '''获取所有的命格属性
     '''
     attrs = {}
     for fateId in self.equiped.values():
         fate = self.fates.get(fateId)   
         if not fate:
             continue
         info = fate.getFateAttr()
         attrs = addDict(attrs, info)
     return attrs
 def getAllFateAttr(self):
     '''获取所有的命格属性
     '''
     attrs = {}
     for fateId in self.equiped.values():
         fate = self.fates.get(fateId)
         if not fate:
             continue
         info = fate.getFateAttr()
         attrs = addDict(attrs, info)
     return attrs
 def getAllFateAttr(self):
     '''获取所有的命格属性
     '''
     from app.scense.core.PlayersManager import PlayersManager
     attrs = {}
     palyer = PlayersManager().getPlayerByID(self._owner._owner)
     if not palyer:
         return attrs
     for fateId in self._owner.fate.values():
         fate = palyer.fate.fates.get(fateId)
         info = fate.getFateAttr()
         attrs = addDict(attrs, info)
     return attrs
 def getAllFateAttr(self):
     '''获取所有的命格属性
     '''
     from app.scense.core.PlayersManager import PlayersManager
     attrs = {}
     palyer = PlayersManager().getPlayerByID(self._owner._owner)
     if not palyer:
         return attrs
     for fateId in self._owner.fate.values():
         fate = palyer.fate.fates.get(fateId)
         info = fate.getFateAttr()
         attrs = addDict(attrs, info)
     return attrs