forked from MagicBane/Server
setRegion removal
This commit is contained in:
@@ -464,7 +464,7 @@ public enum MovementManager {
|
||||
}
|
||||
}
|
||||
|
||||
public static void translocate(AbstractCharacter teleporter, Vector3fImmutable targetLoc, Regions region) {
|
||||
public static void translocate(AbstractCharacter teleporter, Vector3fImmutable targetLoc) {
|
||||
|
||||
|
||||
if (targetLoc == null)
|
||||
@@ -473,7 +473,6 @@ public enum MovementManager {
|
||||
Vector3fImmutable oldLoc = new Vector3fImmutable(teleporter.getLoc());
|
||||
|
||||
teleporter.stopMovement(targetLoc);
|
||||
teleporter.setRegion(region);
|
||||
|
||||
//mobs ignore region sets for now.
|
||||
if (teleporter.getObjectType().equals(GameObjectType.Mob)) {
|
||||
|
||||
@@ -61,8 +61,6 @@ public class FinishSummonsJob extends AbstractScheduleJob {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.source.region != null)
|
||||
this.target.setRegion(this.source.region);
|
||||
//teleport target to source
|
||||
target.teleport(source.getLoc());
|
||||
}
|
||||
|
||||
@@ -736,7 +736,7 @@ public class MobAI {
|
||||
//mob no longer has its owner loaded, translate pet to owner
|
||||
|
||||
if (!mob.playerAgroMap.containsKey(mob.guardCaptain.getObjectUUID())) {
|
||||
MovementManager.translocate(mob, mob.guardCaptain.getLoc(), null);
|
||||
MovementManager.translocate(mob, mob.guardCaptain.getLoc());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,6 @@ public class RequestEnterWorldHandler extends AbstractClientMsgHandler {
|
||||
player.stopMovement(player.getBindLoc());
|
||||
player.setSafeMode();
|
||||
player.updateLocation();
|
||||
player.setRegion(AbstractWorldObject.GetRegionByWorldObject(player));
|
||||
}
|
||||
|
||||
player.setTimeStamp("logout", 0);
|
||||
|
||||
@@ -512,10 +512,9 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
||||
}
|
||||
|
||||
public static void teleport(AbstractCharacter worldObject, final Vector3fImmutable targetLoc) {
|
||||
Regions targetRegion = Regions.GetRegionForTeleport(targetLoc);
|
||||
worldObject.locationLock.writeLock().lock();
|
||||
try {
|
||||
MovementManager.translocate(worldObject, targetLoc, targetRegion);
|
||||
MovementManager.translocate(worldObject, targetLoc);
|
||||
if (worldObject.getObjectType().equals(GameObjectType.PlayerCharacter))
|
||||
InterestManager.INTERESTMANAGER.HandleLoadForTeleport((PlayerCharacter) worldObject);
|
||||
} catch (Exception e) {
|
||||
@@ -1458,10 +1457,9 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
||||
}
|
||||
|
||||
public void teleport(final Vector3fImmutable targetLoc) {
|
||||
Regions targetRegion = Regions.GetRegionForTeleport(targetLoc);
|
||||
locationLock.writeLock().lock();
|
||||
try {
|
||||
MovementManager.translocate(this, targetLoc, targetRegion);
|
||||
MovementManager.translocate(this, targetLoc);
|
||||
MovementManager.sendRWSSMsg(this);
|
||||
} catch (Exception e) {
|
||||
Logger.error(e);
|
||||
|
||||
@@ -5472,11 +5472,10 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
@Override
|
||||
public final void teleport(final Vector3fImmutable targetLoc) {
|
||||
|
||||
Regions targetRegion = Regions.GetRegionForTeleport(targetLoc);
|
||||
locationLock.writeLock().lock();
|
||||
|
||||
try {
|
||||
MovementManager.translocate(this, targetLoc, targetRegion);
|
||||
MovementManager.translocate(this, targetLoc);
|
||||
} catch (Exception e) {
|
||||
Logger.error(e);
|
||||
} finally {
|
||||
|
||||
@@ -38,7 +38,7 @@ public class MobRecallPowerAction extends AbstractPowerAction {
|
||||
return;
|
||||
|
||||
|
||||
MovementManager.translocate(awoac, awoac.getBindLoc(), null);
|
||||
MovementManager.translocate(awoac, awoac.getBindLoc());
|
||||
if (awoac.getObjectType() == GameObjectType.Mob) {
|
||||
//MobAI.setAwake((Mob)awoac,true);
|
||||
((Mob) awoac).setCombatTarget(null);
|
||||
|
||||
@@ -58,7 +58,7 @@ public class RecallPowerAction extends AbstractPowerAction {
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, engine.Enum.DispatchChannel.SECONDARY);
|
||||
|
||||
} else {
|
||||
MovementManager.translocate(awoac, awoac.getBindLoc(), null);
|
||||
MovementManager.translocate(awoac, awoac.getBindLoc());
|
||||
}
|
||||
} else {
|
||||
Vector3fImmutable bindloc = awoac.getBindLoc();
|
||||
|
||||
@@ -101,7 +101,7 @@ public class TeleportPowerAction extends AbstractPowerAction {
|
||||
if (region != null && !region.isOutside())
|
||||
return;
|
||||
|
||||
MovementManager.translocate(awoac, targetLoc, region);
|
||||
MovementManager.translocate(awoac, targetLoc);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user