Exemple #1
0
        public void MergeFrom(CombatMoveType other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.CombatMoveCase)
            {
            case CombatMoveOneofCase.PlayerAttack:
                if (PlayerAttack == null)
                {
                    PlayerAttack = new global::WUProtos.Data.Combat.CombatPlayerAttack();
                }
                PlayerAttack.MergeFrom(other.PlayerAttack);
                break;

            case CombatMoveOneofCase.PlayerDefend:
                if (PlayerDefend == null)
                {
                    PlayerDefend = new global::WUProtos.Data.Combat.CombatPlayerDefend();
                }
                PlayerDefend.MergeFrom(other.PlayerDefend);
                break;

            case CombatMoveOneofCase.PlayerAutoAdvance:
                if (PlayerAutoAdvance == null)
                {
                    PlayerAutoAdvance = new global::WUProtos.Data.Combat.CombatPlayerAutoAdvance();
                }
                PlayerAutoAdvance.MergeFrom(other.PlayerAutoAdvance);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Exemple #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    global::WUProtos.Data.Combat.CombatPlayerAttack subBuilder = new global::WUProtos.Data.Combat.CombatPlayerAttack();
                    if (combatMoveCase_ == CombatMoveOneofCase.PlayerAttack)
                    {
                        subBuilder.MergeFrom(PlayerAttack);
                    }
                    input.ReadMessage(subBuilder);
                    PlayerAttack = subBuilder;
                    break;
                }

                case 18: {
                    global::WUProtos.Data.Combat.CombatPlayerDefend subBuilder = new global::WUProtos.Data.Combat.CombatPlayerDefend();
                    if (combatMoveCase_ == CombatMoveOneofCase.PlayerDefend)
                    {
                        subBuilder.MergeFrom(PlayerDefend);
                    }
                    input.ReadMessage(subBuilder);
                    PlayerDefend = subBuilder;
                    break;
                }

                case 26: {
                    global::WUProtos.Data.Combat.CombatPlayerAutoAdvance subBuilder = new global::WUProtos.Data.Combat.CombatPlayerAutoAdvance();
                    if (combatMoveCase_ == CombatMoveOneofCase.PlayerAutoAdvance)
                    {
                        subBuilder.MergeFrom(PlayerAutoAdvance);
                    }
                    input.ReadMessage(subBuilder);
                    PlayerAutoAdvance = subBuilder;
                    break;
                }
                }
            }
        }