mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-10-18 08:02:56 -04:00
Went into an insane bugfixing mode in the core
This commit is contained in:
@@ -9,7 +9,7 @@ import resources.objects.intangible.IntangibleObject;
|
||||
import resources.player.Player;
|
||||
import utilities.Encoder;
|
||||
|
||||
public class WaypointObject extends IntangibleObject implements Encodable{
|
||||
public class WaypointObject extends IntangibleObject implements Encodable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -55,8 +55,7 @@ public class WaypointObject extends IntangibleObject implements Encodable{
|
||||
public boolean isActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setActive(boolean active) {
|
||||
this.active = active;
|
||||
}
|
||||
@@ -81,6 +80,22 @@ public class WaypointObject extends IntangibleObject implements Encodable{
|
||||
return bb.array();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!super.equals(o))
|
||||
return false;
|
||||
if (o instanceof WaypointObject) {
|
||||
WaypointObject wp = (WaypointObject) o;
|
||||
return wp.name.equals(name) && wp.cellNumber == cellNumber && wp.color == color && wp.active == active;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ((super.hashCode() * 7 + name.hashCode()) * 13 + color.getValue()) * 17 + cellNumber;
|
||||
}
|
||||
|
||||
public enum WaypointColor{
|
||||
BLUE(1), GREEN(2), ORANGE(3), YELLOW(4), PURPLE(5), WHITE(6), MULTICOLOR(7);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user