C# Class Aura.Channel.Skills.Magic.Enchant

Inheritance: IPreparable, ICompletable, ICancelable
Datei anzeigen Open project: aura-project/aura

Public Methods

Method Description
Burn ( Creature creature, Item item, Prop campfire, bool enchantersBurn ) : bool

Handles item burning, retruns whether it was successful.

Cancel ( Creature creature, Skill skill ) : void

Cancel actions.

Complete ( Creature creature, Skill skill, Packet packet ) : void

Completes skill, applying the enchant.

GetChance ( Creature creature, Item rightHand, SkillId skillId, OptionSetData optionSetData ) : float

Returns success chance, based on skill, option set, and powder used. Unofficial. It kinda matches the debug output of the client, but it is a little off.

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

Prepares skill.

Private Methods

Method Description
BurnTraining ( Skill skill, bool enchantSuccess, bool powderSuccess ) : void

Handles skill training from burning.

GetDurabilityLoss ( Random rnd, SkillRank enchantRank, EnchantResult result ) : int

Returns random durability loss for rank. Returns -1 if item should be destroyed.

Reference: http://wiki.mabinogiworld.com/view/Enchant#Enchanting

GetOptionSetid ( Item enchant ) : int

Returns option set id from "enchant scrolls", based on their data.

Training ( Skill skill, EnchantResult result ) : void

Handles skill training from enchanting.

Method Details

Burn() public method

Handles item burning, retruns whether it was successful.
public Burn ( Creature creature, Item item, Prop campfire, bool enchantersBurn ) : bool
creature Aura.Channel.World.Entities.Creature
item Item
campfire Aura.Channel.World.Entities.Prop
enchantersBurn bool
return bool

Cancel() public method

Cancel actions.
public Cancel ( Creature creature, Skill skill ) : void
creature Aura.Channel.World.Entities.Creature
skill Skill
return void

Complete() public method

Completes skill, applying the enchant.
public Complete ( Creature creature, Skill skill, Packet packet ) : void
creature Aura.Channel.World.Entities.Creature
skill Skill
packet Packet
return void

GetChance() public static method

Returns success chance, based on skill, option set, and powder used. Unofficial. It kinda matches the debug output of the client, but it is a little off.
public static GetChance ( Creature creature, Item rightHand, SkillId skillId, OptionSetData optionSetData ) : float
creature Aura.Channel.World.Entities.Creature
rightHand Item
skillId SkillId
optionSetData OptionSetData
return float

Prepare() public method

Prepares skill.
public Prepare ( Creature creature, Skill skill, Packet packet ) : bool
creature Aura.Channel.World.Entities.Creature
skill Skill
packet Packet
return bool