コード例 #1
0
ファイル: pt_win_list_d467.cs プロジェクト: atom-chen/tianyu
    public override void fromBinary(byte[] binary)
    {
        reader   = new st.net.NetBase.ByteReader(binary);
        star_num = reader.Read_int();
        time     = reader.Read_int();
        ushort lenreward_list = reader.Read_ushort();

        reward_list = new List <st.net.NetBase.reward_list>();
        for (int i_reward_list = 0; i_reward_list < lenreward_list; i_reward_list++)
        {
            st.net.NetBase.reward_list listData = new st.net.NetBase.reward_list();
            listData.fromBinary(reader);
            reward_list.Add(listData);
        }
        scene_type = reader.Read_int();
        ushort lenteam_reward_list = reader.Read_ushort();

        team_reward_list = new List <st.net.NetBase.team_reward_list>();
        for (int i_team_reward_list = 0; i_team_reward_list < lenteam_reward_list; i_team_reward_list++)
        {
            st.net.NetBase.team_reward_list listData = new st.net.NetBase.team_reward_list();
            listData.fromBinary(reader);
            team_reward_list.Add(listData);
        }
        kill_boss_num = reader.Read_int();
    }
コード例 #2
0
ファイル: pt_win_list_d467.cs プロジェクト: atom-chen/tianyu
    public override byte[] toBinary()
    {
        writer = new st.net.NetBase.ByteWriter();
        writer.write_int(star_num);
        writer.write_int(time);
        ushort lenreward_list = (ushort)reward_list.Count;

        writer.write_short(lenreward_list);
        for (int i_reward_list = 0; i_reward_list < lenreward_list; i_reward_list++)
        {
            st.net.NetBase.reward_list listData = reward_list[i_reward_list];
            listData.toBinary(writer);
        }
        writer.write_int(scene_type);
        ushort lenteam_reward_list = (ushort)team_reward_list.Count;

        writer.write_short(lenteam_reward_list);
        for (int i_team_reward_list = 0; i_team_reward_list < lenteam_reward_list; i_team_reward_list++)
        {
            st.net.NetBase.team_reward_list listData = team_reward_list[i_team_reward_list];
            listData.toBinary(writer);
        }
        writer.write_int(kill_boss_num);
        return(writer.data);
    }
コード例 #3
0
    public override byte[] toBinary()
    {
        writer = new st.net.NetBase.ByteWriter();
        ushort lentarot_reward = (ushort)tarot_reward.Count;

        writer.write_short(lentarot_reward);
        for (int i_tarot_reward = 0; i_tarot_reward < lentarot_reward; i_tarot_reward++)
        {
            st.net.NetBase.reward_list listData = tarot_reward[i_tarot_reward];
            listData.toBinary(writer);
        }
        return(writer.data);
    }
コード例 #4
0
    public override void fromBinary(byte[] binary)
    {
        reader = new st.net.NetBase.ByteReader(binary);
        ushort lentarot_reward = reader.Read_ushort();

        tarot_reward = new List <st.net.NetBase.reward_list>();
        for (int i_tarot_reward = 0; i_tarot_reward < lentarot_reward; i_tarot_reward++)
        {
            st.net.NetBase.reward_list listData = new st.net.NetBase.reward_list();
            listData.fromBinary(reader);
            tarot_reward.Add(listData);
        }
    }
コード例 #5
0
    public override byte[] toBinary()
    {
        writer = new st.net.NetBase.ByteWriter();
        writer.write_int(start_time);
        writer.write_int(amount_time);
        ushort lenoffline_reward = (ushort)offline_reward.Count;

        writer.write_short(lenoffline_reward);
        for (int i_offline_reward = 0; i_offline_reward < lenoffline_reward; i_offline_reward++)
        {
            st.net.NetBase.reward_list listData = offline_reward[i_offline_reward];
            listData.toBinary(writer);
        }
        return(writer.data);
    }
コード例 #6
0
    public override void fromBinary(byte[] binary)
    {
        reader      = new st.net.NetBase.ByteReader(binary);
        start_time  = reader.Read_int();
        amount_time = reader.Read_int();
        ushort lenoffline_reward = reader.Read_ushort();

        offline_reward = new List <st.net.NetBase.reward_list>();
        for (int i_offline_reward = 0; i_offline_reward < lenoffline_reward; i_offline_reward++)
        {
            st.net.NetBase.reward_list listData = new st.net.NetBase.reward_list();
            listData.fromBinary(reader);
            offline_reward.Add(listData);
        }
    }
コード例 #7
0
    public override byte[] toBinary()
    {
        writer = new st.net.NetBase.ByteWriter();
        ushort leneveryday_reward_list = (ushort)everyday_reward_list.Count;

        writer.write_short(leneveryday_reward_list);
        for (int i_everyday_reward_list = 0; i_everyday_reward_list < leneveryday_reward_list; i_everyday_reward_list++)
        {
            st.net.NetBase.reward_list listData = everyday_reward_list[i_everyday_reward_list];
            listData.toBinary(writer);
        }
        writer.write_int(can_get_id);
        writer.write_int(login_state);
        return(writer.data);
    }
コード例 #8
0
    public override void fromBinary(byte[] binary)
    {
        reader = new st.net.NetBase.ByteReader(binary);
        ushort leneveryday_reward_list = reader.Read_ushort();

        everyday_reward_list = new List <st.net.NetBase.reward_list>();
        for (int i_everyday_reward_list = 0; i_everyday_reward_list < leneveryday_reward_list; i_everyday_reward_list++)
        {
            st.net.NetBase.reward_list listData = new st.net.NetBase.reward_list();
            listData.fromBinary(reader);
            everyday_reward_list.Add(listData);
        }
        can_get_id  = reader.Read_int();
        login_state = reader.Read_int();
    }
コード例 #9
0
ファイル: pt_pk_win_d491.cs プロジェクト: atom-chen/tianyu
    public override byte[] toBinary()
    {
        writer = new st.net.NetBase.ByteWriter();
        writer.write_int(state);
        writer.write_int(rank);
        writer.write_int(up_rank);
        ushort lenreward = (ushort)reward.Count;

        writer.write_short(lenreward);
        for (int i_reward = 0; i_reward < lenreward; i_reward++)
        {
            st.net.NetBase.reward_list listData = reward[i_reward];
            listData.toBinary(writer);
        }
        writer.write_int(cd_state);
        return(writer.data);
    }