Clear the NPC building owner set after the NPC load

After boot the NPC cache answers ownerIsNPC, so the set is not kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MagicBotandClaude Opus 5.5 committed 2026-10-26 19:20:03 -04:00
1 parent 35f1738ee4
commit 03399bece7
1 file changed
+4
+4
View File
@@ -535,6 +535,10 @@ public class WorldServer {
DbManager.CityQueries.GET_ALL_CITIES();
Logger.info("Loading all NPCs");
DbManager.NPCQueries.GET_ALL_NPCS();
// NPCs are cached now; Building.runAfterLoad falls back to the NPC cache.
BuildingManager._npcBuildingOwners.clear();
Logger.info("Loading all Mobiles");
DbManager.MobQueries.GET_ALL_MOBS();