C# Класс Aura.Channel.Skills.Life.Fishing

Наследование: ISkillHandler, IPreparable, IReadyable, IUseable, ICancelable
Показать файл Открыть проект

Открытые методы

Метод Описание
Cancel ( Creature creature, Skill skill ) : void

Cancels skill, removing prop.

CheckEquipment ( Creature creature ) : bool

Returns true if creature has valid fishing equipment equipped.

OnResponse ( Creature creature, FishingMethod method, bool success ) : void

Called once ready to pull the fish out.

When you catch something just before running out of bait, and you send MotionCancel2 from Cancel, there's a visual bug on Aura, where the item keeps flying to you until you move. This does not happen on NA for unknown reason. The workaround: Check for cancellation in advance and only send the real in effect if the skill wasn't canceled.

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

Loads skill.

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

Readies skill.

StartFishing ( Creature creature, int delay ) : void

Starts fishing with given delay.

This method uses async Tasks to control when the skill continues (basically timers). Since the player could cancel the skill before the method continues, or props could be removed because of a reload, we need to make sure not to continue and not to crash because of a change in the prop situation. TODO: Use cancellation tokens? TODO: Don't reload spawned props, but only scripted ones?

Training ( Creature creature, Skill skill, bool success, Item item ) : void

Handles skill training.

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

Starts fishing at target location.

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

Метод Описание
GetFishingDrop ( Creature creature, Random rnd ) : DropData

Finds best fishing ground match for creature's current fishing prop and gets a random item from it.

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

Cancel() публичный Метод

Cancels skill, removing prop.
public Cancel ( Creature creature, Skill skill ) : void
creature Aura.Channel.World.Entities.Creature
skill Skill
Результат void

CheckEquipment() публичный Метод

Returns true if creature has valid fishing equipment equipped.
public CheckEquipment ( Creature creature ) : bool
creature Aura.Channel.World.Entities.Creature
Результат bool

OnResponse() публичный Метод

Called once ready to pull the fish out.
When you catch something just before running out of bait, and you send MotionCancel2 from Cancel, there's a visual bug on Aura, where the item keeps flying to you until you move. This does not happen on NA for unknown reason. The workaround: Check for cancellation in advance and only send the real in effect if the skill wasn't canceled.
public OnResponse ( Creature creature, FishingMethod method, bool success ) : void
creature Aura.Channel.World.Entities.Creature
method FishingMethod Method used on this try
success bool Success of manual try
Результат void

Prepare() публичный Метод

Loads skill.
public Prepare ( Creature creature, Skill skill, Packet packet ) : bool
creature Aura.Channel.World.Entities.Creature
skill Skill
packet Packet
Результат bool

Ready() публичный Метод

Readies skill.
public Ready ( Creature creature, Skill skill, Packet packet ) : bool
creature Aura.Channel.World.Entities.Creature
skill Skill
packet Packet
Результат bool

StartFishing() публичный Метод

Starts fishing with given delay.
This method uses async Tasks to control when the skill continues (basically timers). Since the player could cancel the skill before the method continues, or props could be removed because of a reload, we need to make sure not to continue and not to crash because of a change in the prop situation. TODO: Use cancellation tokens? TODO: Don't reload spawned props, but only scripted ones?
public StartFishing ( Creature creature, int delay ) : void
creature Aura.Channel.World.Entities.Creature
delay int
Результат void

Training() публичный Метод

Handles skill training.
public Training ( Creature creature, Skill skill, bool success, Item item ) : void
creature Aura.Channel.World.Entities.Creature
skill Skill
success bool
item Item
Результат void

Use() публичный Метод

Starts fishing at target location.
public Use ( Creature creature, Skill skill, Packet packet ) : void
creature Aura.Channel.World.Entities.Creature
skill Skill
packet Packet
Результат void