Ejemplo n.º 1
0
    internal static IList MsgToSkillList(MsgUnPacker unpacker)
    {
        IList list     = new ArrayList();
        int   skillLen = unpacker.PopInt();

        for (int i = 0; i < skillLen; i++)
        {
            SkillItem skill = new SkillItem();
            skill.Id       = unpacker.PopInt();
            skill.OwnerID  = unpacker.PopInt();
            skill.SkillID  = unpacker.PopInt();
            skill.RoleType = unpacker.PopString();
            skill.Type     = unpacker.PopString();
            skill.Pos      = unpacker.PopString();
            skill.ColdTime = unpacker.PopInt();
            skill.Fc       = unpacker.PopInt();
            skill.Level    = unpacker.PopInt();
            SkillMgr.Instance.ComposeSkill(skill);
            list.Add(skill);
        }
        return(list);
    }
Ejemplo n.º 2
0
    public void HandleMsg(MsgHandlerMgr ctx, MsgUnPacker unpacker)
    {
        UITools.log("MsgFilterHandler");
        int status = unpacker.PopInt();

        if (status == MsgProtocol.Error)
        {
            UITools.log("MsgFilterHandler === > Error");
            string msg = unpacker.PopString();
            unpacker.Close();
            UITools.log(msg);
            UITools.ShowMsg(msg);
        }
        else if (status == MsgProtocol.Success)
        {
            ctx.NextHandler(unpacker);
        }
    }
Ejemplo n.º 3
0
    public static IList MsgToTaskList(MsgUnPacker unpacker)
    {
        IList list    = new ArrayList();
        int   taskLen = unpacker.PopInt();

        for (int i = 0; i < taskLen; i++)
        {
            TaskEntity task = new TaskEntity();
            task.Id           = unpacker.PopInt();
            task.TaskId       = unpacker.PopInt();
            task.OwnerId      = unpacker.PopInt();
            task.Type         = unpacker.PopString();
            task.Status       = unpacker.PopInt();
            task.GoldCount    = unpacker.PopInt();
            task.DiamondCount = unpacker.PopInt();
            task.CurStage     = unpacker.PopInt();
            task.TotalStage   = unpacker.PopInt();
            list.Add(TaskMgr.Instance.ComposeTask(task));
        }
        return(list);
    }