def __init__(self, petId=0, name='', templateId=0, owner=0, quality=1): '''初始化宠物的信息''' #角色类型 Character.__init__(self, petId, name) self.setCharacterType(self.PETTYPE) #宠物的拥有者的ID self._owner = owner #宠物是否跟随 self.flowFlag = False #宠物的当前血量 self.hp = 0 #宠物的当前生存状态 self.lifestate = 1 #宠物的等级 self.level = 1 #宠物的经验 self.exp = 0 #宠物的品质 self.quality = quality #宠物的模板ID self._templateId = templateId #宠物的基础信息 self._baseInfo = {} #宠物的附加属性信息 self._extAttribute = {} #宠物的技能信息 self._skillInfo = [] #宠物的坐标信息 self.position = (300, 400) #初始化宠物的信息 self.initData()
def __init__(self,petId = 0,name = '',templateId = 0,owner = 0,quality = 1): '''初始化宠物的信息''' #角色类型 Character.__init__(self, petId, name) self.setCharacterType(self.PETTYPE) #宠物的拥有者的ID self._owner = owner #宠物是否跟随 self.flowFlag = False #宠物的当前血量 self.hp = 0 #宠物的当前生存状态 self.lifestate = 1 #宠物的等级 self.level = 1 #宠物的经验 self.exp = 0 #宠物的品质 self.quality = quality #宠物的模板ID self._templateId = templateId #宠物的基础信息 self._baseInfo = {} #宠物的附加属性信息 self._extAttribute = {} #宠物的技能信息 self._skillInfo = [] #宠物的坐标信息 self.position = (300,400) #初始化宠物的信息 self.initData()
def __init__(self, id=-1, name='', templateId=0, x=300, y=400): '''初始化怪物类 ''' Character.__init__(self, id, name) self.CharacterType = 2 self.templateId = templateId self.baseInfo.setPosition((x, y)) data = loader.getById('npc', templateId, '*') self.formatInfo = {} if data: self.initialise(data)
def __init__(self,id = -1,name='',templateId= 0,x = 300,y = 400): '''初始化怪物类 ''' Character.__init__(self, id, name) self.CharacterType = 2 self.templateId = templateId self.baseInfo.setPosition((x,y)) data = loader.getById('npc',templateId, '*') self.formatInfo = {} if data: self.initialise(data)
def __init__(self , cid , name = u'城管', dynamicId = -1,status = 1): '''构造方法 @dynamicId (int) 角色登陆的动态ID socket连接产生的id ''' Character.__init__(self, cid, name) self.setCharacterType(Character.PLAYERTYPE)#设置角色类型为玩家角色 self.dynamicId = dynamicId #角色登陆服务器时的动态id #--------角色的各个组件类------------ self.level = CharacterLevelComponent(self) #角色等级 self.finance = CharacterFinanceComponent(self) #角色资产 self.profession = CharacterProfessionComponent(self) #角色职业 self.pack = CharacterPackageComponent(self) #角色包裹 self.friend = CharacterFriendComponent(self) #角色好友 self.mail = CharacterMailListComponent(self) #角色邮件列表 self.shop = CharacterShopComponent(self) #角色个人商店 self.teamcom = CharacterTeamComponent(self) #角色的队伍组件 self.skill = CharacterSkillComponent(self) #角色技能组件 self.guild = CharacterGuildComponet(self) #角色的行会 self.practice = CharacterPracticeComponent(self) #角色修炼 self.dropping = CharacterDroppingComponent(self) #角色掉落 self.quest = CharacterQuestComponent(self) #角色任务 self.rank = CharacterRankComponent(self) #军衔 self.effect = CharacterEffectComponent(self) self.status = CharacterStatusComponent(self) #角色的状态 self.attribute = CharacterAttributeComponent(self) #角色属性 self.pet = CharacterPetComponent(self) #角色的宠物 self.matrix = CharacterMatrixComponent(self) #阵法摆放信息 self.msgbox = CharacterMSGComponent(self) #角色消息盒子 self.instance = InstanceColonizeComponent(self) #角色殖民 self.icon = CharacterIconComponent(self) #角色图标 self.award = CharacterAwardComponent(self) #角色的奖励 self.afk = CharacterAFKComponent(self) #角色挂机 self.raids = CharacterRaidsComponent(self) #角色扫荡 self.schedule = CharacterScheduleComponent(self)#角色日程表 self.nobility=CharacterNobility(self)#角色官爵 self.daily = CharacterDailyComponent(self)#角色每日目标 self.godhead = CharacterGodheadComponent(self)#角色神格 self.qhtime=IconTime(self)#强化冷却时间 self.petShop=PetWineshop(self)#宠物酒店 self.fate = CharacterFateComponent(self)#符文 self.arena = CharacterAreanaComponent(self)#竞技场 self.tower = CharacterTowerComponent(self)#爬塔 self.pvp = CharacterPVPComponent(self)#角色pvp信息 self.zhanyi = CharacterZhanYiComponent(self)#角色的战役信息 self.nodeId = 0 self.userId = 0 #角色的用户id self.CharacterType = 1 #角色的类型 1:玩家角色 2:怪物 3:宠物 self.lastOnline = None self.outtime = None self.creatTime = None if status: self.initPlayerInfo() #初始化角色
def __init__(self, cid, name=u'城管', dynamicId=-1, status=1): '''构造方法 @dynamicId (int) 角色登陆的动态ID socket连接产生的id ''' Character.__init__(self, cid, name) self.setCharacterType(Character.PLAYERTYPE) #设置角色类型为玩家角色 self.dynamicId = dynamicId #角色登陆服务器时的动态id #--------角色的各个组件类------------ self.level = CharacterLevelComponent(self) #角色等级 self.finance = CharacterFinanceComponent(self) #角色资产 self.profession = CharacterProfessionComponent(self) #角色职业 self.pack = CharacterPackageComponent(self) #角色包裹 self.friend = CharacterFriendComponent(self) #角色好友 self.mail = CharacterMailListComponent(self) #角色邮件列表 self.shop = CharacterShopComponent(self) #角色个人商店 self.teamcom = CharacterTeamComponent(self) #角色的队伍组件 self.skill = CharacterSkillComponent(self) #角色技能组件 self.guild = CharacterGuildComponet(self) #角色的行会 self.practice = CharacterPracticeComponent(self) #角色修炼 self.dropping = CharacterDroppingComponent(self) #角色掉落 self.quest = CharacterQuestComponent(self) #角色任务 self.rank = CharacterRankComponent(self) #军衔 self.effect = CharacterEffectComponent(self) self.status = CharacterStatusComponent(self) #角色的状态 self.attribute = CharacterAttributeComponent(self) #角色属性 self.pet = CharacterPetComponent(self) #角色的宠物 self.matrix = CharacterMatrixComponent(self) #阵法摆放信息 self.msgbox = CharacterMSGComponent(self) #角色消息盒子 self.instance = InstanceColonizeComponent(self) #角色殖民 self.icon = CharacterIconComponent(self) #角色图标 self.award = CharacterAwardComponent(self) #角色的奖励 self.afk = CharacterAFKComponent(self) #角色挂机 self.raids = CharacterRaidsComponent(self) #角色扫荡 self.schedule = CharacterScheduleComponent(self) #角色日程表 self.nobility = CharacterNobility(self) #角色官爵 self.daily = CharacterDailyComponent(self) #角色每日目标 self.godhead = CharacterGodheadComponent(self) #角色神格 self.qhtime = IconTime(self) #强化冷却时间 self.petShop = PetWineshop(self) #宠物酒店 self.fate = CharacterFateComponent(self) #符文 self.arena = CharacterAreanaComponent(self) #竞技场 self.tower = CharacterTowerComponent(self) #爬塔 self.pvp = CharacterPVPComponent(self) #角色pvp信息 self.zhanyi = CharacterZhanYiComponent(self) #角色的战役信息 self.nodeId = 0 self.userId = 0 #角色的用户id self.CharacterType = 1 #角色的类型 1:玩家角色 2:怪物 3:宠物 self.lastOnline = None self.outtime = None self.creatTime = None if status: self.initPlayerInfo() #初始化角色
def __init__(self,id = -1,name='',templateId= 0,x = 300,y = 400,matrixId = 0,rule = []): '''初始化怪物类 ''' data=dbMonster.All_MonsterInfo.get(templateId) Character.__init__(self, id, name) self.setCharacterType(Character.MONSTERTYPE)#设置角色类型为怪物类型 self.templateId = int(data['id']) self.baseInfo.setPosition((x,y)) self.formatInfo = {} self.camp = 0#怪物阵营 self.matrixId = matrixId self.rule = rule self.mconfig = 0 self.initialiseToo(data)
def __init__(self, petId=0, name='', templateId=0, owner=0, level=1): '''初始化宠物的信息''' #角色类型 Character.__init__(self, petId, name) self.setCharacterType(self.PETTYPE) self.templateId = templateId self._owner = owner #宠物的拥有者的ID self.level = PetLevelComponent(self, level=level) self.attribute = PetAttributeComponent(self) self.templateInfo = {} self.chuancheng = False self._chuancheng = False self.fate = {} #宠物的命格 self.position = (300, 400) self.skill = [] #宠物是否跟随 self.flowFlag = False self.initData()
def __init__(self,petId = 0,name = '',templateId = 0,owner = 0,level =1): '''初始化宠物的信息''' #角色类型 Character.__init__(self, petId, name) self.setCharacterType(self.PETTYPE) self.templateId = templateId self._owner = owner#宠物的拥有者的ID self.level = PetLevelComponent(self,level=level) self.attribute = PetAttributeComponent(self) self.templateInfo = {} self.chuancheng = False self._chuancheng = False self.fate = {}#宠物的命格 self.position = (300,400) self.skill = [] #宠物是否跟随 self.flowFlag = False self.initData()
def __init__(self, id=-1, name='', templateId=0, x=300, y=400, matrixId=0, rule=[]): '''初始化怪物类 ''' data = dbMonster.All_MonsterInfo.get(templateId) Character.__init__(self, id, name) self.setCharacterType(Character.MONSTERTYPE) #设置角色类型为怪物类型 self.templateId = int(data['id']) self.baseInfo.setPosition((x, y)) self.formatInfo = {} self.camp = 0 #怪物阵营 self.matrixId = matrixId self.rule = rule self.mconfig = 0 self.initialiseToo(data)