forked from MagicBane/Server
mob desync issue
This commit is contained in:
@@ -63,10 +63,8 @@ public class Corpse extends AbstractWorldObject {
|
|||||||
this.inBuilding = belongsTo.getInBuilding();
|
this.inBuilding = belongsTo.getInBuilding();
|
||||||
this.inFloorID = belongsTo.getInFloorID();
|
this.inFloorID = belongsTo.getInFloorID();
|
||||||
this.inBuildingID = belongsTo.getInBuildingID();
|
this.inBuildingID = belongsTo.getInBuildingID();
|
||||||
if(belongsTo.isMoving())
|
belongsTo.stopMovement(belongsTo.getMovementLoc());
|
||||||
this.setLoc(belongsTo.getMovementLoc());
|
this.setLoc(belongsTo.getMovementLoc());
|
||||||
else
|
|
||||||
this.setLoc(belongsTo.getLoc());
|
|
||||||
} else {
|
} else {
|
||||||
Logger.error("No player passed in for corpse");
|
Logger.error("No player passed in for corpse");
|
||||||
this.firstName = "";
|
this.firstName = "";
|
||||||
|
|||||||
@@ -858,6 +858,9 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
|
|
||||||
public void updateLocation() {
|
public void updateLocation() {
|
||||||
|
|
||||||
|
if(true)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!this.isMoving())
|
if (!this.isMoving())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -247,6 +247,8 @@ public class WorldServer {
|
|||||||
nextWareHousePushTime = LocalDateTime.now().plusMinutes(15);
|
nextWareHousePushTime = LocalDateTime.now().plusMinutes(15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(LocalDateTime.now().isAfter(nextDiscSpawn)) {
|
||||||
switch (LocalDateTime.now().getHour()) {
|
switch (LocalDateTime.now().getHour()) {
|
||||||
case 0:
|
case 0:
|
||||||
case 4:
|
case 4:
|
||||||
@@ -262,6 +264,8 @@ public class WorldServer {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
nextDiscSpawn = nextDiscSpawn.plusHours(1);
|
||||||
|
}
|
||||||
ThreadUtils.sleep(50);
|
ThreadUtils.sleep(50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user