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
This commit is contained in:
@@ -156,22 +156,6 @@ public abstract class Stat
|
|||||||
_modCount = modCount;
|
_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
|
* Serializes this instance for storage in the item database. Derived classes must override
|
||||||
* this method to implement persistence.
|
* this method to implement persistence.
|
||||||
@@ -218,14 +202,14 @@ public abstract class Stat
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** The type of the statistic in question. */
|
/** 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
|
/** Indicates whether or not this statistic has been modified since it was loaded from the
|
||||||
* was loaded from the database. */
|
* database. */
|
||||||
protected transient boolean _modified;
|
protected boolean _modified;
|
||||||
|
|
||||||
/** The last known modification count for this stat, if it was read from the database. */
|
/** 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. */
|
/** Used for computing our stat codes. */
|
||||||
protected static CRC32 _crc = new CRC32();
|
protected static CRC32 _crc = new CRC32();
|
||||||
|
|||||||
Reference in New Issue
Block a user