C# Class Aura.Channel.Skills.Music.PlayingInstrument

Inheritance: IPreparable, ICompletable, ICancelable, IInitiableSkillHandler, ICustomPrepareUsageSkill
显示文件 Open project: aura-project/aura

Public Methods

Method Description
Cancel ( Creature creature, Skill skill ) : void

Cancales skill.

Complete ( Creature creature, Skill skill, Aura.Shared.Network.Packet packet ) : void

Completes skill, called when done playing the current song.

CustomPrepareUsage ( Creature creature, Skill skill ) : void

Use stamina while skill is active if no scroll was used.

Init ( ) : void

Subscribes handler to events required for training.

Prepare ( Creature creature, Skill skill, Aura.Shared.Network.Packet packet ) : bool

Prepares skill, goes straight to Use and starts playing.

Protected Methods

Method Description
AfterPlay ( Creature creature, Skill skill, int quality ) : void

Called when completing (training).

GetInstrumentType ( Creature creature ) : InstrumentType

Returns instrument type to use.

GetQualityRating ( int quality ) : PlayingQuality

Return PlayingQuality based on given quality from 0~100.

GetRandomQualityMessage ( int quality ) : string

Returns a random result message for the given quality.

Reference: http://wiki.mabinogiworld.com/view/Playing_Instrument

GetRandomScore ( Random rnd ) : int

Returns random score scroll id.

OnCreatureAttackedByPlayer ( TargetAction action ) : void

Called when a player attacks someone (training).

OnPlay ( Creature creature, Skill skill, int quality ) : void

Called when starting playing (training).

Private Methods

Method Description
GetScore ( Creature creature ) : string

Returns score from magazine's item.

StartPlay ( Creature creature, Skill skill, InstrumentType instrumentType, int quality, string compressedMml, int scoreId ) : void

Starts play effect.

Method Details

AfterPlay() protected method

Called when completing (training).
protected AfterPlay ( Creature creature, Skill skill, int quality ) : void
creature Aura.Channel.World.Entities.Creature
skill Skill
quality int
return void

Cancel() public method

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

Complete() public method

Completes skill, called when done playing the current song.
public Complete ( Creature creature, Skill skill, Aura.Shared.Network.Packet packet ) : void
creature Aura.Channel.World.Entities.Creature
skill Skill
packet Aura.Shared.Network.Packet
return void

CustomPrepareUsage() public method

Use stamina while skill is active if no scroll was used.
public CustomPrepareUsage ( Creature creature, Skill skill ) : void
creature Aura.Channel.World.Entities.Creature
skill Skill
return void

GetInstrumentType() protected method

Returns instrument type to use.
protected GetInstrumentType ( Creature creature ) : InstrumentType
creature Aura.Channel.World.Entities.Creature
return InstrumentType

GetQualityRating() protected method

Return PlayingQuality based on given quality from 0~100.
protected GetQualityRating ( int quality ) : PlayingQuality
quality int
return PlayingQuality

GetRandomQualityMessage() protected method

Returns a random result message for the given quality.
Reference: http://wiki.mabinogiworld.com/view/Playing_Instrument
protected GetRandomQualityMessage ( int quality ) : string
quality int
return string

GetRandomScore() protected method

Returns random score scroll id.
protected GetRandomScore ( Random rnd ) : int
rnd System.Random
return int

Init() public method

Subscribes handler to events required for training.
public Init ( ) : void
return void

OnCreatureAttackedByPlayer() protected method

Called when a player attacks someone (training).
protected OnCreatureAttackedByPlayer ( TargetAction action ) : void
action TargetAction
return void

OnPlay() protected method

Called when starting playing (training).
protected OnPlay ( Creature creature, Skill skill, int quality ) : void
creature Aura.Channel.World.Entities.Creature
skill Skill
quality int
return void

Prepare() public method

Prepares skill, goes straight to Use and starts playing.
public Prepare ( Creature creature, Skill skill, Aura.Shared.Network.Packet packet ) : bool
creature Aura.Channel.World.Entities.Creature
skill Skill
packet Aura.Shared.Network.Packet
return bool