C# Class Aura.Channel.World.Entities.Creatures.CreatureQuests

Afficher le fichier Open project: aura-project/aura

Méthodes publiques

Méthode Description
Add ( Aura.Channel.World.Quests.Quest quest ) : void

Adds quest to manager and informs the client about it.

AddSilent ( Aura.Channel.World.Quests.Quest quest ) : void

Adds quest to manager, does not update client, send owl, or anything else.

This method is for initialization, use Give during run-time.

Complete ( Aura.Channel.World.Quests.Quest quest, bool owl ) : bool

Completes all objectives and the quest, if it exists, and removes quest from log. Rewards are taken from group 0, result "Perfect", because the objectives are set done.

Complete ( Aura.Channel.World.Quests.Quest quest, int rewardGroup, bool owl ) : bool

Completes quest and takes rewards from group and the result based on the progress on the current or last objective. Primarily used by PTJs.

Complete ( int questId, bool owl ) : bool

Completes and removes first incomplete instance of the given quest, provided that an incomplete one exists.

CreatureQuests ( Creature creature ) : Aura.Channel.Network.Sending

Creates new quest manager for creature.

Dispose ( ) : void

Unsubscribes from events.

Finish ( int questId, string objective ) : bool

Finishes objective for quest, returns false if quest doesn't exist or doesn't have the objective.

Get ( bool>.Func predicate ) : Aura.Channel.World.Quests.Quest

Returns first quest that maches the predicate, or null if there were none.

Get ( long uniqueId ) : Aura.Channel.World.Quests.Quest

Returns quest by unique quest id, or null if it wasn't found.

GetAllIncomplete ( int questId ) : Aura.Channel.World.Quests.Quest[]

Returns all incomplete quests with the given id.

GetFirstIncomplete ( int questId ) : Aura.Channel.World.Quests.Quest

Returns first uncompleted quest with the given quest id, or null if none were found.

GetIncompleteList ( ) : ICollection

Returns new list of incomplete quests in manager.

GetList ( ) : ICollection

Returns new list of all quests in manager.

GetPtjQuest ( ) : Aura.Channel.World.Quests.Quest

Returns current PTJ quest or null.

GetPtjTrackRecord ( PtjType type ) : Aura.Channel.World.Quests.PtjTrackRecord

Returns track record for type.

GetPtjTrackRecords ( ) : Aura.Channel.World.Quests.PtjTrackRecord[]

Returns new list of all track records.

GetQueueOwls ( ) : Aura.Channel.World.Quests.QuestOwl[]

Returns new list with all current quest owls.

GetSafe ( long uniqueId ) : Aura.Channel.World.Quests.Quest

Calls Get(long). If the result is null, throws SevereViolation.

GiveUp ( Aura.Channel.World.Quests.Quest quest ) : bool

Completes and removes quest without rewards, if it exists.

Has ( Aura.Channel.World.Quests.Quest quest ) : bool

Returns true if creature has the given quest.

Has ( int questId ) : bool

Returns true if creature has quest with the given quest id, completed or not.

HasAny ( ) : bool

Returns true if creature has quest with any of the the given quest ids, completed or not.

IsActive ( int questId, string objective = null ) : bool

Returns true if the quest is in progress, optionally also checking if it's on the given objective .

IsComplete ( int id ) : bool

Returns true if quest with the given id has been completed.

ModifyPtjTrackRecord ( PtjType type, int done, int success ) : void

Modifies track record, changing success, done, and last change.

QueueOwl ( int questId, System.DateTime arrival ) : void

Queues an owl to deliver the given quest after arrivel time, when changing regions.

Remove ( Aura.Channel.World.Quests.Quest quest ) : bool

Removes quest from manager and updates client, returns false if quest doesn't exist in this manager.

SendOwl ( int questId ) : void

Sends an owl to deliver a quest scroll for the given quest id to the player.

SendOwl ( int questId, int delay ) : void

Sends an owl to deliver a quest scroll for the given quest id to the player. If delay is not 0, the quest will arrive X seconds later.

SetPtjTrackRecord ( PtjType type, int done, int success ) : void

Sets track record, changing success, done, and last change.

Start ( int questId ) : void

Gives quest scroll for the given quest id to the player.

Private Methods

Méthode Description
EndQuest ( Aura.Channel.World.Quests.Quest quest, int rewardGroup, bool owl ) : bool

Completes and removes quest, if it exists, giving the rewards in the process, if warranted.

GiveRewards ( Aura.Channel.World.Quests.Quest quest, ICollection rewards, bool owl ) : void

Gives quest rewards to creature.

OnOwlTick ( object state ) : void

Called regularly to check for owls to send.

StartByOwl ( int questId ) : void

Gives quest scroll for the given quest id to the player and shows owl arriving.

Method Details

Add() public méthode

Adds quest to manager and informs the client about it.
public Add ( Aura.Channel.World.Quests.Quest quest ) : void
quest Aura.Channel.World.Quests.Quest
Résultat void

AddSilent() public méthode

Adds quest to manager, does not update client, send owl, or anything else.
This method is for initialization, use Give during run-time.
public AddSilent ( Aura.Channel.World.Quests.Quest quest ) : void
quest Aura.Channel.World.Quests.Quest
Résultat void

Complete() public méthode

Completes all objectives and the quest, if it exists, and removes quest from log. Rewards are taken from group 0, result "Perfect", because the objectives are set done.
public Complete ( Aura.Channel.World.Quests.Quest quest, bool owl ) : bool
quest Aura.Channel.World.Quests.Quest
owl bool Show owl delivering the quest?
Résultat bool

Complete() public méthode

Completes quest and takes rewards from group and the result based on the progress on the current or last objective. Primarily used by PTJs.
public Complete ( Aura.Channel.World.Quests.Quest quest, int rewardGroup, bool owl ) : bool
quest Aura.Channel.World.Quests.Quest
rewardGroup int Reward group to use.
owl bool Show owl delivering the quest?
Résultat bool

Complete() public méthode

Completes and removes first incomplete instance of the given quest, provided that an incomplete one exists.
public Complete ( int questId, bool owl ) : bool
questId int
owl bool Show owl delivering the quest?
Résultat bool

CreatureQuests() public méthode

Creates new quest manager for creature.
public CreatureQuests ( Creature creature ) : Aura.Channel.Network.Sending
creature Creature
Résultat Aura.Channel.Network.Sending

Dispose() public méthode

Unsubscribes from events.
public Dispose ( ) : void
Résultat void

Finish() public méthode

Finishes objective for quest, returns false if quest doesn't exist or doesn't have the objective.
public Finish ( int questId, string objective ) : bool
questId int
objective string
Résultat bool

Get() public méthode

Returns first quest that maches the predicate, or null if there were none.
public Get ( bool>.Func predicate ) : Aura.Channel.World.Quests.Quest
predicate bool>.Func
Résultat Aura.Channel.World.Quests.Quest

Get() public méthode

Returns quest by unique quest id, or null if it wasn't found.
public Get ( long uniqueId ) : Aura.Channel.World.Quests.Quest
uniqueId long
Résultat Aura.Channel.World.Quests.Quest

GetAllIncomplete() public méthode

Returns all incomplete quests with the given id.
public GetAllIncomplete ( int questId ) : Aura.Channel.World.Quests.Quest[]
questId int
Résultat Aura.Channel.World.Quests.Quest[]

GetFirstIncomplete() public méthode

Returns first uncompleted quest with the given quest id, or null if none were found.
public GetFirstIncomplete ( int questId ) : Aura.Channel.World.Quests.Quest
questId int
Résultat Aura.Channel.World.Quests.Quest

GetIncompleteList() public méthode

Returns new list of incomplete quests in manager.
public GetIncompleteList ( ) : ICollection
Résultat ICollection

GetList() public méthode

Returns new list of all quests in manager.
public GetList ( ) : ICollection
Résultat ICollection

GetPtjQuest() public méthode

Returns current PTJ quest or null.
public GetPtjQuest ( ) : Aura.Channel.World.Quests.Quest
Résultat Aura.Channel.World.Quests.Quest

GetPtjTrackRecord() public méthode

Returns track record for type.
public GetPtjTrackRecord ( PtjType type ) : Aura.Channel.World.Quests.PtjTrackRecord
type PtjType
Résultat Aura.Channel.World.Quests.PtjTrackRecord

GetPtjTrackRecords() public méthode

Returns new list of all track records.
public GetPtjTrackRecords ( ) : Aura.Channel.World.Quests.PtjTrackRecord[]
Résultat Aura.Channel.World.Quests.PtjTrackRecord[]

GetQueueOwls() public méthode

Returns new list with all current quest owls.
public GetQueueOwls ( ) : Aura.Channel.World.Quests.QuestOwl[]
Résultat Aura.Channel.World.Quests.QuestOwl[]

GetSafe() public méthode

Calls Get(long). If the result is null, throws SevereViolation.
public GetSafe ( long uniqueId ) : Aura.Channel.World.Quests.Quest
uniqueId long
Résultat Aura.Channel.World.Quests.Quest

GiveUp() public méthode

Completes and removes quest without rewards, if it exists.
public GiveUp ( Aura.Channel.World.Quests.Quest quest ) : bool
quest Aura.Channel.World.Quests.Quest
Résultat bool

Has() public méthode

Returns true if creature has the given quest.
public Has ( Aura.Channel.World.Quests.Quest quest ) : bool
quest Aura.Channel.World.Quests.Quest
Résultat bool

Has() public méthode

Returns true if creature has quest with the given quest id, completed or not.
public Has ( int questId ) : bool
questId int
Résultat bool

HasAny() public méthode

Returns true if creature has quest with any of the the given quest ids, completed or not.
public HasAny ( ) : bool
Résultat bool

IsActive() public méthode

Returns true if the quest is in progress, optionally also checking if it's on the given objective .
public IsActive ( int questId, string objective = null ) : bool
questId int
objective string
Résultat bool

IsComplete() public méthode

Returns true if quest with the given id has been completed.
public IsComplete ( int id ) : bool
id int
Résultat bool

ModifyPtjTrackRecord() public méthode

Modifies track record, changing success, done, and last change.
public ModifyPtjTrackRecord ( PtjType type, int done, int success ) : void
type PtjType
done int
success int
Résultat void

QueueOwl() public méthode

Queues an owl to deliver the given quest after arrivel time, when changing regions.
public QueueOwl ( int questId, System.DateTime arrival ) : void
questId int
arrival System.DateTime
Résultat void

Remove() public méthode

Removes quest from manager and updates client, returns false if quest doesn't exist in this manager.
public Remove ( Aura.Channel.World.Quests.Quest quest ) : bool
quest Aura.Channel.World.Quests.Quest
Résultat bool

SendOwl() public méthode

Sends an owl to deliver a quest scroll for the given quest id to the player.
public SendOwl ( int questId ) : void
questId int
Résultat void

SendOwl() public méthode

Sends an owl to deliver a quest scroll for the given quest id to the player. If delay is not 0, the quest will arrive X seconds later.
public SendOwl ( int questId, int delay ) : void
questId int Id of the quest to send.
delay int The delay in seconds.
Résultat void

SetPtjTrackRecord() public méthode

Sets track record, changing success, done, and last change.
public SetPtjTrackRecord ( PtjType type, int done, int success ) : void
type PtjType
done int
success int
Résultat void

Start() public méthode

Gives quest scroll for the given quest id to the player.
public Start ( int questId ) : void
questId int
Résultat void