C# Класс Aura.Channel.Skills.Base.CreationSkill

Base class for Tailoring and Blacksmithing.
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
SuccessTable int[]

Защищенные методы

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

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

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

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

DecrementMaterialItems() защищенный Метод

Decrements the given materials.
protected DecrementMaterialItems ( Creature creature, List toDecrement, Random rnd ) : void
creature Aura.Channel.World.Entities.Creature
toDecrement List
rnd System.Random
Результат void

FinishItem() защищенный Метод

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
Результат void

GetItemsToDecrement() защищенный Метод

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
Результат bool

GetSuccessChance() защищенный Метод

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
Результат int

ReadMaterials() защищенный Метод

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
Результат bool

Описание свойств

SuccessTable защищенное статическое свойство

Base success chance used in success formula.
protected static int[] SuccessTable
Результат int[]