From: Hendrik <nh...@us...> - 2007-07-22 16:06:51
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv32057/src/games/stendhal/server Modified Files: Tag: VERSION_00_RELEASE_61 StendhalPlayerDatabase.java Log Message: create classes before reading the objects in main method Index: StendhalPlayerDatabase.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/StendhalPlayerDatabase.java,v retrieving revision 1.19.6.1 retrieving revision 1.19.6.2 diff -C2 -d -r1.19.6.1 -r1.19.6.2 *** StendhalPlayerDatabase.java 22 Jul 2007 15:38:56 -0000 1.19.6.1 --- StendhalPlayerDatabase.java 22 Jul 2007 16:06:50 -0000 1.19.6.2 *************** *** 1,4 **** --- 1,8 ---- package games.stendhal.server; + import games.stendhal.server.entity.Entity; + import games.stendhal.server.entity.RPEntity; + import games.stendhal.server.entity.player.Player; + import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; *************** *** 86,89 **** --- 90,96 ---- public RPObject loadRPObject(Transaction trans, int id) throws Exception { Connection connection = ((JDBCTransaction) trans).getConnection(); + + // init rpclasses + StendhalRPWorld.get(); String query = "select data from avatars where object_id=" + id; *************** *** 126,130 **** } ! public synchronized int storeRPObjectX(Transaction trans, RPObject object) throws SQLException { Connection connection = ((JDBCTransaction) trans).getConnection(); --- 133,137 ---- } ! public synchronized int storeRPObject(Transaction trans, RPObject object) throws SQLException { Connection connection = ((JDBCTransaction) trans).getConnection(); *************** *** 324,328 **** System.out.println("PORTING 'new' AVATARS system back to RPOBJECT, RPATTRIBUTE and RPSLOT tables"); System.out.println(); ! Configuration.setConfigurationFile("stendhal.ini"); JDBCPlayerDatabase odb = (JDBCPlayerDatabase) StendhalPlayerDatabase.resetDatabaseConnection(); --- 331,335 ---- System.out.println("PORTING 'new' AVATARS system back to RPOBJECT, RPATTRIBUTE and RPSLOT tables"); System.out.println(); ! Configuration.setConfigurationFile("marauroa.ini"); JDBCPlayerDatabase odb = (JDBCPlayerDatabase) StendhalPlayerDatabase.resetDatabaseConnection(); |