Beispiel #1
0
 public void MergeFrom(FortData other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id.Length != 0)
     {
         Id = other.Id;
     }
     if (other.LastModifiedTimestampMs != 0L)
     {
         LastModifiedTimestampMs = other.LastModifiedTimestampMs;
     }
     if (other.Latitude != 0D)
     {
         Latitude = other.Latitude;
     }
     if (other.Longitude != 0D)
     {
         Longitude = other.Longitude;
     }
     if (other.OwnedByTeam != 0)
     {
         OwnedByTeam = other.OwnedByTeam;
     }
     if (other.GuardPokemonId != 0)
     {
         GuardPokemonId = other.GuardPokemonId;
     }
     if (other.GuardPokemonCp != 0)
     {
         GuardPokemonCp = other.GuardPokemonCp;
     }
     if (other.Enabled != false)
     {
         Enabled = other.Enabled;
     }
     if (other.Type != 0)
     {
         Type = other.Type;
     }
     if (other.GymPoints != 0L)
     {
         GymPoints = other.GymPoints;
     }
     if (other.IsInBattle != false)
     {
         IsInBattle = other.IsInBattle;
     }
     activeFortModifier_.Add(other.activeFortModifier_);
     if (other.lureInfo_ != null)
     {
         if (lureInfo_ == null)
         {
             lureInfo_ = new global::POGOProtos.Map.Fort.FortLureInfo();
         }
         LureInfo.MergeFrom(other.LureInfo);
     }
     if (other.CooldownCompleteTimestampMs != 0L)
     {
         CooldownCompleteTimestampMs = other.CooldownCompleteTimestampMs;
     }
     if (other.Sponsor != 0)
     {
         Sponsor = other.Sponsor;
     }
     if (other.RenderingType != 0)
     {
         RenderingType = other.RenderingType;
     }
     if (other.DeployLockoutEndMs != 0L)
     {
         DeployLockoutEndMs = other.DeployLockoutEndMs;
     }
     if (other.guardPokemonDisplay_ != null)
     {
         if (guardPokemonDisplay_ == null)
         {
             guardPokemonDisplay_ = new global::POGOProtos.Data.PokemonDisplay();
         }
         GuardPokemonDisplay.MergeFrom(other.GuardPokemonDisplay);
     }
     if (other.Closed != false)
     {
         Closed = other.Closed;
     }
     if (other.raidInfo_ != null)
     {
         if (raidInfo_ == null)
         {
             raidInfo_ = new global::POGOProtos.Data.Raid.RaidInfo();
         }
         RaidInfo.MergeFrom(other.RaidInfo);
     }
     if (other.gymDisplay_ != null)
     {
         if (gymDisplay_ == null)
         {
             gymDisplay_ = new global::POGOProtos.Map.Fort.GymDisplay();
         }
         GymDisplay.MergeFrom(other.GymDisplay);
     }
     if (other.Visited != false)
     {
         Visited = other.Visited;
     }
     if (other.SameTeamDeployLockoutEndMs != 0L)
     {
         SameTeamDeployLockoutEndMs = other.SameTeamDeployLockoutEndMs;
     }
     if (other.AllowCheckin != false)
     {
         AllowCheckin = other.AllowCheckin;
     }
     if (other.ImageUrl.Length != 0)
     {
         ImageUrl = other.ImageUrl;
     }
     if (other.InEvent != false)
     {
         InEvent = other.InEvent;
     }
     if (other.BannerUrl.Length != 0)
     {
         BannerUrl = other.BannerUrl;
     }
 }