mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-04 00:31:54 +00:00
eab153ee3f
* Object definition cleanup * Update ShopAssistant.java * stackables * notables * unused files * more junk * almost done * working * moving old methods to deprecated * update * fixed pickpocket typos * Update Pickpocket.java * Remove redundant method. Fix stall stealing * Documentation for deprecated methods * WIP commit partial removal. Has test and dump classes * Final cleanup * Move definitions from data folder to cfg * Temporarily moving definition loaders to GameEngine This is until loading can be done asynchronously. * Correct indentation.
85 lines
1.5 KiB
Java
85 lines
1.5 KiB
Java
package com.rs2.game.objects;
|
|
|
|
import org.apollo.cache.def.ObjectDefinition;
|
|
|
|
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() {
|
|
ObjectDefinition def = ObjectDefinition.lookup(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.getWidth();
|
|
yLength = def.getLength();
|
|
} else {
|
|
xLength = def.getLength();
|
|
yLength = def.getWidth();
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
}
|