Esempio n. 1
0
        protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state)
        {
            var input = PlayerCharacter.GetPublicState(character).AppliedInput;

            return((input.MoveModes & CharacterMoveModes.ModifierRun)
                   == CharacterMoveModes.ModifierRun);
        }
Esempio n. 2
0
        protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state)
        {
            var totalTeleportsCount = TeleportsSystem.ServerAllTeleports.Count;

            return(totalTeleportsCount > 0 &&
                   (TeleportsSystem.ServerGetDiscoveredTeleports(character).Count
                    >= totalTeleportsCount));
        }
Esempio n. 3
0
        protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state)
        {
            if (!character.ServerIsOnline ||
                character.TilePosition == CharacterDespawnSystem.ServerGetServiceAreaPosition())
            {
                return(false);
            }

            return(character.Tile.ProtoTile == this.ProtoTile);
        }
Esempio n. 4
0
        protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state)
        {
            if (!character.ServerIsOnline ||
                character.TilePosition == ServerCharacterDeathMechanic.ServerGetGraveyardPosition())
            {
                return(false);
            }

            return(character.Tile.ProtoTile == this.ProtoTile);
        }
Esempio n. 5
0
        protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state)
        {
            var completedCount = 0;
            var techNodes      = character.SharedGetTechnologies().Nodes;

            foreach (var techNode in techNodes)
            {
                if (techNode.Group == this.TechGroup)
                {
                    completedCount++;
                }
            }

            return(completedCount >= this.TechGroup.Nodes.Count);
        }
Esempio n. 6
0
        protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state)
        {
            var unlockedCount = 0;

            var unlockedTechNodes = character.SharedGetTechnologies().Nodes;

            foreach (var techNode in unlockedTechNodes)
            {
                if (ReferenceEquals(techNode.Group, this.TechGroup))
                {
                    unlockedCount++;
                }
            }

            return(unlockedCount >= this.TechGroup.Nodes.Count);
        }
Esempio n. 7
0
        /// <summary>
        /// The completionist page is completed when it has all entries claimed by player
        /// and the number of added entries matches the max number of entries for the page.
        /// </summary>
        protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state)
        {
            var completionistData = CompletionistSystem.SharedGetCompletionistData(character);

            foreach (var abstractEntry in completionistData.GetPageEntries(this.CompletionistPage))
            {
                var entry = ((ICompletionistDataEntry)abstractEntry);
                if (!ReferenceEquals(entry.Prototype, this.EntryProtoEntity))
                {
                    continue;
                }

                return(!this.IsRewardClaimRequired ||
                       entry.IsRewardClaimed);
            }

            return(false);
        }
Esempio n. 8
0
        /// <summary>
        /// The completionist page is completed when it has all entries claimed by player
        /// and the number of added entries matches the max number of entries for the page.
        /// </summary>
        protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state)
        {
            var completionistData = CompletionistSystem.SharedGetCompletionistData(character);

            var claimedEntriesCount = 0;

            foreach (var entry in completionistData.GetPageEntries(this.CompletionistPage))
            {
                if (!((ICompletionistDataEntry)entry).IsRewardClaimed)
                {
                    // has an unclaimed entry
                    return(false);
                }

                claimedEntriesCount++;
            }

            return(claimedEntriesCount >= CompletionistSystem.GetPageTotalEntriesNumber(this.CompletionistPage));
        }
        /// <summary>
        /// The completionist page is completed when it has all entries claimed by player
        /// and the number of added entries matches the max number of entries for the page.
        /// </summary>
        protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state)
        {
            var         completionistData = CompletionistSystem.SharedGetCompletionistData(character);
            IEnumerable pageEntries       = this.CompletionistPage switch
            {
                CompletionistPageName.Food => completionistData.ListFood,
                CompletionistPageName.Creatures => completionistData.ListMobs,
                CompletionistPageName.Loot => completionistData.ListLoot,
                CompletionistPageName.Fish => completionistData.ListFish,
                _ => throw new ArgumentOutOfRangeException()
            };

            var claimedEntriesCount = 0;

            foreach (var entry in pageEntries)
            {
                if (!((ICompletionistDataEntry)entry).IsRewardClaimed)
                {
                    // has an unclaimed entry
                    return(false);
                }

                claimedEntriesCount++;
            }

            var requiredPageEntriesCount = this.CompletionistPage switch
            {
                CompletionistPageName.Food => CompletionistSystem.CompletionistAllFood.Count,
                CompletionistPageName.Creatures => CompletionistSystem.CompletionistAllMobs.Count,
                CompletionistPageName.Loot => CompletionistSystem.CompletionistAllLoot.Count,
                CompletionistPageName.Fish => CompletionistSystem.CompletionistAllFish.Count,
                _ => throw new ArgumentOutOfRangeException()
            };

            return(claimedEntriesCount >= requiredPageEntriesCount);
        }
Esempio n. 10
0
 protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state)
 {
     return(character.SharedGetTechnologies()
            .SharedIsNodeUnlocked(this.TechNode));
 }
 protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state)
 {
     // cannot complete on its own, player should perform an action
     return(false);
 }
Esempio n. 12
0
 protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state)
 {
     return(this.ProtoZone
            .ServerZoneInstance
            .IsContainsPosition(character.TilePosition));
 }
Esempio n. 13
0
 protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state)
 {
     return(character.Tile.ProtoTile == this.ProtoTile);
 }
Esempio n. 14
0
 protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state)
 {
     return(character.SharedGetQuests()
            .SharedHasCompletedQuest(this.Quest));
 }
Esempio n. 15
0
 protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state)
 {
     return(character.SharedHasSkill(this.Skill, this.MinLevel));
 }
Esempio n. 16
0
 protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state)
 {
     // never refreshed by the server
     return(false);
 }