hxp
2024-08-31 44bcd51874e364012946b5f34dd7bb166d86edfb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# -*- coding: GBK -*-
# tagRolePet.txt¶ÔÓ¦µÄÿÐÐÅäÖÃÏîÄÚÈÝ
# author: ifo
# Date: 2011.10.26
# history:  2011.10.26     Created
 
import AccountInfo
 
class tagRolePetParam:
    def __init__(self, params,comment):
        self.comment = comment.replace( "\n", "\t" ).split( "\t" )
        self.params = params
        self.Sex = int(params[0])
        self.Job = int(params[1])
        accountInfo = AccountInfo.tagRolePet()
        for i in range(2,len(self.params)-1): 
            setattr(self,self.comment[i],type(getattr(accountInfo,self.comment[i]))(self.params[i]))
 
    
    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