mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-07 16:49:07 +00:00
This update resolves dginovker/2006rebotted#166
Added proper object size calculations. Removed old objectDistance code. Added current task support, allows easy creation of player tasks that cannot duplicate.
This commit is contained in:
@@ -28,7 +28,21 @@ public class Region {
|
||||
public static boolean blockedShot(int x, int y, int z) {
|
||||
return (getClipping(x, y, z) & 0x20000) == 0;
|
||||
}
|
||||
|
||||
|
||||
public static Objects getObject(int id, int x, int y, int z) {
|
||||
Region r = getRegion(x, y);
|
||||
if (r == null)
|
||||
return null;
|
||||
for (Objects o : r.realObjects) {
|
||||
if (o.objectId == id) {
|
||||
if (o.objectX == x && o.objectY == y && o.objectHeight == z) {
|
||||
return o;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean objectExists(int id, int x, int y, int z) {
|
||||
Region r = getRegion(x, y);
|
||||
if (r == null)
|
||||
|
||||
Reference in New Issue
Block a user