interest management

This commit is contained in:
2025-03-17 21:08:33 -05:00
parent 04a2d6fb1c
commit 1fda6cc80d
@@ -568,11 +568,20 @@ public enum InterestManager implements Runnable {
} }
} }
public void RefreshLoadedObjects(PlayerCharacter pc){ public void RefreshLoadedObjects(PlayerCharacter player){
try { try {
pc.getLoadedObjects().clear(); if (player == null)
updateStaticList(pc, pc.getClientConnection()); return;
updateMobileList(pc, pc.getClientConnection());
ClientConnection origin = player.getClientConnection();
if (origin == null)
return;
// Update loaded upbjects lists
player.setDirtyLoad(true);
updateStaticList(player, origin);
updateMobileList(player, origin);
}catch(Exception e){ }catch(Exception e){
Logger.error(e.getMessage()); Logger.error(e.getMessage());
} }