示例#1
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 8: {
                    condition_     = input.ReadEnum();
                    conditionCase_ = ConditionOneofCase.Always;
                    break;
                }

                case 18: {
                    global::WUProtos.Data.EnemyTagCondition subBuilder = new global::WUProtos.Data.EnemyTagCondition();
                    if (conditionCase_ == ConditionOneofCase.EnemyTagCond)
                    {
                        subBuilder.MergeFrom(EnemyTagCond);
                    }
                    input.ReadMessage(subBuilder);
                    EnemyTagCond = subBuilder;
                    break;
                }

                case 26: {
                    global::WUProtos.Data.StatsTagCondition subBuilder = new global::WUProtos.Data.StatsTagCondition();
                    if (conditionCase_ == ConditionOneofCase.StatsTagCond)
                    {
                        subBuilder.MergeFrom(StatsTagCond);
                    }
                    input.ReadMessage(subBuilder);
                    StatsTagCond = subBuilder;
                    break;
                }

                case 34: {
                    global::WUProtos.Data.Buff.BuffCountCondition subBuilder = new global::WUProtos.Data.Buff.BuffCountCondition();
                    if (conditionCase_ == ConditionOneofCase.BuffCountCond)
                    {
                        subBuilder.MergeFrom(BuffCountCond);
                    }
                    input.ReadMessage(subBuilder);
                    BuffCountCond = subBuilder;
                    break;
                }

                case 42: {
                    global::WUProtos.Data.RuneInChallengeCondition subBuilder = new global::WUProtos.Data.RuneInChallengeCondition();
                    if (conditionCase_ == ConditionOneofCase.RuneInChallengeCond)
                    {
                        subBuilder.MergeFrom(RuneInChallengeCond);
                    }
                    input.ReadMessage(subBuilder);
                    RuneInChallengeCond = subBuilder;
                    break;
                }

                case 50: {
                    global::WUProtos.Data.TimeRemainingCondition subBuilder = new global::WUProtos.Data.TimeRemainingCondition();
                    if (conditionCase_ == ConditionOneofCase.TimeRemainingCond)
                    {
                        subBuilder.MergeFrom(TimeRemainingCond);
                    }
                    input.ReadMessage(subBuilder);
                    TimeRemainingCond = subBuilder;
                    break;
                }

                case 58: {
                    global::WUProtos.Data.FocusAmountCondition subBuilder = new global::WUProtos.Data.FocusAmountCondition();
                    if (conditionCase_ == ConditionOneofCase.FocusLevelCond)
                    {
                        subBuilder.MergeFrom(FocusLevelCond);
                    }
                    input.ReadMessage(subBuilder);
                    FocusLevelCond = subBuilder;
                    break;
                }

                case 66: {
                    global::WUProtos.Data.TeamCompositionCondition subBuilder = new global::WUProtos.Data.TeamCompositionCondition();
                    if (conditionCase_ == ConditionOneofCase.TeamCompositionCond)
                    {
                        subBuilder.MergeFrom(TeamCompositionCond);
                    }
                    input.ReadMessage(subBuilder);
                    TeamCompositionCond = subBuilder;
                    break;
                }

                case 74: {
                    global::WUProtos.Data.TimeOfDayCondition subBuilder = new global::WUProtos.Data.TimeOfDayCondition();
                    if (conditionCase_ == ConditionOneofCase.TimeOfDayCond)
                    {
                        subBuilder.MergeFrom(TimeOfDayCond);
                    }
                    input.ReadMessage(subBuilder);
                    TimeOfDayCond = subBuilder;
                    break;
                }

                case 82: {
                    global::WUProtos.Data.WeatherCondition subBuilder = new global::WUProtos.Data.WeatherCondition();
                    if (conditionCase_ == ConditionOneofCase.WeatherCond)
                    {
                        subBuilder.MergeFrom(WeatherCond);
                    }
                    input.ReadMessage(subBuilder);
                    WeatherCond = subBuilder;
                    break;
                }

                case 90: {
                    global::WUProtos.Data.TeamPropertyCondition subBuilder = new global::WUProtos.Data.TeamPropertyCondition();
                    if (conditionCase_ == ConditionOneofCase.TeamPropertyCond)
                    {
                        subBuilder.MergeFrom(TeamPropertyCond);
                    }
                    input.ReadMessage(subBuilder);
                    TeamPropertyCond = subBuilder;
                    break;
                }

                case 98: {
                    global::WUProtos.Data.EnemiesDefeatedCountCondition subBuilder = new global::WUProtos.Data.EnemiesDefeatedCountCondition();
                    if (conditionCase_ == ConditionOneofCase.EnemiesDefeatedCond)
                    {
                        subBuilder.MergeFrom(EnemiesDefeatedCond);
                    }
                    input.ReadMessage(subBuilder);
                    EnemiesDefeatedCond = subBuilder;
                    break;
                }
                }
            }
        }
示例#2
0
        public void MergeFrom(Condition other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.ConditionCase)
            {
            case ConditionOneofCase.Always:
                Always = other.Always;
                break;

            case ConditionOneofCase.EnemyTagCond:
                if (EnemyTagCond == null)
                {
                    EnemyTagCond = new global::WUProtos.Data.EnemyTagCondition();
                }
                EnemyTagCond.MergeFrom(other.EnemyTagCond);
                break;

            case ConditionOneofCase.StatsTagCond:
                if (StatsTagCond == null)
                {
                    StatsTagCond = new global::WUProtos.Data.StatsTagCondition();
                }
                StatsTagCond.MergeFrom(other.StatsTagCond);
                break;

            case ConditionOneofCase.BuffCountCond:
                if (BuffCountCond == null)
                {
                    BuffCountCond = new global::WUProtos.Data.Buff.BuffCountCondition();
                }
                BuffCountCond.MergeFrom(other.BuffCountCond);
                break;

            case ConditionOneofCase.RuneInChallengeCond:
                if (RuneInChallengeCond == null)
                {
                    RuneInChallengeCond = new global::WUProtos.Data.RuneInChallengeCondition();
                }
                RuneInChallengeCond.MergeFrom(other.RuneInChallengeCond);
                break;

            case ConditionOneofCase.TimeRemainingCond:
                if (TimeRemainingCond == null)
                {
                    TimeRemainingCond = new global::WUProtos.Data.TimeRemainingCondition();
                }
                TimeRemainingCond.MergeFrom(other.TimeRemainingCond);
                break;

            case ConditionOneofCase.FocusLevelCond:
                if (FocusLevelCond == null)
                {
                    FocusLevelCond = new global::WUProtos.Data.FocusAmountCondition();
                }
                FocusLevelCond.MergeFrom(other.FocusLevelCond);
                break;

            case ConditionOneofCase.TeamCompositionCond:
                if (TeamCompositionCond == null)
                {
                    TeamCompositionCond = new global::WUProtos.Data.TeamCompositionCondition();
                }
                TeamCompositionCond.MergeFrom(other.TeamCompositionCond);
                break;

            case ConditionOneofCase.TimeOfDayCond:
                if (TimeOfDayCond == null)
                {
                    TimeOfDayCond = new global::WUProtos.Data.TimeOfDayCondition();
                }
                TimeOfDayCond.MergeFrom(other.TimeOfDayCond);
                break;

            case ConditionOneofCase.WeatherCond:
                if (WeatherCond == null)
                {
                    WeatherCond = new global::WUProtos.Data.WeatherCondition();
                }
                WeatherCond.MergeFrom(other.WeatherCond);
                break;

            case ConditionOneofCase.TeamPropertyCond:
                if (TeamPropertyCond == null)
                {
                    TeamPropertyCond = new global::WUProtos.Data.TeamPropertyCondition();
                }
                TeamPropertyCond.MergeFrom(other.TeamPropertyCond);
                break;

            case ConditionOneofCase.EnemiesDefeatedCond:
                if (EnemiesDefeatedCond == null)
                {
                    EnemiesDefeatedCond = new global::WUProtos.Data.EnemiesDefeatedCountCondition();
                }
                EnemiesDefeatedCond.MergeFrom(other.EnemiesDefeatedCond);
                break;
            }

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