// // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) // package NET.worlds.scape; import NET.worlds.console.Console; import NET.worlds.console.Gamma; import NET.worlds.core.Debug; import java.io.IOException; import java.text.MessageFormat; import java.util.Enumeration; public abstract class SetObjectPropertyAction extends Action { SuperRoot _target; private int _propIndex = -1; private static Object classCookie = new Object(); public SetObjectPropertyAction() { } public SuperRoot getTarget() { return this._target != null ? this._target : this.getOwner(); } static int index(int var0, String var1, Object var2) { if (var0 == -1 && var1 != null) { EnumProperties var3 = new EnumProperties(var2); while(var3.hasMoreElements()) { Property var4 = (Property)var3.nextElement(); if (var4.getName().equals(var1)) { var0 = var4.getIndex(); break; } } } return var0; } public static Object propHelper(int var0, Object var1, String var2, SuperRoot var3) { Object var4 = null; int var5 = index(-1, var2, var3); if (var5 != -1) { try { var4 = var3.properties(var5, 0, var0, var1); } catch (NoSuchPropertyException var7) { } } return var4; } public Object properties(int var1, int var2, int var3, Object var4) throws NoSuchPropertyException { Object var5 = null; Property var7; switch (var1 - var2) { case 0: if (var3 == 0) { var7 = new Property(this, var1, "Target"); var7.allowSetNull(); var5 = ObjPropertyEditor.make(var7, this.getRoom(), "NET.worlds.scape.SuperRoot"); } else if (var3 == 1) { var5 = this.getTarget(); } else if (var3 == 2) { this._target = (SuperRoot)var4; this._propIndex = -1; } break; default: var5 = super.properties(var1, var2 + 1, var3, var4); } return var5; } public void saveState(Saver var1) throws IOException { var1.saveVersion(0, classCookie); super.saveState(var1); var1.saveMaybeNull(this.getTarget()); } protected void setPropertyActionRestoreState(Restorer var1) throws IOException, TooNewException { switch (var1.restoreVersion(classCookie)) { case 0: super.restoreState(var1); this._target = (SuperRoot)var1.restoreMaybeNull(); break; default: throw new TooNewException(); } } public void restoreState(Restorer var1) throws IOException, TooNewException { this.setPropertyActionRestoreState(var1); } }