C# Класс Aura.Channel.Skills.Life.Cooking

Наследование: IPreparable, ICompletable, IInitiableSkillHandler
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

Complete() публичный Метод

Completes skill, creating the item.
public Complete ( Creature creature, Skill skill, Packet packet ) : void
creature Aura.Channel.World.Entities.Creature
skill Skill
packet Packet
Результат void

GetTime() публичный Метод

public GetTime ( string method ) : int
method string
Результат int

Init() публичный Метод

Sets up subscriptions required for skill training.
public Init ( ) : void
Результат void

Prepare() публичный Метод

Prepares skill, specifying the ingredients.
public Prepare ( Creature creature, Skill skill, Packet packet ) : bool
creature Aura.Channel.World.Entities.Creature
skill Skill
packet Packet
Результат bool