コード例 #1
0
def StartCopyScene(dynamicId, characterId, vipMatrix):
    '''开始房间副本
    @param dynamicId: int 客户端的动态Id
    @param characterId: int 角色的ID
    '''
    player = PlayersManager().getPlayerByID(characterId)
    if not player:
        return {'result': False, 'message': Lg().g(18)}
    areahall = Hall().getAreaHallById(1)
    roomId = player.baseInfo.getQueueRoom()
    if not roomId:
        return {'result': False, 'message': Lg().g(104)}
    room = areahall.getQueueRoomById(roomId)
    data = room.startCopyScene(characterId, vipMatrix)
    if data['result']:
        areahall.dropQueueRoomById(roomId)
        player.baseInfo.setStatus(1)
    return data
コード例 #2
0
ファイル: hall.py プロジェクト: 9miao/firefly_fengyan_OL
def StartCopyScene(dynamicId,characterId,vipMatrix):
    '''开始房间副本
    @param dynamicId: int 客户端的动态Id
    @param characterId: int 角色的ID
    '''
    player = PlayersManager().getPlayerByID(characterId)
    if not player:
        return {'result':False,'message':Lg().g(18)}
    areahall = Hall().getAreaHallById(1)
    roomId = player.baseInfo.getQueueRoom()
    if not roomId:
        return {'result':False,'message':Lg().g(104)}
    room = areahall.getQueueRoomById(roomId)
    data = room.startCopyScene(characterId,vipMatrix)
    if data['result']:
        areahall.dropQueueRoomById(roomId)
        player.baseInfo.setStatus(1)
    return data
コード例 #3
0
def LeaveRoom(dynamicId, characterId):
    '''离开房间
    @param dynamicId: int 客户端的动态Id
    @param characterId: int 角色的ID
    '''
    player = PlayersManager().getPlayerByID(characterId)
    if not player:
        return {'result': False, 'message': Lg().g(18)}
    areahall = Hall().getAreaHallById(1)
    roomId = player.baseInfo.getQueueRoom()
    if not roomId:
        return {'result': False, 'message': Lg().g(104)}
    room = areahall.getQueueRoomById(roomId)
    if not room:
        return {'result': False, 'message': Lg().g(104)}
    result = room.dropmember(characterId)
    if result == -1:
        areahall.dropQueueRoomById(roomId)
    elif result == 1:
        areahall.addPlayer(characterId)
    player.baseInfo.setQueueRoom(0)
    areahall.addPlayer(characterId)
    return {'result': True, 'message': Lg().g(105)}
コード例 #4
0
ファイル: hall.py プロジェクト: 9miao/firefly_fengyan_OL
def LeaveRoom(dynamicId,characterId):
    '''离开房间
    @param dynamicId: int 客户端的动态Id
    @param characterId: int 角色的ID
    '''
    player = PlayersManager().getPlayerByID(characterId)
    if not player:
        return {'result':False,'message':Lg().g(18)}
    areahall = Hall().getAreaHallById(1)
    roomId = player.baseInfo.getQueueRoom()
    if not roomId:
        return {'result':False,'message':Lg().g(104)}
    room = areahall.getQueueRoomById(roomId)
    if not room:
        return {'result':False,'message':Lg().g(104)}
    result = room.dropmember(characterId)
    if result ==-1:
        areahall.dropQueueRoomById(roomId)
    elif result ==1:
        areahall.addPlayer(characterId)
    player.baseInfo.setQueueRoom(0)
    areahall.addPlayer(characterId)
    return {'result':True,'message':Lg().g(105)}