From 8379b48332cc24a7203f486e34b4f47a013d0386 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 17 May 2024 17:34:42 -0500 Subject: [PATCH] mob resists --- src/engine/devcmd/cmds/PrintResistsCmd.java | 2 +- src/engine/objects/AbstractCharacter.java | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/engine/devcmd/cmds/PrintResistsCmd.java b/src/engine/devcmd/cmds/PrintResistsCmd.java index 51027143..11fea6a2 100644 --- a/src/engine/devcmd/cmds/PrintResistsCmd.java +++ b/src/engine/devcmd/cmds/PrintResistsCmd.java @@ -40,7 +40,7 @@ public class PrintResistsCmd extends AbstractDevCmd { name = mb.getFirstName(); type = "Mob"; throwbackInfo(pc, "Server resists for " + type + ' ' + name); - ((Mob)tar).mobResists.printResistsToClient(pc); + tar.getResists().printResistsToClient(pc); return; } else if (tar instanceof NPC) { NPC npc = (NPC) tar; diff --git a/src/engine/objects/AbstractCharacter.java b/src/engine/objects/AbstractCharacter.java index b65e07a5..ccad17aa 100644 --- a/src/engine/objects/AbstractCharacter.java +++ b/src/engine/objects/AbstractCharacter.java @@ -681,12 +681,13 @@ public abstract class AbstractCharacter extends AbstractWorldObject { if(this.getObjectType().equals(GameObjectType.Mob)){ return ((Mob)this).mobResists; - } + }else { - if (this.resists == null) - return Resists.getResists(0); + if (this.resists == null) + return Resists.getResists(0); - return this.resists; + return this.resists; + } } public final void setResists(final Resists value) {