RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.game.Graphic Class Reference

Represents a single graphic that can be used by entities. More...

Inheritance diagram for com.runehive.game.Graphic:
Collaboration diagram for com.runehive.game.Graphic:

Public Member Functions

int compareTo (Graphic other)
boolean equals (Object obj)
int getDelay ()
 Gets the delay of this graphic.
int getHeight ()
 Gets the height of this graphic.
int getId ()
 Gets the id of this graphic.
 Graphic (int id)
 Constructs a new Graphic object with no delay, a low height, and normal priotiry.
 Graphic (int id, boolean high)
 Constructs a new Graphic object with no delay and normal priotiry.
 Graphic (int id, boolean high, UpdatePriority priority)
 Constructs a new Graphic object with no delay.
 Graphic (int id, int delay)
 Constructs a new Graphic object with a low height and normal priotiry.
 Graphic (int id, int delay, boolean high)
 Constructs a new Graphic object with a normal priotiry.
 Graphic (int id, int delay, boolean high, UpdatePriority priority)
 Constructs a new Graphic object.
 Graphic (int id, int delay, int height)
 Graphic (int id, int delay, int height, UpdatePriority priority)
 Graphic (int id, int delay, UpdatePriority priority)
 Constructs a new Graphic object with a low height.
 Graphic (int id, UpdatePriority priority)
 Constructs a new Graphic object with no delay and a low height.
int hashCode ()
String toString ()

Static Public Attributes

static final int HIGH_HEIGHT = 0x640000
static final int LUNAR_ID = 747
static final Graphic LUNAR_TELE = new Graphic(LUNAR_ID, 0, UpdatePriority.VERY_HIGH)
static final int NORMAL_ID = 308
static final Graphic NORMAL_TELE = new Graphic(NORMAL_ID, 43, UpdatePriority.VERY_HIGH)
static final Graphic RESET = new Graphic(RESET_ID, UpdatePriority.VERY_LOW)
static final int RESET_ID = 0xFFFF

Private Attributes

final int delay
 The delay of this graphic.
final int height
 The height of this graphic.
final int id
 The graphic id.
final UpdatePriority priority
 The priority of the graphic.

Detailed Description

Represents a single graphic that can be used by entities.

Also known as GFX.

Author
Michael | Chex

Definition at line 10 of file Graphic.java.

Constructor & Destructor Documentation

◆ Graphic() [1/10]

com.runehive.game.Graphic.Graphic ( int id)

Constructs a new Graphic object with no delay, a low height, and normal priotiry.

Parameters
idThe graphic id.

Definition at line 40 of file Graphic.java.

40 {
41 this(id, 0, false);
42 }

References id.

Referenced by compareTo(), and equals().

Here is the caller graph for this function:

◆ Graphic() [2/10]

com.runehive.game.Graphic.Graphic ( int id,
boolean high )

Constructs a new Graphic object with no delay and normal priotiry.

Parameters
idThe graphic id.
highThe graphic height state.

Definition at line 54 of file Graphic.java.

54 {
55 this(id, 0, high);
56 }

References id.

◆ Graphic() [3/10]

com.runehive.game.Graphic.Graphic ( int id,
int delay )

Constructs a new Graphic object with a low height and normal priotiry.

Parameters
idThe graphic id.
delayThe graphic delay.

Definition at line 68 of file Graphic.java.

68 {
69 this(id, delay, false);
70 }

References delay, and id.

◆ Graphic() [4/10]

com.runehive.game.Graphic.Graphic ( int id,
int delay,
boolean high )

Constructs a new Graphic object with a normal priotiry.

Parameters
idThe graphic id.
delayThe graphic delay.
highThe graphic height state.

Definition at line 84 of file Graphic.java.

84 {
85 this(id, delay, high, UpdatePriority.NORMAL);
86 }

References delay, id, and com.runehive.game.UpdatePriority.NORMAL.

◆ Graphic() [5/10]

com.runehive.game.Graphic.Graphic ( int id,
UpdatePriority priority )

Constructs a new Graphic object with no delay and a low height.

Parameters
idThe graphic id.
priorityThe graphic priority.

Definition at line 96 of file Graphic.java.

96 {
97 this(id, 0, false, priority);
98 }

References id, and priority.

◆ Graphic() [6/10]

com.runehive.game.Graphic.Graphic ( int id,
boolean high,
UpdatePriority priority )

Constructs a new Graphic object with no delay.

Parameters
idThe graphic id.
highThe graphic height state.
priorityThe graphic priority.

Definition at line 111 of file Graphic.java.

111 {
112 this(id, 0, high, priority);
113 }

References id, and priority.

◆ Graphic() [7/10]

com.runehive.game.Graphic.Graphic ( int id,
int delay,
UpdatePriority priority )

Constructs a new Graphic object with a low height.

Parameters
idThe graphic id.
delayThe graphic delay.
priorityThe graphic priority.

Definition at line 126 of file Graphic.java.

126 {
127 this(id, delay, false, priority);
128 }

References delay, id, and priority.

◆ Graphic() [8/10]

com.runehive.game.Graphic.Graphic ( int id,
int delay,
boolean high,
UpdatePriority priority )

Constructs a new Graphic object.

Parameters
idThe graphic id.
delayThe graphic delay.
highThe graphic height state.
priorityThe graphic priority.

Definition at line 144 of file Graphic.java.

144 {
145 this(id, delay, high ? HIGH_HEIGHT : 0, priority);
146 }

References delay, HIGH_HEIGHT, id, and priority.

◆ Graphic() [9/10]

com.runehive.game.Graphic.Graphic ( int id,
int delay,
int height,
UpdatePriority priority )

Definition at line 148 of file Graphic.java.

148 {
149 this.id = id;
150 this.delay = delay;
151 this.height = height;
152 this.priority = priority;
153 }

References delay, height, id, and priority.

◆ Graphic() [10/10]

com.runehive.game.Graphic.Graphic ( int id,
int delay,
int height )

Definition at line 155 of file Graphic.java.

155 {
156 this.id = id;
157 this.delay = delay;
158 this.height = height;
159 this.priority = UpdatePriority.NORMAL;
160 }

References delay, height, id, and com.runehive.game.UpdatePriority.NORMAL.

Member Function Documentation

◆ compareTo()

int com.runehive.game.Graphic.compareTo ( Graphic other)

Definition at line 204 of file Graphic.java.

204 {
205 return other.priority.ordinal() - priority.ordinal();
206 }

References Graphic(), and priority.

Referenced by com.runehive.game.world.entity.mob.Mob.graphic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ equals()

boolean com.runehive.game.Graphic.equals ( Object obj)

Definition at line 195 of file Graphic.java.

195 {
196 if (obj instanceof Graphic) {
197 Graphic other = (Graphic) obj;
198 return id == other.id && height == other.height && delay == other.delay && priority == other.priority;
199 }
200 return obj == this;
201 }

References delay, Graphic(), height, and priority.

Here is the call graph for this function:

◆ getDelay()

int com.runehive.game.Graphic.getDelay ( )

Gets the delay of this graphic.

Returns
delay

Definition at line 167 of file Graphic.java.

167 {
168 return delay;
169 }

References delay.

Referenced by com.runehive.net.packet.out.SendNpcUpdate.appendGfxMask(), and com.runehive.net.packet.out.SendPlayerUpdate.appendGraphicMask().

Here is the caller graph for this function:

◆ getHeight()

int com.runehive.game.Graphic.getHeight ( )

Gets the height of this graphic.

Returns
height

Definition at line 176 of file Graphic.java.

176 {
177 return height;
178 }

References height.

Referenced by com.runehive.net.packet.out.SendNpcUpdate.appendGfxMask(), com.runehive.net.packet.out.SendPlayerUpdate.appendGraphicMask(), and com.runehive.game.world.entity.combat.strategy.CombatStrategy< T extends Mob >.getEndGraphic().

Here is the caller graph for this function:

◆ getId()

int com.runehive.game.Graphic.getId ( )

Gets the id of this graphic.

Returns
id

Definition at line 185 of file Graphic.java.

185 {
186 return id;
187 }

References id.

Referenced by com.runehive.net.packet.out.SendNpcUpdate.appendGfxMask(), com.runehive.net.packet.out.SendPlayerUpdate.appendGraphicMask(), and com.runehive.game.world.entity.combat.strategy.CombatStrategy< T extends Mob >.getEndGraphic().

Here is the caller graph for this function:

◆ hashCode()

int com.runehive.game.Graphic.hashCode ( )

Definition at line 190 of file Graphic.java.

190 {
191 return Objects.hash(id, delay, height, priority);
192 }

References delay, height, and priority.

◆ toString()

String com.runehive.game.Graphic.toString ( )

Definition at line 209 of file Graphic.java.

209 {
210 return String.format("Graphic[id=%s, delay=%s, height=%s, priority=%s]", id, delay, height, priority);
211 }

References delay, height, and priority.

Member Data Documentation

◆ delay

final int com.runehive.game.Graphic.delay
private

The delay of this graphic.

Definition at line 25 of file Graphic.java.

Referenced by equals(), getDelay(), Graphic(), Graphic(), Graphic(), Graphic(), Graphic(), Graphic(), hashCode(), and toString().

◆ height

final int com.runehive.game.Graphic.height
private

The height of this graphic.

Definition at line 28 of file Graphic.java.

Referenced by equals(), getHeight(), Graphic(), Graphic(), hashCode(), and toString().

◆ HIGH_HEIGHT

final int com.runehive.game.Graphic.HIGH_HEIGHT = 0x640000
static

Definition at line 12 of file Graphic.java.

Referenced by Graphic().

◆ id

final int com.runehive.game.Graphic.id
private

The graphic id.

Definition at line 22 of file Graphic.java.

Referenced by getId(), Graphic(), Graphic(), Graphic(), Graphic(), Graphic(), Graphic(), Graphic(), Graphic(), Graphic(), and Graphic().

◆ LUNAR_ID

final int com.runehive.game.Graphic.LUNAR_ID = 747
static

Definition at line 15 of file Graphic.java.

◆ LUNAR_TELE

final Graphic com.runehive.game.Graphic.LUNAR_TELE = new Graphic(LUNAR_ID, 0, UpdatePriority.VERY_HIGH)
static

Definition at line 19 of file Graphic.java.

◆ NORMAL_ID

final int com.runehive.game.Graphic.NORMAL_ID = 308
static

Definition at line 14 of file Graphic.java.

◆ NORMAL_TELE

final Graphic com.runehive.game.Graphic.NORMAL_TELE = new Graphic(NORMAL_ID, 43, UpdatePriority.VERY_HIGH)
static

Definition at line 18 of file Graphic.java.

◆ priority

final UpdatePriority com.runehive.game.Graphic.priority
private

The priority of the graphic.

Definition at line 31 of file Graphic.java.

Referenced by compareTo(), equals(), Graphic(), Graphic(), Graphic(), Graphic(), Graphic(), hashCode(), and toString().

◆ RESET

◆ RESET_ID

final int com.runehive.game.Graphic.RESET_ID = 0xFFFF
static

Definition at line 16 of file Graphic.java.


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