Пример #1
0
 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.formatInfo = {}
     self.matrixId = matrixId
     self.rule = rule
     self.mconfig = 0
     self.initialiseToo(data)
Пример #2
0
	def __init__(self,id=-1,name='',templateId=0,zenId=1,clubcategory=1):
		'''初始化NPC球队类'''
		data={}
		if clubcategory==1:#挑战赛球队
			data=dbclub.CHALLENGENPC.get(templateId)
		elif clubcategory==7:#训练赛球队
			data=dbclub.TRAINMATCHNPC.get(templateId)
		Character.__init__(self,id,name)
		self.setCharacterType(Character.CLUBTYPE)
		self.player=NPCPlayerComponent(self)#npc球队球员
		self.attribute=CharacterAttributeComponent(self) #npc球队属性
		self.templateId=int(data['ID'])
		self.formatInfo={}
		self.initialiseToo(data)
Пример #3
0
 def __init__(self, id=-1, name='', templateId=0, zenId=1, clubcategory=1):
     '''初始化NPC球队类'''
     data = {}
     if clubcategory == 1:  #挑战赛球队
         data = dbclub.CHALLENGENPC.get(templateId)
     elif clubcategory == 7:  #训练赛球队
         data = dbclub.TRAINMATCHNPC.get(templateId)
     Character.__init__(self, id, name)
     self.setCharacterType(Character.CLUBTYPE)
     self.player = NPCPlayerComponent(self)  #npc球队球员
     self.attribute = CharacterAttributeComponent(self)  #npc球队属性
     self.templateId = int(data['ID'])
     self.formatInfo = {}
     self.initialiseToo(data)
Пример #4
0
 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.attribute = CharacterAttributeComponent(self)  #角色属性
     self.matrix = CharacterMatrixComponent(self)  #阵法摆放信息
     self.zhanyi = CharacterZhanYiComponent(self)  #角色的战役信息
     if status:
         self.initPlayerInfo()  #初始化角色
Пример #5
0
 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.attribute = CharacterAttributeComponent(self)  #角色属性
     self.matrix = CharacterMatrixComponent(self) #阵法摆放信息
     self.zhanyi = CharacterZhanYiComponent(self)#角色的战役信息
     if status:
         self.initPlayerInfo() #初始化角色
Пример #6
0
    def __init__(self, cid, name=u'MLGB', dynamic_id=-1, status=1):
        """构造方法
        @dynamic_id (int) 角色登陆的动态ID socket连接产生的id
        """
        Character.__init__(self, cid, name)

        self._character_type = const.PLAYER_TYPE  # 设置角色类型为玩家角色
        self._dynamic_id = dynamic_id  # 角色登陆服务器时的动态id
        # --------角色的各个组件类------------

        self._hero_component = CharacterHerosComponent(self)  # 武将列表
        self._finance = CharacterFinanceComponent(self)  # 金币
        self._hero_chip_component = CharacterHeroChipsComponent(self)  # 武将碎片
        self._item_package = CharacterItemPackageComponent(self)  # 游戏道具背包
        self._equipment = CharacterEquipmentPackageComponent(self)  # 装备
        self._equipment_chip = CharacterEquipmentChipComponent(self)  # 装备碎片
        self._level = CharacterLevelComponent(self)  # 等级
        self._line_up = CharacterLineUpComponent(self)  # 阵容
        self._stage = CharacterStageComponent(self)  # 关卡
        self._last_pick_time = CharacterLastPickTimeComponent(self)  # 上次抽取时间

        self._fight_cache = CharacterFightCacheComponent(self)  # 关卡战斗缓存
        self._friends = FriendComponent(self)  # friend system
        self._guild = CharacterGuildComponent(self)  # 公会组件
        self._mail = CharacterMailComponent(self)  # 邮箱组件
        self._sign_in = CharacterSignInComponent(self)  # 签到组件
        self._feast = CharacterFeastComponent(self)
        self._online_gift = CharacterOnlineGift(self)  # online gift
        self._level_gift = CharacterLevelGift(self)  # level gift
        self._login_gift = CharacterLoginGiftComponent(self)  # Login gift
        self._world_boss = CharacterWorldBoss(self)  # world boss
        self._vip = CharacterVIPComponent(self)  # VIP level

        self._stamina = CharacterStaminaComponent(self)  # 体力
        self._soul_shop = CharacterSoulShopComponent(self)  # 武魂商店
        self._arena_shop = CharacterArenaShopComponent(self)
        self._brew = CharacterBrewComponent(self)

        self._tasks = UserAchievement(self)

        self._pvp_times = 0  # pvp次数
        self._soul_shop_refresh_times = 0  # 武魂商店刷新次数

        self._travel = CharacterTravelComponent(self)
Пример #7
0
 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.formatInfo = {}
     self.matrixId = matrixId
     self.rule = rule
     self.mconfig = 0
     self.initialiseToo(data)
Пример #8
0
	def __init__(self,cid,name=u'',dynamicId=-1,status=1):
		'''构造方法
		@dynamicId (int) 角色登录的动态ID socket连接产生的id
		'''
		Character.__init__(self,cid,name)
		self.setCharacterType(Character.GAMERTYPE)#设置角色类型为玩家角色
		self.dynamicId=dynamicId #角色登录服务器时的动态id
		#-----------角色的各个组件类----------------
		self.level=CharacterLevelComponent(self) #角色等级
		self.finance=CharacterFinanceComponent(self) #角色资产
		self.pack=CharacterPackageComponent(self) #角色包裹
		self.attribute=CharacterAttributeComponent(self) #角色属性
		self.mail=CharacterMailListComponent(self)#角色邮件列表
		self.playerInner=PlayerInner(self)#球员找寻
		self.player=PlayerComponent(self)#球队球员
		self.zen=CharacterZenComponent(self)#球队战术
		self.shop=CharacterShopComponent(self)#商店
		self.task=CharacterTaskComponent(self)#任务
		self.trainmatch=TrainMatchComponent(self)#训练赛
		self.challengematch=ChallengeMatchComponent(self)#挑战赛
		if status:
			self.initGamerInfo() #初始化角色
Пример #9
0
    def __init__(self, cid, name=u'', dynamicId=-1, status=1):
        '''构造方法
		@dynamicId (int) 角色登录的动态ID socket连接产生的id
		'''
        Character.__init__(self, cid, name)
        self.setCharacterType(Character.GAMERTYPE)  #设置角色类型为玩家角色
        self.dynamicId = dynamicId  #角色登录服务器时的动态id
        #-----------角色的各个组件类----------------
        self.level = CharacterLevelComponent(self)  #角色等级
        self.finance = CharacterFinanceComponent(self)  #角色资产
        self.pack = CharacterPackageComponent(self)  #角色包裹
        self.attribute = CharacterAttributeComponent(self)  #角色属性
        self.mail = CharacterMailListComponent(self)  #角色邮件列表
        self.playerInner = PlayerInner(self)  #球员找寻
        self.player = PlayerComponent(self)  #球队球员
        self.zen = CharacterZenComponent(self)  #球队战术
        self.shop = CharacterShopComponent(self)  #商店
        self.task = CharacterTaskComponent(self)  #任务
        self.trainmatch = TrainMatchComponent(self)  #训练赛
        self.challengematch = ChallengeMatchComponent(self)  #挑战赛
        if status:
            self.initGamerInfo()  #初始化角色