Beispiel #1
0
def step_up(request):
    char_id = request._char_id
    heros_dict = char_heros_dict(char_id)

    req = request._proto
    _id = req.id

    if _id not in heros_dict:
        raise SanguoException(
            errormsg.HERO_NOT_EXSIT,
            char_id,
            "Hero Step Up",
            "hero {0} not belong to char {1}".format(_id, char_id)
        )

    h = Hero(_id)
    h.step_up()

    response = HeroStepUpResponse()
    response.ret = 0
    response.id = _id
    response.step = h.step
    response.max_socket_amount = h.max_socket_amount
    response.current_socket_amount = h.current_socket_amount
    return pack_msg(response)
Beispiel #2
0
def step_up(request):
    char_id = request._char_id
    heros_dict = char_heros_dict(char_id)

    req = request._proto
    _id = req.id

    if _id not in heros_dict:
        raise SanguoException(
            errormsg.HERO_NOT_EXSIT,
            char_id,
            "Hero Step Up",
            "hero {0} not belong to char {1}".format(_id, char_id)
        )

    h = Hero(_id)
    h.step_up()
    return None
Beispiel #3
0
def step_up(request):
    char_id = request._char_id
    heros_dict = char_heros_dict(char_id)

    req = request._proto
    _id = req.id

    if _id not in heros_dict:
        raise SanguoException(
            errormsg.HERO_NOT_EXSIT, char_id, "Hero Step Up",
            "hero {0} not belong to char {1}".format(_id, char_id))

    h = Hero(_id)
    h.step_up()

    response = HeroStepUpResponse()
    response.ret = 0
    response.id = _id
    response.step = h.step
    response.max_socket_amount = h.max_socket_amount
    response.current_socket_amount = h.current_socket_amount
    return pack_msg(response)