Fix stuff in rogue instances "not despawning"

This commit is contained in:
Melledy
2023-10-26 04:39:32 -07:00
parent 30d36e8d37
commit 7e15a93af1
3 changed files with 6 additions and 2 deletions

View File

@@ -489,7 +489,7 @@ public class Player {
// Get scene that we want to enter // Get scene that we want to enter
Scene nextScene = null; Scene nextScene = null;
if (getScene() != null && getScene().getPlaneId() == planeId && getScene().getFloorId() == floorId) { if (getScene() != null && getScene().getPlaneId() == planeId && getScene().getFloorId() == floorId && getScene().getPlaneType() != PlaneType.Rogue) {
// Don't create a new scene if were already in the one we want to teleport to // Don't create a new scene if were already in the one we want to teleport to
nextScene = this.scene; nextScene = this.scene;
} else { } else {

View File

@@ -62,7 +62,7 @@ public class RogueInstance {
return this.getRoomBySiteId(this.getCurrentSiteId()); return this.getRoomBySiteId(this.getCurrentSiteId());
} }
public RogueRoomData enterRoom(int siteId) { public synchronized RogueRoomData enterRoom(int siteId) {
// Set status on previous room // Set status on previous room
RogueRoomData prevRoom = getCurrentRoom(); RogueRoomData prevRoom = getCurrentRoom();
if (prevRoom != null) { if (prevRoom != null) {

View File

@@ -94,6 +94,10 @@ public class Scene {
this.loaded = true; this.loaded = true;
} }
public PlaneType getPlaneType() {
return this.getExcel().getPlaneType();
}
private void initSpawns() { private void initSpawns() {
for (GroupInfo group : getFloorInfo().getGroups().values()) { for (GroupInfo group : getFloorInfo().getGroups().values()) {
// Skip non-server groups // Skip non-server groups