示例#1
0
def _char_level_up(char_id, new_level, **kwargs):
    _all_hero_changed(char_id)

    achievement = Achievement(char_id)
    achievement.trig(18, new_level)
    activity_stage = ActivityStage(char_id)
    activity_stage.check(new_level)

    ActivityStatic(char_id).trig(1001)
示例#2
0
def _char_level_up(char_id, new_level, **kwargs):
    _all_hero_changed(char_id)

    achievement = Achievement(char_id)
    achievement.trig(18, new_level)
    activity_stage = ActivityStage(char_id)
    activity_stage.check(new_level)

    ActivityStatic(char_id).trig(1001)
示例#3
0
def _char_level_up(char_id, new_level, **kwargs):
    heros_dict = char_heros_dict(char_id)

    achievement = Achievement(char_id)
    achievement.trig(18, new_level)

    heros = []
    for hid in heros_dict.keys():
        h = Hero(hid)
        h.save_cache()
        heros.append(h)

    update_hero_notify(char_id, heros)

    activity_stage = ActivityStage(char_id)
    activity_stage.check(new_level)
示例#4
0
def _char_level_up(char_id, new_level, **kwargs):
    heros_dict = char_heros_dict(char_id)

    achievement = Achievement(char_id)
    achievement.trig(18, new_level)

    heros = []
    for hid in heros_dict.keys():
        h = Hero(hid)
        h.save_cache()
        heros.append(h)

    update_hero_notify(char_id, heros)

    activity_stage = ActivityStage(char_id)
    activity_stage.check(new_level)
示例#5
0
def activity_pve(request):
    req = request._proto
    stage = ActivityStage(request._char_id)

    battle_msg = stage.battle(req.stage_id)

    if battle_msg.self_win:
        drop = stage.save_drop()
    else:
        drop = {}

    response = protomsg.ActivityStagePVEResponse()
    response.ret = 0
    response.stage_id = req.stage_id
    response.battle.MergeFrom(battle_msg)
    if drop:
        response.drop.MergeFrom(standard_drop_to_attachment_protomsg(drop))

    return pack_msg(response)
示例#6
0
def activity_pve(request):
    req = request._proto
    stage = ActivityStage(request._char_id)

    battle_msg = stage.battle(req.stage_id)

    if battle_msg.self_win:
        drop = stage.save_drop()
    else:
        drop = {}

    response = protomsg.ActivityStagePVEResponse()
    response.ret = 0
    response.stage_id = req.stage_id
    response.battle.MergeFrom(battle_msg)
    if drop:
        response.drop.MergeFrom(standard_drop_to_attachment_protomsg(drop))

    return pack_msg(response)
示例#7
0
def login_notify(char_id):
    hero_objs = char_heros_obj(char_id)

    Char(char_id).send_notify()

    hero_notify(char_id, hero_objs)
    Item(char_id).send_notify()

    f = Formation(char_id)
    f.send_socket_notify()
    f.send_formation_notify()

    hang = Hang(char_id)
    hang.send_notify()

    Plunder(char_id).send_notify()

    p = Prison(char_id)
    p.send_prisoners_notify()

    Arena(char_id).send_notify()

    f = Friend(char_id)
    f.send_friends_notify()
    f.send_friends_amount_notify()

    m = Mail(char_id)
    m.send_mail_notify()

    CheckIn(char_id).send_notify()


    stage = Stage(char_id)
    stage.send_already_stage_notify()
    stage.send_new_stage_notify()

    stage_elite = EliteStage(char_id)
    stage_elite.send_notify()
    stage_elite.send_remained_times_notify()

    stage_activity = ActivityStage(char_id)
    stage_activity.send_notify()
    stage_activity.send_remained_times_notify()

    HeroPanel(char_id).send_notify()
    Task(char_id).send_notify()
    Achievement(char_id).send_notify()
    HeroSoul(char_id).send_notify()
    FunctionOpen(char_id).send_notify()
    Levy(char_id).send_notify()
    Attachment(char_id).send_notify()
示例#8
0
def login_notify(char_id):
    message_clean(char_id)
    function_open = FunctionOpen(char_id)
    function_open.send_notify()

    hero_objs = char_heros_obj(char_id)

    Char(char_id).send_notify()

    hero_notify(char_id, hero_objs)
    Item(char_id).send_notify()

    f = Formation(char_id)
    f.send_socket_notify()
    f.send_formation_notify()

    Plunder(char_id).send_notify()

    p = Prison(char_id)
    p.send_prisoners_notify()

    if Arena.FUNC_ID not in function_open.mf.freeze:
        arena = Arena(char_id)
        arena.send_notify()
        arena.login_process()

    f = Friend(char_id)
    f.send_friends_notify()
    f.send_friends_amount_notify()

    CheckIn(char_id).send_notify()

    stage = Stage(char_id)
    stage.send_already_stage_notify()
    stage.send_new_stage_notify()

    stage_elite = EliteStage(char_id)
    stage_elite.send_notify()
    stage_elite.send_remained_times_notify()

    stage_activity = ActivityStage(char_id)
    stage_activity.send_notify()
    stage_activity.send_remained_times_notify()

    HeroPanel(char_id).send_notify()
    Task(char_id).send_notify()
    Achievement(char_id).send_notify()
    HeroSoul(char_id).send_notify()
    Levy(char_id).send_notify()
    Attachment(char_id).send_notify()

    PurchaseAction(char_id).send_notify()

    SystemBroadcast(char_id).send_global_broadcast()

    affairs = Affairs(char_id)
    affairs.send_city_notify()
    affairs.send_hang_notify()

    # mail notify 要放在最后,因为 其他功能初始化时可能会产生登录邮件
    Mail(char_id).send_notify()
示例#9
0
def login_notify(char_id):
    message_clean(char_id)
    function_open = FunctionOpen(char_id)
    function_open.send_notify()

    hero_objs = char_heros_obj(char_id)

    Char(char_id).send_notify()
    VIP(char_id).send_notify()

    hero_notify(char_id, hero_objs)
    Item(char_id).send_notify()

    f = Formation(char_id)
    f.send_socket_notify()
    f.send_formation_notify()

    Plunder(char_id).send_notify()

    p = Prison(char_id)
    p.send_prisoners_notify()

    a = Arena(char_id)
    a.send_notify()
    a.login_process()

    f = Friend(char_id)
    f.send_friends_notify()
    f.send_friends_amount_notify()

    CheckIn(char_id).send_notify()

    stage = Stage(char_id)
    stage.send_already_stage_notify()
    stage.send_new_stage_notify()

    stage_elite = EliteStage(char_id)
    stage_elite.send_notify()
    stage_elite.send_times_notify()

    stage_activity = ActivityStage(char_id)
    stage_activity.check(send_notify=False)
    stage_activity.send_notify()
    stage_activity.send_remained_times_notify()

    HeroPanel(char_id).send_notify()
    Task(char_id).send_notify()
    Achievement(char_id).send_notify()
    HeroSoul(char_id).send_notify()
    Levy(char_id).send_notify()
    Attachment(char_id).send_notify()

    BasePurchaseAction(char_id).send_notify()

    SystemBroadcast(char_id).send_global_broadcast()
    ChatMessagePublish(char_id).send_notify()

    affairs = Affairs(char_id)
    affairs.send_city_notify()
    affairs.send_hang_notify()

    HorseFreeTimesManager(char_id).send_notify()
    Horse(char_id).send_notify()

    union.send_notify(char_id)

    ae = ActivityEntry(char_id, 50006)
    if ae and ae.is_valid():
        ae.enable(ae.get_current_value(char_id))

    ActivityStatic(char_id).send_notify()

    # mail notify 要放在最后,因为 其他功能初始化时可能会产生登录邮件
    Mail(char_id).send_notify()
示例#10
0
def login_notify(char_id):
    message_clean(char_id)
    function_open = FunctionOpen(char_id)
    function_open.send_notify()

    hero_objs = char_heros_obj(char_id)

    Char(char_id).send_notify()
    VIP(char_id).send_notify()

    hero_notify(char_id, hero_objs)
    Item(char_id).send_notify()

    f = Formation(char_id)
    f.send_socket_notify()
    f.send_formation_notify()


    Plunder(char_id).send_notify()

    p = Prison(char_id)
    p.send_prisoners_notify()

    a = Arena(char_id)
    a.send_notify()
    a.login_process()

    f = Friend(char_id)
    f.send_friends_notify()
    f.send_friends_amount_notify()

    CheckIn(char_id).send_notify()

    stage = Stage(char_id)
    stage.send_already_stage_notify()
    stage.send_new_stage_notify()

    stage_elite = EliteStage(char_id)
    stage_elite.send_notify()
    stage_elite.send_times_notify()

    stage_activity = ActivityStage(char_id)
    stage_activity.check(send_notify=False)
    stage_activity.send_notify()
    stage_activity.send_remained_times_notify()

    HeroPanel(char_id).send_notify()
    Task(char_id).send_notify()
    Achievement(char_id).send_notify()
    HeroSoul(char_id).send_notify()
    Levy(char_id).send_notify()
    Attachment(char_id).send_notify()

    BasePurchaseAction(char_id).send_notify()

    SystemBroadcast(char_id).send_global_broadcast()
    ChatMessagePublish(char_id).send_notify()

    affairs = Affairs(char_id)
    affairs.send_city_notify()
    affairs.send_hang_notify()

    HorseFreeTimesManager(char_id).send_notify()
    Horse(char_id).send_notify()

    union.send_notify(char_id)


    ae = ActivityEntry(char_id, 50006)
    if ae and ae.is_valid():
        ae.enable(ae.get_current_value(char_id))

    ActivityStatic(char_id).send_notify()

    # mail notify 要放在最后,因为 其他功能初始化时可能会产生登录邮件
    Mail(char_id).send_notify()