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); }
public void MergeFrom(VaultItem other) { if (other == null) { return; } if (other.Id.Length != 0) { Id = other.Id; } if (other.Cap != 0L) { Cap = other.Cap; } if (other.RelativeValue != 0) { RelativeValue = other.RelativeValue; } if (other.VaultCategoryGmtId.Length != 0) { VaultCategoryGmtId = other.VaultCategoryGmtId; } switch (other.VaultItemTypeCase) { case VaultItemTypeOneofCase.CurrencyItem: if (CurrencyItem == null) { CurrencyItem = new global::WUProtos.Data.CurrencyVaultItem(); } CurrencyItem.MergeFrom(other.CurrencyItem); break; case VaultItemTypeOneofCase.StaminaItem: if (StaminaItem == null) { StaminaItem = new global::WUProtos.Data.StaminaVaultItem(); } StaminaItem.MergeFrom(other.StaminaItem); break; case VaultItemTypeOneofCase.DetectorItem: if (DetectorItem == null) { DetectorItem = new global::WUProtos.Data.DarkDetectorVaultItem(); } DetectorItem.MergeFrom(other.DetectorItem); break; case VaultItemTypeOneofCase.ContainerItem: if (ContainerItem == null) { ContainerItem = new global::WUProtos.Data.ContainerVaultItem(); } ContainerItem.MergeFrom(other.ContainerItem); break; case VaultItemTypeOneofCase.RunestoneItem: if (RunestoneItem == null) { RunestoneItem = new global::WUProtos.Data.RunestoneVaultItem(); } RunestoneItem.MergeFrom(other.RunestoneItem); break; case VaultItemTypeOneofCase.PotionItem: if (PotionItem == null) { PotionItem = new global::WUProtos.Data.Potion.PotionVaultItem(); } PotionItem.MergeFrom(other.PotionItem); break; case VaultItemTypeOneofCase.PotionIngredient: if (PotionIngredient == null) { PotionIngredient = new global::WUProtos.Data.Potion.PotionIngredientVaultItem(); } PotionIngredient.MergeFrom(other.PotionIngredient); break; case VaultItemTypeOneofCase.EnergyItem: if (EnergyItem == null) { EnergyItem = new global::WUProtos.Data.EnergyVaultItem(); } EnergyItem.MergeFrom(other.EnergyItem); break; case VaultItemTypeOneofCase.CauldronTimeItem: if (CauldronTimeItem == null) { CauldronTimeItem = new global::WUProtos.Data.CauldronTimeItem(); } CauldronTimeItem.MergeFrom(other.CauldronTimeItem); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }