C# Class Aura.Channel.Skills.Base.ProductionSkill

Base class for production skills, like Handicraft and Weaving.
Starting production calls Prepare, once the creation process is done, Complete is called. There is no way to cancel the skill once Prepare was called. While the client tells us how many items are gonna be produced, it Prepares the skill again and again, so we must only create one product at a time.
Inheritance: IPreparable, ICompletable
Afficher le fichier Open project: aura-project/aura

Méthodes publiques

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

Completes production.

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

Starts production, finished in Complete.

Méthodes protégées

Méthode Description
CheckCategory ( Creature creature, ProductionCategory category ) : bool

Checks if category can be handled by this skill, returns false if not.

CheckProp ( Creature creature, long propEntityId ) : bool

Checks if prop is valid and in range, returns false if not.

CheckTools ( Creature creature, Skill skill, ProductionData productData ) : bool

Checks tools from Prepare, to maybe cancel skill.

OnUse ( Creature creature, Skill skill ) : void

Called from successful Prepare.

SkillTraining ( Creature creature, Skill skill, ProductionData data, bool success ) : void

Handles skill training.

UpdateTool ( Creature creature, ProductionData productData ) : void

Updates tool's durability and proficiency.

Private Methods

Méthode Description
CheckMana ( Creature creature, ProductionData productData ) : bool

Checks if creature has enough mana to produce product, returns false if not. Handles notices.

Method Details

CheckCategory() protected abstract méthode

Checks if category can be handled by this skill, returns false if not.
protected abstract CheckCategory ( Creature creature, ProductionCategory category ) : bool
creature Aura.Channel.World.Entities.Creature
category ProductionCategory
Résultat bool

CheckProp() protected méthode

Checks if prop is valid and in range, returns false if not.
protected CheckProp ( Creature creature, long propEntityId ) : bool
creature Aura.Channel.World.Entities.Creature
propEntityId long
Résultat bool

CheckTools() protected méthode

Checks tools from Prepare, to maybe cancel skill.
protected CheckTools ( Creature creature, Skill skill, ProductionData productData ) : bool
creature Aura.Channel.World.Entities.Creature
skill Skill
productData ProductionData
Résultat bool

Complete() public méthode

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

OnUse() protected méthode

Called from successful Prepare.
protected OnUse ( Creature creature, Skill skill ) : void
creature Aura.Channel.World.Entities.Creature
skill Skill
Résultat void

Prepare() public méthode

Starts production, finished in Complete.
public Prepare ( Creature creature, Skill skill, Packet packet ) : bool
creature Aura.Channel.World.Entities.Creature
skill Skill
packet Packet
Résultat bool

SkillTraining() protected abstract méthode

Handles skill training.
protected abstract SkillTraining ( Creature creature, Skill skill, ProductionData data, bool success ) : void
creature Aura.Channel.World.Entities.Creature
skill Skill
data ProductionData
success bool
Résultat void

UpdateTool() protected méthode

Updates tool's durability and proficiency.
protected UpdateTool ( Creature creature, ProductionData productData ) : void
creature Aura.Channel.World.Entities.Creature
productData ProductionData
Résultat void