protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state) { var input = PlayerCharacter.GetPublicState(character).AppliedInput; return((input.MoveModes & CharacterMoveModes.ModifierRun) == CharacterMoveModes.ModifierRun); }
protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state) { var totalTeleportsCount = TeleportsSystem.ServerAllTeleports.Count; return(totalTeleportsCount > 0 && (TeleportsSystem.ServerGetDiscoveredTeleports(character).Count >= totalTeleportsCount)); }
protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state) { if (!character.ServerIsOnline || character.TilePosition == CharacterDespawnSystem.ServerGetServiceAreaPosition()) { return(false); } return(character.Tile.ProtoTile == this.ProtoTile); }
protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state) { if (!character.ServerIsOnline || character.TilePosition == ServerCharacterDeathMechanic.ServerGetGraveyardPosition()) { return(false); } return(character.Tile.ProtoTile == this.ProtoTile); }
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); }
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); }
/// <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); }
/// <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); }
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); }
protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state) { return(this.ProtoZone .ServerZoneInstance .IsContainsPosition(character.TilePosition)); }
protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state) { return(character.Tile.ProtoTile == this.ProtoTile); }
protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state) { return(character.SharedGetQuests() .SharedHasCompletedQuest(this.Quest)); }
protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state) { return(character.SharedHasSkill(this.Skill, this.MinLevel)); }
protected override bool ServerIsCompleted(ICharacter character, PlayerTaskState state) { // never refreshed by the server return(false); }