Exemple #1
0
def get_brew_info_1600(data, player):
    response = brew_pb2.BrewInfo()
    response.brew_times = player.brew.brew_times
    response.brew_step = player.brew.brew_step
    response.nectar_num = player.brew.nectar
    response.nectar_cur = player.brew.nectar_cur
    response.gold = player.finance.gold
    return response.SerializePartialToString()
Exemple #2
0
def taken_brew_1602(data, player):
    response = brew_pb2.BrewInfo()
    response.res.result = player.brew.taken_brew()
    if response.res.result:
        response.brew_times = player.brew.brew_times
        response.brew_step = player.brew.brew_step
        response.nectar_num = player.brew.nectar
        response.nectar_cur = player.brew.nectar_cur
        response.gold = player.finance.gold
    return response.SerializePartialToString()
Exemple #3
0
def do_brew_1601(data, player):
    request = brew_pb2.DoBrew()
    request.ParseFromString(data)
    response = brew_pb2.BrewInfo()
    response.res.result = player.brew.do_brew(request.brew_type)
    if response.res.result:
        response.brew_times = player.brew.brew_times
        response.brew_step = player.brew.brew_step
        response.nectar_num = player.brew.nectar
        response.nectar_cur = player.brew.nectar_cur
        response.gold = player.finance.gold
    return response.SerializePartialToString()
Exemple #4
0
 def anonyous_1601(self, message):
     response = brew_pb2.BrewInfo()
     response.ParseFromString(message)
     print response
     self.on_command_finish()