|
RuneHive-Game
|
An action that faces an npc, but resets their facing to their default facing direction after 15 seconds. More...
Public Member Functions | |
| void | execute () |
| A function representing the unit of work that will be carried out. | |
| String | getName () |
| Gets the name of this action. | |
| WalkablePolicy | getWalkablePolicy () |
| Gets the WalkablePolicy of this action. | |
| NpcFaceAction (Npc npc, Position face, int option) | |
Constructs a new NpcFaceAction. | |
| boolean | prioritized () |
| Determines if this action is prioritized. | |
| 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. | |
| 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. | |
| boolean | canRun () |
| Determines if the task can be ran. | |
| 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 int[] | FIRST_OPTION = {} |
| The array list of all the first option npcs that can not face. | |
| final int[] | FOURTH_OPTION = {} |
| int[] | identification |
| The npc identifications to check if face action is allowed. | |
| final int[] | SECOND_OPTION = {3080, 3010} |
| The array list of all the second option npcs that can not face. | |
| final int[] | THIRD_OPTION = {} |
| The array list of all the third option npcs that can not face. | |
Additional Inherited Members | |
| 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. | |
| void | onSchedule () |
| A function executed on registration. | |
| 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) |
An action that faces an npc, but resets their facing to their default facing direction after 15 seconds.
Definition at line 19 of file NpcFaceAction.java.
Constructs a new NpcFaceAction.
| npc | The npc. |
| face | The face position. |
| option | The option id. |
Definition at line 49 of file NpcFaceAction.java.
References com.runehive.game.task.Task.cancel(), FIRST_OPTION, FOURTH_OPTION, com.runehive.game.action.Action< T extends Mob >.getMob(), com.runehive.game.world.entity.mob.Mob.id, identification, SECOND_OPTION, and THIRD_OPTION.
| void com.runehive.game.action.impl.NpcFaceAction.execute | ( | ) |
A function representing the unit of work that will be carried out.
Reimplemented from com.runehive.game.task.Task.
Definition at line 70 of file NpcFaceAction.java.
References com.runehive.game.task.Task.cancel(), com.runehive.game.action.Action< T extends Mob >.getMob(), com.runehive.game.world.entity.mob.Mob.getNpc(), and com.runehive.game.world.entity.mob.npc.Npc.walk.
| String com.runehive.game.action.impl.NpcFaceAction.getName | ( | ) |
Gets the name of this action.
Reimplemented from com.runehive.game.action.Action< T extends Mob >.
Definition at line 81 of file NpcFaceAction.java.
| WalkablePolicy com.runehive.game.action.impl.NpcFaceAction.getWalkablePolicy | ( | ) |
Gets the WalkablePolicy of this action.
Reimplemented from com.runehive.game.action.Action< T extends Mob >.
Definition at line 91 of file NpcFaceAction.java.
References com.runehive.game.action.policy.WalkablePolicy.NON_WALKABLE.
| boolean com.runehive.game.action.impl.NpcFaceAction.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 86 of file NpcFaceAction.java.
|
private |
The array list of all the first option npcs that can not face.
Definition at line 28 of file NpcFaceAction.java.
Referenced by NpcFaceAction().
|
private |
|
private |
The npc identifications to check if face action is allowed.
Definition at line 23 of file NpcFaceAction.java.
Referenced by NpcFaceAction().
|
private |
The array list of all the second option npcs that can not face.
Definition at line 33 of file NpcFaceAction.java.
Referenced by NpcFaceAction().
|
private |
The array list of all the third option npcs that can not face.
Definition at line 38 of file NpcFaceAction.java.
Referenced by NpcFaceAction().