Class AbstractWebNode
- java.lang.Object
-
- org.dreambot.api.methods.walking.web.node.AbstractWebNode
-
- All Implemented Interfaces:
Locatable
- Direct Known Subclasses:
AgilityWebNode
,BankWebNode
,BasicWebNode
,DynamicTeleportWebNode
,EntranceWebNode
,StaticTeleportWebNode
,TollWebNode
public abstract class AbstractWebNode extends java.lang.Object implements Locatable
-
-
Constructor Summary
Constructors Constructor Description AbstractWebNode(int x, int y, int z)
AbstractWebNode(org.dreambot.internal.web.WebNodes.WebNode node)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConnections(AbstractWebNode... connections)
double
distance(Tile tile)
Distance (as the crow flies) away from the given tile.boolean
equals(java.lang.Object obj)
boolean
execute(MethodContext ctx)
boolean
forceNext()
java.util.List<AbstractWebNode>
getConnections()
int
getGridX()
Gets grid (local) X coordinate of the given object.int
getGridY()
Gets grid (local) Y coordinate of the given object.int
getGX()
int
getGX(int x)
int
getGX(java.awt.Point mapLoc)
int
getGY()
int
getGY(int y)
int
getGY(java.awt.Point mapLoc)
int
getIndex()
Tile
getTile()
Gets tile of the object.TileReference
getTileReference()
Gets tile reference of the given object.WebNodeType
getType()
int
getX()
Gets X coordinate of the given object.int
getY()
Gets Y coordinate of the given object.int
getZ()
Gets Z coordinate of the given object.int
hashCode()
boolean
hasRequirements()
boolean
isValid()
void
removeConnections(AbstractWebNode... connections)
void
setConnections(java.util.List<AbstractWebNode> connections)
void
setX(int x)
void
setY(int y)
java.lang.String
toString()
double
walkingDistance(Tile tile)
Walking distance based on path finding away from the given tile.
-
-
-
Method Detail
-
getX
public int getX()
Description copied from interface:Locatable
Gets X coordinate of the given object.
-
setX
public void setX(int x)
-
hasRequirements
public boolean hasRequirements()
-
getGridX
public int getGridX()
Description copied from interface:Locatable
Gets grid (local) X coordinate of the given object.
-
getGridY
public int getGridY()
Description copied from interface:Locatable
Gets grid (local) Y coordinate of the given object.
-
getZ
public int getZ()
Description copied from interface:Locatable
Gets Z coordinate of the given object.
-
distance
public double distance(Tile tile)
Description copied from interface:Locatable
Distance (as the crow flies) away from the given tile.
-
getTileReference
public TileReference getTileReference()
Description copied from interface:Locatable
Gets tile reference of the given object.- Specified by:
getTileReference
in interfaceLocatable
- Returns:
- the object tile reference.
-
getY
public int getY()
Description copied from interface:Locatable
Gets Y coordinate of the given object.
-
setY
public void setY(int y)
-
getType
public WebNodeType getType()
-
getConnections
public java.util.List<AbstractWebNode> getConnections()
-
setConnections
public void setConnections(java.util.List<AbstractWebNode> connections)
-
addConnections
public void addConnections(AbstractWebNode... connections)
-
removeConnections
public void removeConnections(AbstractWebNode... connections)
-
getGX
public int getGX()
-
getGX
public int getGX(java.awt.Point mapLoc)
-
getGX
public int getGX(int x)
-
getGY
public int getGY()
-
getGY
public int getGY(java.awt.Point mapLoc)
-
getGY
public int getGY(int y)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getIndex
public int getIndex()
-
execute
public boolean execute(MethodContext ctx)
-
forceNext
public boolean forceNext()
-
isValid
public boolean isValid()
-
walkingDistance
public double walkingDistance(Tile tile)
Description copied from interface:Locatable
Walking distance based on path finding away from the given tile. This is more expensive of a call than distance, and should be used sparingly.- Specified by:
walkingDistance
in interfaceLocatable
- Parameters:
tile
- the destination tile.- Returns:
- return the path distance movement cost from the given tile as a double. If there isn't a path to the tile, it will return 3 times the as the crow flies distance.
-
-