Files
2006Scape/2006Redone Server/src/redone/game/objects/Objects.java
T
Mr Extremez 2b6ff7db02 Global drops/monks/al kharid furnance (#192)
closes #177
closes #136 (hp restoring works, couldn't find the anim tho)
closes #178 (should fix all the issues, let me know for sure)
Also removed the object does not exist message ingame for non admins and got rid of the isBotting code when clicking objects
2019-11-17 18:30:08 -05:00

84 lines
1.6 KiB
Java

package redone.game.objects;
import redone.world.clip.ObjectDef;
public class Objects {
public long delay, oDelay;
public int xp, item, owner, target, times;
public boolean bait;
public String belongsTo;
public int objectId;
public int objectX;
public int objectY;
public int objectHeight;
public int objectFace;
public int objectType;
public int objectTicks;
public int getObjectId() {
return objectId;
}
public int getObjectX() {
return objectX;
}
public int getObjectY() {
return objectY;
}
public Objects(int id, int x, int y, int height, int face, int type, int ticks) {
objectId = id;
objectX = x;
objectY = y;
objectHeight = height;
objectFace = face;
objectType = type;
objectTicks = ticks;
}
public int[] getObjectSize() {
ObjectDef def = ObjectDef.getObjectDef(objectId);
if (def == null)
return new int[] {1, 1};
if (objectId == 2781) {
return new int[] {3, 3};
}
int xLength;
int yLength;
if (objectFace != 1 && objectFace != 3) {
xLength = def.xLength();
yLength = def.yLength();
} else {
xLength = def.yLength();
yLength = def.xLength();
}
return new int[] {xLength, yLength};
}
@Override
public String toString() {
return "Objects{" +
"objectId=" + objectId +
", objectX=" + objectX +
", objectY=" + objectY +
", objectHeight=" + objectHeight +
'}';
}
public int getObjectHeight() {
return objectHeight;
}
public int getObjectFace() {
return objectFace;
}
public int getObjectType() {
return objectType;
}
}