Ejemplo n.º 1
0
 public void MergeFrom(ActivityLevelRulePB other)
 {
     if (other == null)
     {
         return;
     }
     if (other.ActivityId != 0)
     {
         ActivityId = other.ActivityId;
     }
     if (other.LevelId != 0)
     {
         LevelId = other.LevelId;
     }
     if (other.BeforeLevelId != 0)
     {
         BeforeLevelId = other.BeforeLevelId;
     }
     if (other.AfterLevelId != 0)
     {
         AfterLevelId = other.AfterLevelId;
     }
     if (other.Type != 0)
     {
         Type = other.Type;
     }
     abilities_.Add(other.abilities_);
     itemMax_.Add(other.itemMax_);
     fansMax_.Add(other.fansMax_);
     if (other.Max != 0)
     {
         Max = other.Max;
     }
     eventId_.Add(other.eventId_);
     starSource_.Add(other.starSource_);
     awards_.Add(other.awards_);
     if (other.GameType != 0)
     {
         GameType = other.GameType;
     }
     if (other.LevelInfoId != 0)
     {
         LevelInfoId = other.LevelInfoId;
     }
     if (other.ChapterGroup != 0)
     {
         ChapterGroup = other.ChapterGroup;
     }
     if (other.LevelMark.Length != 0)
     {
         LevelMark = other.LevelMark;
     }
     levelPlot_.Add(other.levelPlot_);
     levelCoordinate_.Add(other.levelCoordinate_);
     levelBackdrop_.Add(other.levelBackdrop_);
     if (other.levelExtra_ != null)
     {
         if (levelExtra_ == null)
         {
             levelExtra_ = new global::Com.Proto.LevelExtraPB();
         }
         LevelExtra.MergeFrom(other.LevelExtra);
     }
     if (other.Count != 0)
     {
         Count = other.Count;
     }
 }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ActivityId != 0)
            {
                hash ^= ActivityId.GetHashCode();
            }
            if (LevelId != 0)
            {
                hash ^= LevelId.GetHashCode();
            }
            if (BeforeLevelId != 0)
            {
                hash ^= BeforeLevelId.GetHashCode();
            }
            if (AfterLevelId != 0)
            {
                hash ^= AfterLevelId.GetHashCode();
            }
            if (Type != 0)
            {
                hash ^= Type.GetHashCode();
            }
            hash ^= abilities_.GetHashCode();
            hash ^= ItemMax.GetHashCode();
            hash ^= FansMax.GetHashCode();
            if (Max != 0)
            {
                hash ^= Max.GetHashCode();
            }
            hash ^= eventId_.GetHashCode();
            hash ^= StarSource.GetHashCode();
            hash ^= awards_.GetHashCode();
            if (GameType != 0)
            {
                hash ^= GameType.GetHashCode();
            }
            if (LevelInfoId != 0)
            {
                hash ^= LevelInfoId.GetHashCode();
            }
            if (ChapterGroup != 0)
            {
                hash ^= ChapterGroup.GetHashCode();
            }
            if (LevelMark.Length != 0)
            {
                hash ^= LevelMark.GetHashCode();
            }
            hash ^= LevelPlot.GetHashCode();
            hash ^= levelCoordinate_.GetHashCode();
            hash ^= levelBackdrop_.GetHashCode();
            if (levelExtra_ != null)
            {
                hash ^= LevelExtra.GetHashCode();
            }
            if (Count != 0)
            {
                hash ^= Count.GetHashCode();
            }
            return(hash);
        }