Exemplo n.º 1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (conditionCase_ == ConditionOneofCase.Always)
            {
                hash ^= Always.GetHashCode();
            }
            if (conditionCase_ == ConditionOneofCase.EnemyTagCond)
            {
                hash ^= EnemyTagCond.GetHashCode();
            }
            if (conditionCase_ == ConditionOneofCase.StatsTagCond)
            {
                hash ^= StatsTagCond.GetHashCode();
            }
            if (conditionCase_ == ConditionOneofCase.BuffCountCond)
            {
                hash ^= BuffCountCond.GetHashCode();
            }
            if (conditionCase_ == ConditionOneofCase.RuneInChallengeCond)
            {
                hash ^= RuneInChallengeCond.GetHashCode();
            }
            if (conditionCase_ == ConditionOneofCase.TimeRemainingCond)
            {
                hash ^= TimeRemainingCond.GetHashCode();
            }
            if (conditionCase_ == ConditionOneofCase.FocusLevelCond)
            {
                hash ^= FocusLevelCond.GetHashCode();
            }
            if (conditionCase_ == ConditionOneofCase.TeamCompositionCond)
            {
                hash ^= TeamCompositionCond.GetHashCode();
            }
            if (conditionCase_ == ConditionOneofCase.TimeOfDayCond)
            {
                hash ^= TimeOfDayCond.GetHashCode();
            }
            if (conditionCase_ == ConditionOneofCase.WeatherCond)
            {
                hash ^= WeatherCond.GetHashCode();
            }
            if (conditionCase_ == ConditionOneofCase.TeamPropertyCond)
            {
                hash ^= TeamPropertyCond.GetHashCode();
            }
            if (conditionCase_ == ConditionOneofCase.EnemiesDefeatedCond)
            {
                hash ^= EnemiesDefeatedCond.GetHashCode();
            }
            hash ^= (int)conditionCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemplo n.º 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);
        }