interest management

This commit is contained in:
2025-03-17 19:29:48 -05:00
parent b4b3b0ae17
commit 7eb6535051
2 changed files with 13 additions and 1 deletions
@@ -567,4 +567,14 @@ public enum InterestManager implements Runnable {
playerCharacter.setDirtyLoad(true); playerCharacter.setDirtyLoad(true);
} }
} }
public void RefreshLoadedObjects(PlayerCharacter pc){
try {
pc.getLoadedObjects().clear();
updateStaticList(pc, pc.getClientConnection());
updateMobileList(pc, pc.getClientConnection());
}catch(Exception e){
Logger.error(e.getMessage());
}
}
} }
+3 -1
View File
@@ -5236,8 +5236,10 @@ public class PlayerCharacter extends AbstractCharacter {
if(!this.timestamps.containsKey("nextReload")){ if(!this.timestamps.containsKey("nextReload")){
this.timestamps.put("nextReload",System.currentTimeMillis() + 5000L); this.timestamps.put("nextReload",System.currentTimeMillis() + 5000L);
}else{ }else{
if(this.timestamps.get("nextReload") > System.currentTimeMillis()) if(this.timestamps.get("nextReload") > System.currentTimeMillis()) {
this.setDirtyLoad(true); this.setDirtyLoad(true);
InterestManager.INTERESTMANAGER.RefreshLoadedObjects(this);
}
} }
} catch (Exception e) { } catch (Exception e) {