Esempio n. 1
0
 def UpdateAll(self,*args):
     """
     Refreshes all character information from self.char.
     A bit drastic of a modification unless loading a new character.
     Rebuilds self.statStore and self.skillStore.
     Rebuilds table of resistances.
     """
     self.Block()
     self.statStore = TMH.StatListStore(self.char)
     self.statView.set_model(self.statStore)
     self.skillStore = TMH.SkillTreeStore(self.char)
     self.skillView.set_model(self.skillStore)
     self.skillListStore = TMH.SkillListStore(self.char)
     commonSkillStore = self.skillListStore.filter_new()
     commonSkillStore.set_visible_column(TMH.SkillTreeStore.col('CommonlyUsed'))
     self.commonSkillView.set_model(commonSkillStore)
     if hasattr(self,'weaponSkillStore'):
         self.Disconnect(self.weaponSkillStore)
     self.weaponSkillStore = TMH.WeaponListStore(self.char)
     self.weaponSkillView.set_model(self.weaponSkillStore)
     self.itemStore = TMH.ItemListStore(self.char)
     self.itemView.set_model(self.itemStore)
     self.talentStore = TMH.TalentListStore(self.char)
     self.talentView.set_model(self.talentStore)
     self.BuildStatTable(self.char)
     self.BuildResistanceTable(self.char)
     self.UpdateMisc()
     self.ShowHideLevelling()
     self.Unblock()
Esempio n. 2
0
 def test_skillstore(self):
     store = TMH.SkillTreeStore(self.char)
     for skIter, skill in zip(store.IterAll, self.char.Skills):
         sk, skName, skSB, skBon, skRanks = store.get(
             skIter, TMH.SkillTreeStore.col('obj'),
             TMH.SkillTreeStore.col('Name'),
             TMH.SkillTreeStore.col('ValueBonus'),
             TMH.SkillTreeStore.col('Bonus'),
             TMH.SkillTreeStore.col('Ranks'))
         self.assertIs(sk, skill)
         self.assertEqual(skName, skill.Name)
         self.assertEqual(skSB, skill.ValueBonus())
         self.assertEqual(skBon, skill.Bonus())
         self.assertEqual(skRanks, skill.Value)