# -*- coding: GBK -*- # tagPetSkill.txt¶ÔÓ¦µÄÿÐÐÅäÖÃÏîÄÚÈÝ # author: ifo # Date: 2011.10.26 # history: 2011.10.26 Created import AccountInfo class tagPetSkillParam: def __init__(self, params,comment): self.comment = comment.replace( "\n", "\t" ).split( "\t" ) self.params = params self.NPCID = int(params[0]) accountInfo = AccountInfo.tagPetSkill() for i in range(1,len(self.params)-1): paramList = eval(self.params[i]) for j in range(len(paramList)): paramList[j] = type(getattr(accountInfo,self.comment[i]))(paramList[j]) setattr(self,self.comment[i],paramList) def __str__(self): tagDSAccountStr = "" for i in range(len(self.params)-1): tagDSAccountStr += " %s : %s %s \n"%(self.comment[i],getattr(self,self.comment[i]),type(getattr(self,self.comment[i]))) return tagDSAccountStr