Ejemplo n.º 1
0
        public override void WriteTo(pb::CodedOutputStream output)
        {
            int size = SerializedSize();

            {
                output.WriteTag((int)1, pb::WireFormat.WireType.LengthDelimited);
                output.WriteRawVarint32((uint)BattleTask.SerializedSize());
                BattleTask.WriteTo(output);
            }

            if (HasType)
            {
                output.WriteInt32(2, Type);
            }

            if (HasOldTaskID)
            {
                output.WriteInt32(3, OldTaskID);
            }

            if (HasTaskStatus)
            {
                output.WriteInt32(4, TaskStatus);
            }
        }
Ejemplo n.º 2
0
        public override int SerializedSize()
        {
            int size = memoizedSerializedSize;

            if (size != -1)
            {
                return(size);
            }
            size = 0;
            {
                int subsize = BattleTask.SerializedSize();
                size += pb::CodedOutputStream.ComputeTagSize((int)1) + pb::CodedOutputStream.ComputeRawVarint32Size((uint)subsize) + subsize;
            }
            if (HasType)
            {
                size += pb::CodedOutputStream.ComputeInt32Size(2, Type);
            }
            if (HasOldTaskID)
            {
                size += pb::CodedOutputStream.ComputeInt32Size(3, OldTaskID);
            }
            if (HasTaskStatus)
            {
                size += pb::CodedOutputStream.ComputeInt32Size(4, TaskStatus);
            }
            memoizedSerializedSize = size;
            return(size);
        }
Ejemplo n.º 3
0
//end merged
        public override bool IsInitialized()
        {
            if (HasBattleTask)
            {
                if (!BattleTask.IsInitialized())
                {
                    return(false);
                }
            }
            return(true);
        }
Ejemplo n.º 4
0
        public override PacketDistributed MergeFrom(pb::CodedInputStream input, PacketDistributed _base)
        {
            GCBattleTaskInforBack _inst = (GCBattleTaskInforBack)_base;

            while (true)
            {
                uint tag = input.ReadTag();
                switch (tag)
                {
                case 0:
                {
                    return(_inst);
                }

                case  10: {
                    BattleTask subBuilder = new BattleTask();
                    input.ReadMessage(subBuilder);
                    _inst.BattleTask = subBuilder;
                    break;
                }

                case  16: {
                    _inst.Type = input.ReadInt32();
                    break;
                }

                case  24: {
                    _inst.OldTaskID = input.ReadInt32();
                    break;
                }

                case  32: {
                    _inst.TaskStatus = input.ReadInt32();
                    break;
                }
                }
            }
            return(_inst);
        }
Ejemplo n.º 5
0
        public override PacketDistributed MergeFrom(pb::CodedInputStream input, PacketDistributed _base)
        {
            BattleTask _inst = (BattleTask)_base;

            while (true)
            {
                uint tag = input.ReadTag();
                switch (tag)
                {
                case 0:
                {
                    return(_inst);
                }

                case  8: {
                    _inst.TaskID = input.ReadInt32();
                    break;
                }

                case  16: {
                    _inst.Status = input.ReadInt32();
                    break;
                }

                case  24: {
                    _inst.Num = input.ReadInt32();
                    break;
                }

                case  32: {
                    _inst.Type = input.ReadInt32();
                    break;
                }
                }
            }
            return(_inst);
        }
Ejemplo n.º 6
0
        public override PacketDistributed MergeFrom(pb::CodedInputStream input, PacketDistributed _base)
        {
            GCBattleTaskListBack _inst = (GCBattleTaskListBack)_base;

            while (true)
            {
                uint tag = input.ReadTag();
                switch (tag)
                {
                case 0:
                {
                    return(_inst);
                }

                case  10: {
                    BattleTask subBuilder = new BattleTask();
                    input.ReadMessage(subBuilder);
                    _inst.AddBattleTasks(subBuilder);
                    break;
                }
                }
            }
            return(_inst);
        }
Ejemplo n.º 7
0
 public void AddBattleTasks(BattleTask value)
 {
     battleTasks_.Add(value);
 }
Ejemplo n.º 8
0
 public void SetBattleTask(BattleTask value)
 {
     hasBattleTask = true;
     battleTask_   = value;
 }