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

            if (typeCase_ == TypeOneofCase.Poi)
            {
                hash ^= Poi.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.Trace)
            {
                hash ^= Trace.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.Landmark)
            {
                hash ^= Landmark.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.PotionIngredient)
            {
                hash ^= PotionIngredient.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.Weather)
            {
                hash ^= Weather.GetHashCode();
            }
            if (typeCase_ == TypeOneofCase.EnvironmentTags)
            {
                hash ^= EnvironmentTags.GetHashCode();
            }
            hash ^= (int)typeCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 2
0
        public void MergeFrom(GameEntity other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.TypeCase)
            {
            case TypeOneofCase.Poi:
                if (Poi == null)
                {
                    Poi = new global::WUProtos.Data.Client.ClientMapPoi();
                }
                Poi.MergeFrom(other.Poi);
                break;

            case TypeOneofCase.Trace:
                if (Trace == null)
                {
                    Trace = new global::WUProtos.Data.Client.ClientMapTrace();
                }
                Trace.MergeFrom(other.Trace);
                break;

            case TypeOneofCase.Landmark:
                if (Landmark == null)
                {
                    Landmark = new global::WUProtos.Data.Client.ClientMapLandmark();
                }
                Landmark.MergeFrom(other.Landmark);
                break;

            case TypeOneofCase.PotionIngredient:
                if (PotionIngredient == null)
                {
                    PotionIngredient = new global::WUProtos.Data.Client.ClientMapPotionIngredient();
                }
                PotionIngredient.MergeFrom(other.PotionIngredient);
                break;

            case TypeOneofCase.Weather:
                if (Weather == null)
                {
                    Weather = new global::WUProtos.Data.Client.ClientWeather();
                }
                Weather.MergeFrom(other.Weather);
                break;

            case TypeOneofCase.EnvironmentTags:
                if (EnvironmentTags == null)
                {
                    EnvironmentTags = new global::WUProtos.Data.Client.ClientEnvironmentTags();
                }
                EnvironmentTags.MergeFrom(other.EnvironmentTags);
                break;
            }

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