示例#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);
        }
        public void MergeFrom(ClientCombatMoveType other)
        {
            if (other == null)
            {
                return;
            }
            if (other.EnemyActionTimeline.Length != 0)
            {
                EnemyActionTimeline = other.EnemyActionTimeline;
            }
            if (other.PlayerSucceedTimeline.Length != 0)
            {
                PlayerSucceedTimeline = other.PlayerSucceedTimeline;
            }
            if (other.PlayerFailedTimeline.Length != 0)
            {
                PlayerFailedTimeline = other.PlayerFailedTimeline;
            }
            switch (other.CombatMoveCase)
            {
            case CombatMoveOneofCase.PlayerAttack:
                if (PlayerAttack == null)
                {
                    PlayerAttack = new global::WUProtos.Data.Client.ClientCombatPlayerAttack();
                }
                PlayerAttack.MergeFrom(other.PlayerAttack);
                break;

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

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

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }