Created
October 29, 2013 05:43
-
-
Save VlLight/7209624 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: java/com/l2jserver/gameserver/model/interfaces/ILocational.java | |
=================================================================== | |
--- java/com/l2jserver/gameserver/model/interfaces/ILocational.java (revision 6253) | |
+++ java/com/l2jserver/gameserver/model/interfaces/ILocational.java (working copy) | |
@@ -37,5 +37,4 @@ | |
public int getInstanceId(); | |
public ILocational getLocation(); | |
- public ILocational getLocation(L2Object obj); | |
} | |
Index: java/com/l2jserver/gameserver/model/L2Object.java | |
=================================================================== | |
--- java/com/l2jserver/gameserver/model/L2Object.java (revision 6253) | |
+++ java/com/l2jserver/gameserver/model/L2Object.java (working copy) | |
@@ -740,7 +740,7 @@ | |
*/ | |
public double calculateDistance(ILocational loc, boolean includeZAxis, boolean squared) | |
{ | |
- return calculateDistance(loc.getLocation(this).getX(), loc.getLocation(this).getY(), loc.getLocation(this).getZ(), includeZAxis, squared); | |
+ return (loc instanceof L2Spawn) ? calculateDistance(((L2Spawn) loc).getLocation(this), includeZAxis, squared) : calculateDistance(loc.getX(), loc.getY(), loc.getZ(), includeZAxis, squared); | |
} | |
@Override | |
@@ -780,12 +780,6 @@ | |
} | |
@Override | |
- public Location getLocation(L2Object obj) | |
- { | |
- return getLocation(); | |
- } | |
- | |
- @Override | |
public void setX(int x) | |
{ | |
_x.set(x); | |
Index: java/com/l2jserver/gameserver/model/L2Spawn.java | |
=================================================================== | |
--- java/com/l2jserver/gameserver/model/L2Spawn.java (revision 6253) | |
+++ java/com/l2jserver/gameserver/model/L2Spawn.java (working copy) | |
@@ -169,7 +169,6 @@ | |
return _location; | |
} | |
- @Override | |
public Location getLocation(L2Object obj) | |
{ | |
return ((_lastSpawnPoints == null) || (obj == null) || !_lastSpawnPoints.containsKey(obj.getObjectId())) ? _location : _lastSpawnPoints.get(obj.getObjectId()); | |
Index: java/com/l2jserver/gameserver/model/Location.java | |
=================================================================== | |
--- java/com/l2jserver/gameserver/model/Location.java (revision 6253) | |
+++ java/com/l2jserver/gameserver/model/Location.java (working copy) | |
@@ -179,13 +179,6 @@ | |
} | |
@Override | |
- public IPositionable getLocation(L2Object obj) | |
- { | |
- return this; | |
- } | |
- | |
- | |
- @Override | |
public void setLocation(Location loc) | |
{ | |
_x = loc.getX(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment