RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.content.wintertodt.actions.FixBrazier Class Reference
Inheritance diagram for com.runehive.content.wintertodt.actions.FixBrazier:
Collaboration diagram for com.runehive.content.wintertodt.actions.FixBrazier:

Public Member Functions

 FixBrazier (Player player, Brazier brazier)
String getName ()
 Gets the name of this action.
WalkablePolicy getWalkablePolicy ()
 Gets the WalkablePolicy of this action.
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 ()
getMob ()
 Gets the player.
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.
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.

Protected Member Functions

void execute ()
 A function representing the unit of work that will be carried out.
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.

Private Attributes

Brazier brazier

Additional Inherited Members

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)

Detailed Description

Definition at line 10 of file FixBrazier.java.

Constructor & Destructor Documentation

◆ FixBrazier()

com.runehive.content.wintertodt.actions.FixBrazier.FixBrazier ( Player player,
Brazier brazier )

Definition at line 14 of file FixBrazier.java.

14 {
15 super(player, 3);
16 this.brazier = brazier;
17 }

References brazier.

Member Function Documentation

◆ execute()

void com.runehive.content.wintertodt.actions.FixBrazier.execute ( )
protected

A function representing the unit of work that will be carried out.

Reimplemented from com.runehive.game.task.Task.

Definition at line 30 of file FixBrazier.java.

30 {
31 if(brazier.getBrazierState() != 2) {
32 System.out.println("???????????");
33 //brazier.getObject().transform(Wintertodt.EMPTY_BRAZIER_ID);
34 brazier.getObject().unregister();
35 brazier.setObject(Wintertodt.EMPTY_BRAZIER_ID);
36 brazier.getObject().register();
37 }
38
39 getMob().skills.addExperience(Skill.CONSTRUCTION, Skill.getLevelForExperience(getMob().skills.get(Skill.CONSTRUCTION).getExperience()) * 4);
40 Wintertodt.addPoints(getMob(), 25);
41 getMob().animate(65535);
42 getMob().action.getCurrentAction().cancel();
43 }

References com.runehive.content.wintertodt.Wintertodt.addPoints(), brazier, com.runehive.game.world.entity.skill.Skill.CONSTRUCTION, com.runehive.content.wintertodt.Wintertodt.EMPTY_BRAZIER_ID, com.runehive.game.world.entity.skill.Skill.getLevelForExperience(), and com.runehive.game.action.Action< T extends Mob >.getMob().

Here is the call graph for this function:

◆ getName()

String com.runehive.content.wintertodt.actions.FixBrazier.getName ( )

Gets the name of this action.

Returns
The name of this action.

Reimplemented from com.runehive.game.action.Action< T extends Mob >.

Definition at line 25 of file FixBrazier.java.

25 {
26 return "Fix brazier";
27 }

◆ getWalkablePolicy()

WalkablePolicy com.runehive.content.wintertodt.actions.FixBrazier.getWalkablePolicy ( )

Gets the WalkablePolicy of this action.

Returns
The walkable policy of this action.

Reimplemented from com.runehive.game.action.Action< T extends Mob >.

Definition at line 20 of file FixBrazier.java.

20 {
21 return WalkablePolicy.NON_WALKABLE;
22 }

References com.runehive.game.action.policy.WalkablePolicy.NON_WALKABLE.

Member Data Documentation

◆ brazier

Brazier com.runehive.content.wintertodt.actions.FixBrazier.brazier
private

Definition at line 12 of file FixBrazier.java.

Referenced by execute(), and FixBrazier().


The documentation for this class was generated from the following file: