User quest chains. UserCore subclass. Quests are described in detail in Quests article.

Constructor

Methods

canReceiveNext (chain:ChainCore):Bool

Returns true, if user can receive next quest from this chain.

Parameters:

chain

Quest chain.

Returns:

True, if user can receive next quest. False otherwise.

get (chainid:Int):Int

Returns current quest ID of chain.

Parameters:

chainid

Chain ID.

Returns:

Current quest ID for this chain. Returns -1, if chain is finished or is repeatable and currently on timeout.

receiveNext (chain:ChainCore):UserQuestCore

Receives next quest in that chain. All checks are made in separate UserChainsCore.canReceiveNext() call, this method does not do any.

Parameters:

chain

Chain.

Returns:

New user quest instance. Returns null, if chain is completed or if user already has that quest.

set (chainid:Int, questid:Int):Void

Sets current quest ID of chain.

Parameters:

chainid

Chain ID.

questid

Quest ID. If it equals -1, the chain will be finished. Repeatable chain sets the repeat timeout.