C# Class Aura.Channel.Skills.Life.Cooking

Inheritance: IPreparable, ICompletable, IInitiableSkillHandler
Afficher le fichier Open project: aura-project/aura

Méthodes publiques

Méthode Description
Complete ( Creature creature, Skill skill, Packet packet ) : void

Completes skill, creating the item.

GetTime ( string method ) : int
Init ( ) : void

Sets up subscriptions required for skill training.

Prepare ( Creature creature, Skill skill, Packet packet ) : bool

Prepares skill, specifying the ingredients.

Private Methods

Méthode Description
CheckProp ( Creature creature, string method, long propEntityId ) : bool

Checks prop for method, returns true if everything is in order.

CheckRank ( Creature creature, string method, SkillRank skillRank ) : bool

Checks rank for method, returns true if everything is in order.

CheckTools ( Creature creature, string method ) : bool

Checks tools for method, returns true if everything is in order.

GetRating ( int val ) : Rating

Returns star rating based on quality.

JudgeQuality ( RecipeData recipe, List ingredients ) : Judgement

Calculates quality based on recipe and ingredients.

The formula used in this method is unofficial. While it does feel very similar in some test cases, it could potentially create very different results. Officials also RNG the results, which this method currently does not. The Help fields in the return value specify a tip on what went wrong with the cooking attempt, if certain requirements are fulfilled. In that case it will set the item to the item in question, and the amount to the amount the ingredient differed from the recipe. If the value is lower than 0, it was less, if it's greater, it was more. If no helpful tip could be found, item is null.

OnPlayerUsesItem ( Creature creature, Item item ) : void

Handles part of the skill training.

OnSuccessfulCooking ( Creature creature, Skill skill, string method, Item item, Rating rating ) : void

Handles part of the skill training.

Method Details

Complete() public méthode

Completes skill, creating the item.
public Complete ( Creature creature, Skill skill, Packet packet ) : void
creature Aura.Channel.World.Entities.Creature
skill Skill
packet Packet
Résultat void

GetTime() public méthode

public GetTime ( string method ) : int
method string
Résultat int

Init() public méthode

Sets up subscriptions required for skill training.
public Init ( ) : void
Résultat void

Prepare() public méthode

Prepares skill, specifying the ingredients.
public Prepare ( Creature creature, Skill skill, Packet packet ) : bool
creature Aura.Channel.World.Entities.Creature
skill Skill
packet Packet
Résultat bool