|
RuneHive-Game
|
The skill action that represents an action where one item is removed from an inventory and lost forever. More...
Public Member Functions | |
| boolean | canRun () |
| Determines if the task can be ran. | |
| DestructionSkillAction (Mob mob, Optional< Position > position, boolean instant) | |
Creates a new DestructionSkillAction. | |
| abstract Item | destructItem () |
| The item that will be removed upon destruction. | |
| final WalkablePolicy | getWalkablePolicy () |
| Gets the WalkablePolicy of this action. | |
| void | onDestruct (boolean success) |
| The method executed upon destruction of the item. | |
| final void | onExecute () |
The method which is called on intervals of the specified #delay;. | |
| boolean | prioritized () |
| Determines if this action is prioritized. | |
| abstract double | successFactor () |
| Public Member Functions inherited from com.runehive.content.skill.SkillAction | |
| abstract Optional< SkillAnimation > | animation () |
| The skill animation to execute. | |
| abstract boolean | canInit () |
| Determines if this action can be initialized. | |
| abstract double | experience () |
| The experience given from this action. | |
| boolean | ignore () |
| Determines if future skill actions from the same type should be ignored. | |
| abstract void | init () |
| Any functionality that should be handled when this action is submitted. | |
| abstract int | skill () |
| The skill we should hand to experience to. | |
| SkillAction (Mob mob, Optional< Position > position, boolean instant) | |
Creates a new Action randomevent. | |
| SkillAction (Mob mob, Optional< Position > position, int delay, boolean instant) | |
Creates a new Action randomevent. | |
| final void | start () |
| Attempts to start the skill. | |
| Public Member Functions inherited from com.runehive.game.action.Action< T extends Mob > | |
| Action (T mob, int delay) | |
Creates a new Action randomevent. | |
| Action (T mob, int delay, boolean instant) | |
Creates a new Action randomevent. | |
| boolean | cancellableInProgress () |
| T | getMob () |
| Gets the player. | |
| abstract String | getName () |
| Gets the name of this action. | |
| Public Member Functions inherited from com.runehive.game.task.Task | |
| Task | attach (Object newKey) |
| Attaches a new key. | |
| synchronized final void | cancel () |
| Cancels all subsequent executions. | |
| synchronized final void | cancel (boolean logout) |
| Cancels all subsequent executions. | |
| Optional< Object > | getAttachment () |
| String | getCreationStackTraceStr () |
| int | getDelay () |
| Long | getElapsedTimeFromRunStartTime () |
| Optional< Long > | getRunStartTime () |
| long | getTaskCreationTime () |
| String | getTaskId () |
| boolean | isInstant () |
| boolean | isRunning () |
| void | setDelay (int delay) |
| Sets the cyclic delay. | |
| void | setExecutionTime () |
| Task (boolean instant, int delay) | |
Creates a new Task. | |
| Task (int delay) | |
Creates a new Task that doesn't execute instantly. | |
Private Attributes | |
| final RandomGen | random = new RandomGen() |
Static Private Attributes | |
| static final int | SUCCESS_FACTOR = 10 |
Additional Inherited Members | |
| Protected Member Functions inherited from com.runehive.content.skill.SkillAction | |
| final void | execute () |
| A function representing the unit of work that will be carried out. | |
| final void | onSchedule () |
| A function executed on registration. | |
| Protected Member Functions inherited from com.runehive.game.task.Task | |
| void | baseExecute () |
| boolean | canSchedule () |
| A function executed on registration. | |
| void | onCancel (boolean logout) |
| A function executed on cancellation. | |
| Package Functions inherited from com.runehive.game.task.Task | |
| void | onException (Exception e) |
| A function executed on thrown exceptions. | |
| void | onLoop () |
| A function executed when iterated over. | |
| final synchronized void | process () |
| synchronized void | setRunning (boolean running) |
The skill action that represents an action where one item is removed from an inventory and lost forever.
This type of skill action is very basic and only requires that a player have the item to destruct in their inventory.
The skills that may use this type skill action include, but are not limited to PRAYER.
Definition at line 26 of file DestructionSkillAction.java.
| com.runehive.content.skill.impl.DestructionSkillAction.DestructionSkillAction | ( | Mob | mob, |
| Optional< Position > | position, | ||
| boolean | instant ) |
Creates a new DestructionSkillAction.
| mob | the mob this skill action is for. |
| position | the position the player should face. |
| instant | determines if this task should run instantly. |
Definition at line 37 of file DestructionSkillAction.java.
References com.runehive.game.task.Task.instant, com.runehive.game.action.Action< T extends Mob >.mob, and com.runehive.content.skill.SkillAction.position.
| boolean com.runehive.content.skill.impl.DestructionSkillAction.canRun | ( | ) |
Determines if the task can be ran.
Reimplemented from com.runehive.game.task.Task.
Definition at line 42 of file DestructionSkillAction.java.
References destructItem(), com.runehive.game.world.items.ItemDefinition.get(), com.runehive.game.action.Action< T extends Mob >.getMob(), and com.runehive.game.world.items.ItemDefinition.getName().
|
abstract |
The item that will be removed upon destruction.
Reimplemented in com.runehive.content.skill.impl.firemaking.FiremakingAction.
Referenced by canRun().
| final WalkablePolicy com.runehive.content.skill.impl.DestructionSkillAction.getWalkablePolicy | ( | ) |
Gets the WalkablePolicy of this action.
Reimplemented from com.runehive.game.action.Action< T extends Mob >.
Definition at line 70 of file DestructionSkillAction.java.
References com.runehive.game.action.policy.WalkablePolicy.NON_WALKABLE.
| void com.runehive.content.skill.impl.DestructionSkillAction.onDestruct | ( | boolean | success | ) |
The method executed upon destruction of the item.
| success | determines if the destruction was successful or not. |
Reimplemented in com.runehive.content.skill.impl.firemaking.FiremakingAction.
Definition at line 78 of file DestructionSkillAction.java.
Referenced by onExecute().
| final void com.runehive.content.skill.impl.DestructionSkillAction.onExecute | ( | ) |
The method which is called on intervals of the specified #delay;.
Reimplemented from com.runehive.content.skill.SkillAction.
Definition at line 54 of file DestructionSkillAction.java.
References com.runehive.game.task.Task.cancel(), com.runehive.content.skill.SkillAction.experience(), com.runehive.game.action.Action< T extends Mob >.getMob(), onDestruct(), random, com.runehive.content.skill.SkillAction.skill(), SUCCESS_FACTOR, and successFactor().
| boolean com.runehive.content.skill.impl.DestructionSkillAction.prioritized | ( | ) |
Determines if this action is prioritized.
When making an action prioritized, the next action will be ignored if not queued.
true if this action is prioritized, false otherwise. Reimplemented from com.runehive.game.action.Action< T extends Mob >.
Definition at line 89 of file DestructionSkillAction.java.
|
abstract |
Reimplemented in com.runehive.content.skill.impl.firemaking.FiremakingAction.
Referenced by onExecute().
|
private |
Definition at line 29 of file DestructionSkillAction.java.
Referenced by onExecute().
|
staticprivate |
Definition at line 28 of file DestructionSkillAction.java.
Referenced by onExecute().