def get_reward(request): req = request._proto char_id = request._char_id p = Plunder(char_id) attachment_msg = p.get_reward(req.tp) response = PlunderGetRewardResponse() response.ret = 0 response.tp = req.tp response.reward.MergeFrom(attachment_msg) return pack_msg(response)
def get_reward(request): server_id = request._game_session.server_id char_id = request._game_session.char_id p = Plunder(server_id, char_id) result, drop = p.get_reward() response = PlunderGetRewardResponse() response.ret = 0 response.result.extend(result) response.drop.MergeFrom(drop.make_protomsg()) return ProtobufResponse(response)