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

Public Member Functions

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

Constructor & Destructor Documentation

◆ LightBrazier()

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

Definition at line 15 of file LightBrazier.java.

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

References brazier.

Member Function Documentation

◆ execute()

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

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

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

Definition at line 31 of file LightBrazier.java.

31 {
32 if(brazier.getBrazierState() != 2) {
33 //brazier.getObject().transform(Wintertodt.BURNING_BRAZIER_ID);
34 brazier.getObject().unregister();
35 brazier.setObject(Wintertodt.BURNING_BRAZIER_ID);
36 brazier.getObject().register();
37 }
38
39 getMob().skills.addExperience(Skill.FIREMAKING, (Skill.getLevelForExperience(getMob().skills.get(Skill.FIREMAKING).getExperience()) * 6) * Config.FIREMAKING_MODIFICATION);
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.content.wintertodt.Wintertodt.BURNING_BRAZIER_ID, com.runehive.game.world.entity.skill.Skill.FIREMAKING, com.runehive.Config.FIREMAKING_MODIFICATION, 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.LightBrazier.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 26 of file LightBrazier.java.

26 {
27 return "Light brazier";
28 }

◆ getWalkablePolicy()

WalkablePolicy com.runehive.content.wintertodt.actions.LightBrazier.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 21 of file LightBrazier.java.

21 {
22 return WalkablePolicy.NON_WALKABLE;
23 }

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

Member Data Documentation

◆ brazier

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

Definition at line 13 of file LightBrazier.java.

Referenced by execute(), and LightBrazier().


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