From a8a9cdb0f1170e54ec5934b5da06545c83d2d45e Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 12 May 2024 17:03:29 -0500 Subject: [PATCH] mob resist issue --- src/engine/devcmd/cmds/PrintResistsCmd.java | 3 +++ src/engine/objects/AbstractCharacter.java | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/engine/devcmd/cmds/PrintResistsCmd.java b/src/engine/devcmd/cmds/PrintResistsCmd.java index 2bcfbf46..51027143 100644 --- a/src/engine/devcmd/cmds/PrintResistsCmd.java +++ b/src/engine/devcmd/cmds/PrintResistsCmd.java @@ -39,6 +39,9 @@ public class PrintResistsCmd extends AbstractDevCmd { if (mb != null) name = mb.getFirstName(); type = "Mob"; + throwbackInfo(pc, "Server resists for " + type + ' ' + name); + ((Mob)tar).mobResists.printResistsToClient(pc); + return; } else if (tar instanceof NPC) { NPC npc = (NPC) tar; Contract contract = npc.getContract(); diff --git a/src/engine/objects/AbstractCharacter.java b/src/engine/objects/AbstractCharacter.java index dcbe7553..b65e07a5 100644 --- a/src/engine/objects/AbstractCharacter.java +++ b/src/engine/objects/AbstractCharacter.java @@ -678,13 +678,14 @@ public abstract class AbstractCharacter extends AbstractWorldObject { } public final Resists getResists() { - if (this.resists == null && !this.getObjectType().equals(GameObjectType.Mob)) - return Resists.getResists(0); if(this.getObjectType().equals(GameObjectType.Mob)){ return ((Mob)this).mobResists; } + if (this.resists == null) + return Resists.getResists(0); + return this.resists; }