From 1cb103c1563d04e180ddd42499a05ff2f698978a Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 4 Apr 2023 11:08:07 -0400 Subject: [PATCH] Slots are slots; blueprint logic not needed on back-end. --- src/engine/objects/Mob.java | 6 ++++-- src/engine/objects/NPC.java | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 917994bb..40105e64 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -803,9 +803,11 @@ public class Mob extends AbstractIntelligenceAgent { } else this.level = 1; - //add this npc to building + // Use slot locations and add as a hireling + // only if this building has a blueprint. + // otherwise use the mob cache location. - if (this.building != null) { + if (this.building != null && building.getBlueprintUUID() != 0) { int maxSlots = 10; diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index a3740bf4..e026cd25 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -216,10 +216,12 @@ public class NPC extends AbstractCharacter { } this.name = rs.getString("npc_name"); - this.buyPercent = rs.getFloat("npc_buyPercent"); - if (this.buyPercent == 1) - this.buyPercent = .33f; + // Most objects from the cache have a default buy + // percentage of 100% which was a dupe source due + // to the way MB calculated item values. + + // this.buyPercent = rs.getFloat("npc_buyPercent"); this.buyPercent = .33f; this.sellPercent = 1;