User quest class. Quests are described in detail in Quests article.

Fields

read only id:Int

Quest ID.

read only isDaily:Bool

If set to true, this is a daily quest.

read only quest:QuestCore

Quest structure.

Methods

dump ():Dynamic

Stores user quest data into an anonymous object for client response.

Returns:

Anonymous object with user quest parameters.

getInt (name:String):Int

Returns current value of quest variable as Int.

Parameters:

name

Variable name.

Returns:

Variable value. Returns 0, if variable is not found.

inline increaseVar (name:String, amount:Int):Void

Increases quest variable by a given value. Does not take variable type into account, so do not define quest variables with the same name.

Parameters:

name

Variable name.

amount

Amount to increase by.

setVar (name:String, val:Dynamic, ?isInit:Bool):Void

Sets quest variable to a given value.

Parameters:

name

Variable name.

val

Variable value.

isInit

Used when called from init() method to skip marking block as updated. Do not use.

timerCompleted ():Bool

Returns whether completion timer is over for this quest.

Returns:

True, when the timer is over.