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

Exibir arquivo Open project: aura-project/aura

Public Methods

Method 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

Method 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 method

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
return void

AddSilent() public method

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
return void

Complete() public method

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?
return bool

Complete() public method

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?
return bool

Complete() public method

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?
return bool

CreatureQuests() public method

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

Dispose() public method

Unsubscribes from events.
public Dispose ( ) : void
return void

Finish() public method

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
return bool

Get() public method

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
return Aura.Channel.World.Quests.Quest

Get() public method

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

GetAllIncomplete() public method

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

GetFirstIncomplete() public method

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
return Aura.Channel.World.Quests.Quest

GetIncompleteList() public method

Returns new list of incomplete quests in manager.
public GetIncompleteList ( ) : ICollection
return ICollection

GetList() public method

Returns new list of all quests in manager.
public GetList ( ) : ICollection
return ICollection

GetPtjQuest() public method

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

GetPtjTrackRecord() public method

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

GetPtjTrackRecords() public method

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

GetQueueOwls() public method

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

GetSafe() public method

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

GiveUp() public method

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

Has() public method

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

Has() public method

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

HasAny() public method

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

IsActive() public method

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
return bool

IsComplete() public method

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

ModifyPtjTrackRecord() public method

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

QueueOwl() public method

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
return void

Remove() public method

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
return bool

SendOwl() public method

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

SendOwl() public method

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.
return void

SetPtjTrackRecord() public method

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

Start() public method

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