CharId and clan_id in IdFactory
Posted: Mon Jun 21, 2010 4:56 pm
Hello. I'm trying to transfer all data from PTS server to L2J. I have a question. There is a different id system in L2J (BitSet idFactory). I transfered all IDs with offset (FIRST_OID from IdFactory), but all ids in different tables started with same number (1 + 0x10000000). Is that ok, that row in [characters] has the same id with row in [clan_data]? Function getNextId generates unique id for all tables...
http://www.l2jserver.com/svn/trunk/L2_G ... ctory.java
http://www.l2jserver.com/svn/trunk/L2_G ... ctory.java
Code: Select all
final TIntArrayList temp = new TIntArrayList(); rset = statement.executeQuery("SELECT COUNT(*) FROM characters");rset.next();temp.ensureCapacity(rset.getInt(1));rset = statement.executeQuery("SELECT charId FROM characters");while (rset.next()){ temp.add(rset.getInt(1));} rset = statement.executeQuery("SELECT COUNT(*) FROM items");rset.next();temp.ensureCapacity(temp.size() + rset.getInt(1));rset = statement.executeQuery("SELECT object_id FROM items");while (rset.next()){ temp.add(rset.getInt(1));} rset = statement.executeQuery("SELECT COUNT(*) FROM clan_data");rset.next();temp.ensureCapacity(temp.size() + rset.getInt(1));rset = statement.executeQuery("SELECT clan_id FROM clan_data");while (rset.next()){ temp.add(rset.getInt(1));}