Browse Source

setRegion removal

feature-region-set
FatBoy-DOTC 1 year ago
parent
commit
a313e3f364
  1. 3
      src/engine/gameManager/MovementManager.java
  2. 2
      src/engine/jobs/FinishSummonsJob.java
  3. 2
      src/engine/mobileAI/MobAI.java
  4. 1
      src/engine/net/client/handlers/RequestEnterWorldHandler.java
  5. 6
      src/engine/objects/AbstractCharacter.java
  6. 3
      src/engine/objects/PlayerCharacter.java
  7. 2
      src/engine/powers/poweractions/MobRecallPowerAction.java
  8. 2
      src/engine/powers/poweractions/RecallPowerAction.java
  9. 2
      src/engine/powers/poweractions/TeleportPowerAction.java

3
src/engine/gameManager/MovementManager.java

@ -464,7 +464,7 @@ public enum MovementManager { @@ -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 { @@ -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)) {

2
src/engine/jobs/FinishSummonsJob.java

@ -61,8 +61,6 @@ public class FinishSummonsJob extends AbstractScheduleJob { @@ -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());
}

2
src/engine/mobileAI/MobAI.java

@ -736,7 +736,7 @@ public class MobAI { @@ -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;
}

1
src/engine/net/client/handlers/RequestEnterWorldHandler.java

@ -110,7 +110,6 @@ public class RequestEnterWorldHandler extends AbstractClientMsgHandler { @@ -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);

6
src/engine/objects/AbstractCharacter.java

@ -512,10 +512,9 @@ public abstract class AbstractCharacter extends AbstractWorldObject { @@ -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 { @@ -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);

3
src/engine/objects/PlayerCharacter.java

@ -5472,11 +5472,10 @@ public class PlayerCharacter extends AbstractCharacter { @@ -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 {

2
src/engine/powers/poweractions/MobRecallPowerAction.java

@ -38,7 +38,7 @@ public class MobRecallPowerAction extends AbstractPowerAction { @@ -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);

2
src/engine/powers/poweractions/RecallPowerAction.java

@ -58,7 +58,7 @@ public class RecallPowerAction extends AbstractPowerAction { @@ -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();

2
src/engine/powers/poweractions/TeleportPowerAction.java

@ -101,7 +101,7 @@ public class TeleportPowerAction extends AbstractPowerAction { @@ -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

Loading…
Cancel
Save