Browse Source

mob resist issue

lakebane-master
FatBoy-DOTC 6 months ago
parent
commit
a8a9cdb0f1
  1. 3
      src/engine/devcmd/cmds/PrintResistsCmd.java
  2. 5
      src/engine/objects/AbstractCharacter.java

3
src/engine/devcmd/cmds/PrintResistsCmd.java

@ -39,6 +39,9 @@ public class PrintResistsCmd extends AbstractDevCmd {
if (mb != null) if (mb != null)
name = mb.getFirstName(); name = mb.getFirstName();
type = "Mob"; type = "Mob";
throwbackInfo(pc, "Server resists for " + type + ' ' + name);
((Mob)tar).mobResists.printResistsToClient(pc);
return;
} else if (tar instanceof NPC) { } else if (tar instanceof NPC) {
NPC npc = (NPC) tar; NPC npc = (NPC) tar;
Contract contract = npc.getContract(); Contract contract = npc.getContract();

5
src/engine/objects/AbstractCharacter.java

@ -678,13 +678,14 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
} }
public final Resists getResists() { public final Resists getResists() {
if (this.resists == null && !this.getObjectType().equals(GameObjectType.Mob))
return Resists.getResists(0);
if(this.getObjectType().equals(GameObjectType.Mob)){ if(this.getObjectType().equals(GameObjectType.Mob)){
return ((Mob)this).mobResists; return ((Mob)this).mobResists;
} }
if (this.resists == null)
return Resists.getResists(0);
return this.resists; return this.resists;
} }

Loading…
Cancel
Save