mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 00:38:21 +00:00
Rename height field of ObjectDefinition to length.
This commit is contained in:
@@ -60,5 +60,5 @@ on :command, :objectinfo, RIGHTS_ADMIN do |player, command|
|
||||
id = args[0].to_i
|
||||
definition = ObjectDefinition.lookup(id)
|
||||
player.send_message("Object #{id} is called #{definition.name} and its description is \"#{definition.description}\".")
|
||||
player.send_message("Its width is #{definition.width} and its height is #{definition.height}.")
|
||||
player.send_message("Its width is #{definition.width} and its length is #{definition.length}.")
|
||||
end
|
||||
@@ -87,7 +87,7 @@ public final class ObjectDefinitionDecoder {
|
||||
} else if (opcode == 14) {
|
||||
definition.setWidth(data.get() & 0xFF);
|
||||
} else if (opcode == 15) {
|
||||
definition.setHeight(data.get() & 0xFF);
|
||||
definition.setLength(data.get() & 0xFF);
|
||||
} else if (opcode == 17) {
|
||||
definition.setSolid(false);
|
||||
} else if (opcode == 18) {
|
||||
|
||||
@@ -57,8 +57,7 @@ public final class ObjectDefinition {
|
||||
*/
|
||||
public static ObjectDefinition lookup(int id) {
|
||||
if (id < 0 || id > definitions.length) {
|
||||
throw new IndexOutOfBoundsException(ObjectDefinition.class.getName() + " lookup index " + id
|
||||
+ " out of bounds.");
|
||||
throw new IndexOutOfBoundsException(ObjectDefinition.class.getName() + " lookup index " + id + " out of bounds.");
|
||||
}
|
||||
return definitions[id];
|
||||
}
|
||||
@@ -69,9 +68,9 @@ public final class ObjectDefinition {
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* This object's height.
|
||||
* This object's length.
|
||||
*/
|
||||
private int height;
|
||||
private int length;
|
||||
|
||||
/**
|
||||
* The object's id.
|
||||
@@ -127,12 +126,12 @@ public final class ObjectDefinition {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the height of this object.
|
||||
* Gets the length of this object.
|
||||
*
|
||||
* @return The height.
|
||||
* @return The length.
|
||||
*/
|
||||
public int getHeight() {
|
||||
return height;
|
||||
public int getLength() {
|
||||
return length;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -208,12 +207,12 @@ public final class ObjectDefinition {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the height of this object.
|
||||
* Sets the length of this object.
|
||||
*
|
||||
* @param height The height.
|
||||
* @param length The length.
|
||||
*/
|
||||
public void setHeight(int height) {
|
||||
this.height = height;
|
||||
public void setLength(int length) {
|
||||
this.length = length;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user