package NET.worlds.scape; import java.io.IOException; public class PickUpAction extends Action { private static Object classCookie = new Object(); @Override public Persister trigger(Event arg, Persister seqID) { WObject w = (WObject)this.getOwner(); w.detach(); w.raise(-Pilot.getActive().getZ()); Pilot.getActive().add(w); return null; } @Override public void saveState(Saver s) throws IOException { s.saveVersion(0, classCookie); super.saveState(s); } @Override public void restoreState(Restorer r) throws IOException, TooNewException { switch (r.restoreVersion(classCookie)) { case 0: super.restoreState(r); return; default: throw new TooNewException(); } } }