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

Base class for Tailoring and Blacksmithing.
Datei anzeigen Open project: aura-project/aura

Protected Properties

Property Type Description
SuccessTable int[]

Protected Methods

Method Description
DecrementMaterialItems ( Creature creature, List toDecrement, Random rnd ) : void

Decrements the given materials.

FinishItem ( Creature creature, Skill skill, ManualData manualData, int finishId, Item item, int quality ) : void

Sets appropriete flags, bonuses, and signatures, and sends notices about quality and bonuses.

GetItemsToDecrement ( Creature creature, Stage stage, ManualData manualData, List requiredMaterials, List materials, List &toDecrement ) : bool

Returns list of items that have to be decremented to satisfy the manual's required materials. Actual return value is whether this process was successful, or if materials are missing. Handles necessary messages and logs.

GetSuccessChance ( Creature creature, Skill skill, SkillRank manualRank ) : int

Returns success chance between 0 and 100.

Unofficial. It's unlikely that officials use a table, instead of a formula, but for a lack of formula, we're forced to go with this. The success rates actually seem to be rather static, so it should work fine. We have all possible combinations, and with this function we do get the correct base chance.

ReadMaterials ( Creature creature, Packet packet, List &materials ) : bool

Reads materuals from packet, starting with the count. Returns false if a material item wasn't found, after logging it.

Private Methods

Method Description
GetBonusesFor ( Item item, int quality ) : int>.Dictionary

Returns a list of bonuses that the given item would get with the given quality.

Reference: http://mabination.com/threads/85245-Player-made-Item-Quality

Method Details

DecrementMaterialItems() protected method

Decrements the given materials.
protected DecrementMaterialItems ( Creature creature, List toDecrement, Random rnd ) : void
creature Aura.Channel.World.Entities.Creature
toDecrement List
rnd System.Random
return void

FinishItem() protected method

Sets appropriete flags, bonuses, and signatures, and sends notices about quality and bonuses.
protected FinishItem ( Creature creature, Skill skill, ManualData manualData, int finishId, Item item, int quality ) : void
creature Aura.Channel.World.Entities.Creature
skill Skill
manualData ManualData
finishId int /// The id of the finish to use, make sure to get the actual /// finish id, which in Blacksmithing comes from the Prepare /// that switches to the mini-game. ///
item Item
quality int
return void

GetItemsToDecrement() protected method

Returns list of items that have to be decremented to satisfy the manual's required materials. Actual return value is whether this process was successful, or if materials are missing. Handles necessary messages and logs.
protected GetItemsToDecrement ( Creature creature, Stage stage, ManualData manualData, List requiredMaterials, List materials, List &toDecrement ) : bool
creature Aura.Channel.World.Entities.Creature
stage Stage
manualData ManualData
requiredMaterials List
materials List List of materials the client supplies.
toDecrement List
return bool

GetSuccessChance() protected method

Returns success chance between 0 and 100.
Unofficial. It's unlikely that officials use a table, instead of a formula, but for a lack of formula, we're forced to go with this. The success rates actually seem to be rather static, so it should work fine. We have all possible combinations, and with this function we do get the correct base chance.
protected GetSuccessChance ( Creature creature, Skill skill, SkillRank manualRank ) : int
creature Aura.Channel.World.Entities.Creature
skill Skill
manualRank SkillRank
return int

ReadMaterials() protected method

Reads materuals from packet, starting with the count. Returns false if a material item wasn't found, after logging it.
protected ReadMaterials ( Creature creature, Packet packet, List &materials ) : bool
creature Aura.Channel.World.Entities.Creature
packet Packet
materials List
return bool

Property Details

SuccessTable protected_oe static_oe property

Base success chance used in success formula.
protected static int[] SuccessTable
return int[]