Browse Source

mob resists

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

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

@ -40,7 +40,7 @@ public class PrintResistsCmd extends AbstractDevCmd { @@ -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;

3
src/engine/objects/AbstractCharacter.java

@ -681,13 +681,14 @@ public abstract class AbstractCharacter extends AbstractWorldObject { @@ -681,13 +681,14 @@ 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);
return this.resists;
}
}
public final void setResists(final Resists value) {
if(this.getObjectType().equals(GameObjectType.Mob))

Loading…
Cancel
Save