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

            if (TimestampMs != 0L)
            {
                hash ^= TimestampMs.GetHashCode();
            }
            if (Sfida != false)
            {
                hash ^= Sfida.GetHashCode();
            }
            if (actionCase_ == ActionOneofCase.CatchPokemon)
            {
                hash ^= CatchPokemon.GetHashCode();
            }
            if (actionCase_ == ActionOneofCase.FortSearch)
            {
                hash ^= FortSearch.GetHashCode();
            }
            if (actionCase_ == ActionOneofCase.BuddyPokemon)
            {
                hash ^= BuddyPokemon.GetHashCode();
            }
            if (actionCase_ == ActionOneofCase.RaidRewards)
            {
                hash ^= RaidRewards.GetHashCode();
            }
            if (actionCase_ == ActionOneofCase.PasscodeRewards)
            {
                hash ^= PasscodeRewards.GetHashCode();
            }
            hash ^= (int)actionCase_;
            return(hash);
        }
Ejemplo n.º 2
0
        public void ProcessPathTest(int totalPokemon, string path)
        {
            Debug.WriteLine(totalPokemon);
            int result = CatchPokemon.ProcessPath(path);

            Debug.WriteLine(result);
            Assert.AreEqual(totalPokemon, result);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (TimestampMs != 0L)
            {
                hash ^= TimestampMs.GetHashCode();
            }
            if (Sfida != false)
            {
                hash ^= Sfida.GetHashCode();
            }
            if (actionCase_ == ActionOneofCase.CatchPokemon)
            {
                hash ^= CatchPokemon.GetHashCode();
            }
            if (actionCase_ == ActionOneofCase.FortSearch)
            {
                hash ^= FortSearch.GetHashCode();
            }
            if (actionCase_ == ActionOneofCase.BuddyPokemon)
            {
                hash ^= BuddyPokemon.GetHashCode();
            }
            if (actionCase_ == ActionOneofCase.RaidRewards)
            {
                hash ^= RaidRewards.GetHashCode();
            }
            if (actionCase_ == ActionOneofCase.PasscodeRewards)
            {
                hash ^= PasscodeRewards.GetHashCode();
            }
            if (actionCase_ == ActionOneofCase.CompleteQuest)
            {
                hash ^= CompleteQuest.GetHashCode();
            }
            if (actionCase_ == ActionOneofCase.CompleteQuestStampCard)
            {
                hash ^= CompleteQuestStampCard.GetHashCode();
            }
            if (actionCase_ == ActionOneofCase.CompleteQuestPokemonEncounter)
            {
                hash ^= CompleteQuestPokemonEncounter.GetHashCode();
            }
            hash ^= (int)actionCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public void MergeFrom(ActionLogEntry other)
        {
            if (other == null)
            {
                return;
            }
            if (other.TimestampMs != 0L)
            {
                TimestampMs = other.TimestampMs;
            }
            if (other.Sfida != false)
            {
                Sfida = other.Sfida;
            }
            switch (other.ActionCase)
            {
            case ActionOneofCase.CatchPokemon:
                if (CatchPokemon == null)
                {
                    CatchPokemon = new global::POGOProtos.Data.Logs.CatchPokemonLogEntry();
                }
                CatchPokemon.MergeFrom(other.CatchPokemon);
                break;

            case ActionOneofCase.FortSearch:
                if (FortSearch == null)
                {
                    FortSearch = new global::POGOProtos.Data.Logs.FortSearchLogEntry();
                }
                FortSearch.MergeFrom(other.FortSearch);
                break;

            case ActionOneofCase.BuddyPokemon:
                if (BuddyPokemon == null)
                {
                    BuddyPokemon = new global::POGOProtos.Data.Logs.BuddyPokemonLogEntry();
                }
                BuddyPokemon.MergeFrom(other.BuddyPokemon);
                break;

            case ActionOneofCase.RaidRewards:
                if (RaidRewards == null)
                {
                    RaidRewards = new global::POGOProtos.Data.Logs.RaidRewardsLogEntry();
                }
                RaidRewards.MergeFrom(other.RaidRewards);
                break;

            case ActionOneofCase.PasscodeRewards:
                if (PasscodeRewards == null)
                {
                    PasscodeRewards = new global::POGOProtos.Data.Logs.PasscodeRewardsLogEntry();
                }
                PasscodeRewards.MergeFrom(other.PasscodeRewards);
                break;

            case ActionOneofCase.CompleteQuest:
                if (CompleteQuest == null)
                {
                    CompleteQuest = new global::POGOProtos.Data.Logs.CompleteQuestLogEntry();
                }
                CompleteQuest.MergeFrom(other.CompleteQuest);
                break;

            case ActionOneofCase.CompleteQuestStampCard:
                if (CompleteQuestStampCard == null)
                {
                    CompleteQuestStampCard = new global::POGOProtos.Data.Logs.CompleteQuestStampCardLogEntry();
                }
                CompleteQuestStampCard.MergeFrom(other.CompleteQuestStampCard);
                break;

            case ActionOneofCase.CompleteQuestPokemonEncounter:
                if (CompleteQuestPokemonEncounter == null)
                {
                    CompleteQuestPokemonEncounter = new global::POGOProtos.Data.Logs.CompleteQuestPokemonEncounterLogEntry();
                }
                CompleteQuestPokemonEncounter.MergeFrom(other.CompleteQuestPokemonEncounter);
                break;

            case ActionOneofCase.OpenGift:
                if (OpenGift == null)
                {
                    OpenGift = new global::POGOProtos.Data.Logs.OpenGiftLogEntry();
                }
                OpenGift.MergeFrom(other.OpenGift);
                break;

            case ActionOneofCase.SendGift:
                if (SendGift == null)
                {
                    SendGift = new global::POGOProtos.Data.Logs.SendGiftLogEntry();
                }
                SendGift.MergeFrom(other.SendGift);
                break;

            case ActionOneofCase.Trading:
                if (Trading == null)
                {
                    Trading = new global::POGOProtos.Data.Logs.TradingLogEntry();
                }
                Trading.MergeFrom(other.Trading);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Ejemplo n.º 5
0
 public void MergeFrom(Quest other)
 {
     if (other == null)
     {
         return;
     }
     if (other.QuestType != 0)
     {
         QuestType = other.QuestType;
     }
     if (other.dailyQuest_ != null)
     {
         if (dailyQuest_ == null)
         {
             dailyQuest_ = new global::POGOProtos.Data.Quests.DailyQuest();
         }
         DailyQuest.MergeFrom(other.DailyQuest);
     }
     if (other.multiPart_ != null)
     {
         if (multiPart_ == null)
         {
             multiPart_ = new global::POGOProtos.Data.Quests.Quest.Types.MultiPartQuest();
         }
         MultiPart.MergeFrom(other.MultiPart);
     }
     if (other.catchPokemon_ != null)
     {
         if (catchPokemon_ == null)
         {
             catchPokemon_ = new global::POGOProtos.Data.Quests.CatchPokemonQuest();
         }
         CatchPokemon.MergeFrom(other.CatchPokemon);
     }
     if (other.addFriend_ != null)
     {
         if (addFriend_ == null)
         {
             addFriend_ = new global::POGOProtos.Data.Quests.AddFriendQuest();
         }
         AddFriend.MergeFrom(other.AddFriend);
     }
     if (other.tradePokemon_ != null)
     {
         if (tradePokemon_ == null)
         {
             tradePokemon_ = new global::POGOProtos.Data.Quests.TradePokemonQuest();
         }
         TradePokemon.MergeFrom(other.TradePokemon);
     }
     if (other.QuestId.Length != 0)
     {
         QuestId = other.QuestId;
     }
     if (other.QuestSeed != 0L)
     {
         QuestSeed = other.QuestSeed;
     }
     if (other.QuestContext != 0)
     {
         QuestContext = other.QuestContext;
     }
     if (other.TemplateId.Length != 0)
     {
         TemplateId = other.TemplateId;
     }
     if (other.Progress != 0)
     {
         Progress = other.Progress;
     }
     if (other.goal_ != null)
     {
         if (goal_ == null)
         {
             goal_ = new global::POGOProtos.Data.Quests.QuestGoal();
         }
         Goal.MergeFrom(other.Goal);
     }
     if (other.Status != 0)
     {
         Status = other.Status;
     }
     questRewards_.Add(other.questRewards_);
     if (other.CreationTimestampMs != 0L)
     {
         CreationTimestampMs = other.CreationTimestampMs;
     }
     if (other.LastUpdateTimestampMs != 0L)
     {
         LastUpdateTimestampMs = other.LastUpdateTimestampMs;
     }
     if (other.CompeletionTimestampMs != 0L)
     {
         CompeletionTimestampMs = other.CompeletionTimestampMs;
     }
     if (other.FortId.Length != 0)
     {
         FortId = other.FortId;
     }
     if (other.AdminGenerated != false)
     {
         AdminGenerated = other.AdminGenerated;
     }
     if (other.StampCountOverrideEnabled != false)
     {
         StampCountOverrideEnabled = other.StampCountOverrideEnabled;
     }
     if (other.StampCountOverride != 0)
     {
         StampCountOverride = other.StampCountOverride;
     }
     if (other.S2CellId != 0L)
     {
         S2CellId = other.S2CellId;
     }
     if (other.StoryQuestTemplateVersion != 0)
     {
         StoryQuestTemplateVersion = other.StoryQuestTemplateVersion;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Ejemplo n.º 6
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (QuestType != 0)
            {
                hash ^= QuestType.GetHashCode();
            }
            if (dailyQuest_ != null)
            {
                hash ^= DailyQuest.GetHashCode();
            }
            if (multiPart_ != null)
            {
                hash ^= MultiPart.GetHashCode();
            }
            if (catchPokemon_ != null)
            {
                hash ^= CatchPokemon.GetHashCode();
            }
            if (addFriend_ != null)
            {
                hash ^= AddFriend.GetHashCode();
            }
            if (tradePokemon_ != null)
            {
                hash ^= TradePokemon.GetHashCode();
            }
            if (QuestId.Length != 0)
            {
                hash ^= QuestId.GetHashCode();
            }
            if (QuestSeed != 0L)
            {
                hash ^= QuestSeed.GetHashCode();
            }
            if (QuestContext != 0)
            {
                hash ^= QuestContext.GetHashCode();
            }
            if (TemplateId.Length != 0)
            {
                hash ^= TemplateId.GetHashCode();
            }
            if (Progress != 0)
            {
                hash ^= Progress.GetHashCode();
            }
            if (goal_ != null)
            {
                hash ^= Goal.GetHashCode();
            }
            if (Status != 0)
            {
                hash ^= Status.GetHashCode();
            }
            hash ^= questRewards_.GetHashCode();
            if (CreationTimestampMs != 0L)
            {
                hash ^= CreationTimestampMs.GetHashCode();
            }
            if (LastUpdateTimestampMs != 0L)
            {
                hash ^= LastUpdateTimestampMs.GetHashCode();
            }
            if (CompeletionTimestampMs != 0L)
            {
                hash ^= CompeletionTimestampMs.GetHashCode();
            }
            if (FortId.Length != 0)
            {
                hash ^= FortId.GetHashCode();
            }
            if (AdminGenerated != false)
            {
                hash ^= AdminGenerated.GetHashCode();
            }
            if (StampCountOverrideEnabled != false)
            {
                hash ^= StampCountOverrideEnabled.GetHashCode();
            }
            if (StampCountOverride != 0)
            {
                hash ^= StampCountOverride.GetHashCode();
            }
            if (S2CellId != 0L)
            {
                hash ^= S2CellId.GetHashCode();
            }
            if (StoryQuestTemplateVersion != 0)
            {
                hash ^= StoryQuestTemplateVersion.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }