Ejemplo n.º 1
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);
        }
Ejemplo n.º 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.Client.ClientMapPoi subBuilder = new global::WUProtos.Data.Client.ClientMapPoi();
                    if (typeCase_ == TypeOneofCase.Poi)
                    {
                        subBuilder.MergeFrom(Poi);
                    }
                    input.ReadMessage(subBuilder);
                    Poi = subBuilder;
                    break;
                }

                case 18: {
                    global::WUProtos.Data.Client.ClientMapTrace subBuilder = new global::WUProtos.Data.Client.ClientMapTrace();
                    if (typeCase_ == TypeOneofCase.Trace)
                    {
                        subBuilder.MergeFrom(Trace);
                    }
                    input.ReadMessage(subBuilder);
                    Trace = subBuilder;
                    break;
                }

                case 26: {
                    global::WUProtos.Data.Client.ClientMapLandmark subBuilder = new global::WUProtos.Data.Client.ClientMapLandmark();
                    if (typeCase_ == TypeOneofCase.Landmark)
                    {
                        subBuilder.MergeFrom(Landmark);
                    }
                    input.ReadMessage(subBuilder);
                    Landmark = subBuilder;
                    break;
                }

                case 34: {
                    global::WUProtos.Data.Client.ClientMapPotionIngredient subBuilder = new global::WUProtos.Data.Client.ClientMapPotionIngredient();
                    if (typeCase_ == TypeOneofCase.PotionIngredient)
                    {
                        subBuilder.MergeFrom(PotionIngredient);
                    }
                    input.ReadMessage(subBuilder);
                    PotionIngredient = subBuilder;
                    break;
                }

                case 42: {
                    global::WUProtos.Data.Client.ClientWeather subBuilder = new global::WUProtos.Data.Client.ClientWeather();
                    if (typeCase_ == TypeOneofCase.Weather)
                    {
                        subBuilder.MergeFrom(Weather);
                    }
                    input.ReadMessage(subBuilder);
                    Weather = subBuilder;
                    break;
                }

                case 50: {
                    global::WUProtos.Data.Client.ClientEnvironmentTags subBuilder = new global::WUProtos.Data.Client.ClientEnvironmentTags();
                    if (typeCase_ == TypeOneofCase.EnvironmentTags)
                    {
                        subBuilder.MergeFrom(EnvironmentTags);
                    }
                    input.ReadMessage(subBuilder);
                    EnvironmentTags = subBuilder;
                    break;
                }
                }
            }
        }