From 722f867fa7d47b88e36eeb89f6bfe3db65ed1e55 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 19 Sep 2008 02:15:10 +0000 Subject: [PATCH] Grumble. Let's just make modified and modCount non-transient as that is screwing us on Whirled when we move members' stat sets between servers. This means Bang will be transmitting a couple of extra bytes per Stat instance down to the client but I'd rather not have some way to make some kooky distinction between when we're sending Stat instances between servers versus to a client. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@745 c613c5cb-e716-0410-b11b-feb51c14d237 --- src/java/com/threerings/stats/data/Stat.java | 26 ++++---------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/src/java/com/threerings/stats/data/Stat.java b/src/java/com/threerings/stats/data/Stat.java index 1b2af67b..0bb04a86 100644 --- a/src/java/com/threerings/stats/data/Stat.java +++ b/src/java/com/threerings/stats/data/Stat.java @@ -156,22 +156,6 @@ public abstract class Stat _modCount = modCount; } - /** Writes our custom streamable fields. */ - public void writeObject (ObjectOutputStream out) - throws IOException - { - out.writeInt(_type.code()); - out.defaultWriteObject(); - } - - /** Reads our custom streamable fields. */ - public void readObject (ObjectInputStream in) - throws IOException, ClassNotFoundException - { - _type = getType(in.readInt()); - in.defaultReadObject(); - } - /** * Serializes this instance for storage in the item database. Derived classes must override * this method to implement persistence. @@ -218,14 +202,14 @@ public abstract class Stat } /** The type of the statistic in question. */ - protected transient Type _type; + protected Type _type; - /** Indicates whether or not this statistic has been modified since it - * was loaded from the database. */ - protected transient boolean _modified; + /** Indicates whether or not this statistic has been modified since it was loaded from the + * database. */ + protected boolean _modified; /** The last known modification count for this stat, if it was read from the database. */ - protected transient byte _modCount; + protected byte _modCount; /** Used for computing our stat codes. */ protected static CRC32 _crc = new CRC32();