|
RuneHive-Game
|
The skill action that represents an action where one item in an inventory is replaced with a new one. More...
Public Member Functions | |
| final boolean | canRun () |
| Determines if the task can be ran. | |
| Optional< String > | message () |
| The message that will be sent when the player doesn't have the items required. | |
| final void | onExecute () |
The method which is called on intervals of the specified #delay;. | |
| void | onProduce (boolean success) |
| The method executed upon production of an item. | |
| abstract Optional< Item[]> | produceItem () |
| The item that will be added upon production. | |
| ProducingSkillAction (Player player, Optional< Position > position, boolean instant) | |
Creates a new ProducingSkillAction. | |
| ProducingSkillAction (Player player, Optional< Position > position, int delay, boolean instant) | |
Creates a new ProducingSkillAction. | |
| abstract Optional< Item[]> | removeItem () |
| The item that will be removed upon production. | |
| 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. | |
| abstract WalkablePolicy | getWalkablePolicy () |
| Gets the WalkablePolicy of this action. | |
| boolean | prioritized () |
| Determines if this action is prioritized. | |
| 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. | |
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 in an inventory is replaced with a new one.
This type of skill action is somewhat basic and requires that a player have the item to be removed.
The skills that may use this type skill action include, but are not limited to COOKING.
Definition at line 26 of file ProducingSkillAction.java.
| com.runehive.content.skill.impl.ProducingSkillAction.ProducingSkillAction | ( | Player | player, |
| Optional< Position > | position, | ||
| boolean | instant ) |
Creates a new ProducingSkillAction.
| player | the player this skill action is for. |
| position | the position the player should face. |
| instant | determines if this action should be ran instantly. |
Definition at line 34 of file ProducingSkillAction.java.
References com.runehive.game.task.Task.instant, and com.runehive.content.skill.SkillAction.position.
| com.runehive.content.skill.impl.ProducingSkillAction.ProducingSkillAction | ( | Player | player, |
| Optional< Position > | position, | ||
| int | delay, | ||
| boolean | instant ) |
Creates a new ProducingSkillAction.
| player | the player this skill action is for. |
| position | the position the player should face. |
| delay | the delay between these producing skill actions. |
| instant | determines if this action should be ran instantly. |
Definition at line 45 of file ProducingSkillAction.java.
References com.runehive.game.task.Task.delay, com.runehive.game.task.Task.instant, and com.runehive.content.skill.SkillAction.position.
| final boolean com.runehive.content.skill.impl.ProducingSkillAction.canRun | ( | ) |
Determines if the task can be ran.
Reimplemented from com.runehive.game.task.Task.
Definition at line 50 of file ProducingSkillAction.java.
References com.runehive.util.StringUtils.appendPluralCheck(), com.runehive.game.world.items.containers.ItemContainer.copy(), com.runehive.game.world.items.containers.ItemContainer.fireCapacityExceededEvent(), com.runehive.game.action.Action< T extends Mob >.getMob(), com.runehive.game.world.items.containers.ItemContainer.hasCapacityFor(), message(), onProduce(), produceItem(), com.runehive.game.world.items.containers.ItemContainer.removeAll(), and removeItem().
| Optional< String > com.runehive.content.skill.impl.ProducingSkillAction.message | ( | ) |
The message that will be sent when the player doesn't have the items required.
Definition at line 113 of file ProducingSkillAction.java.
Referenced by canRun().
| final void com.runehive.content.skill.impl.ProducingSkillAction.onExecute | ( | ) |
The method which is called on intervals of the specified #delay;.
Reimplemented from com.runehive.content.skill.SkillAction.
Definition at line 81 of file ProducingSkillAction.java.
References com.runehive.content.skill.SkillAction.experience(), com.runehive.game.action.Action< T extends Mob >.getMob(), onProduce(), produceItem(), removeItem(), and com.runehive.content.skill.SkillAction.skill().
| void com.runehive.content.skill.impl.ProducingSkillAction.onProduce | ( | boolean | success | ) |
The method executed upon production of an item.
| success | determines if the production was successful or not. |
Reimplemented in com.runehive.content.skill.impl.smithing.SmithingArmour.
Definition at line 92 of file ProducingSkillAction.java.
Referenced by canRun(), and onExecute().
|
abstract |
The item that will be added upon production.
Reimplemented in com.runehive.content.skill.impl.smithing.SmithingArmour.
Referenced by canRun(), and onExecute().
|
abstract |
The item that will be removed upon production.
Reimplemented in com.runehive.content.skill.impl.smithing.SmithingArmour.
Referenced by canRun(), and onExecute().