Kaynağa Gözat

Removed pre-re item_db from mysql item db load order when renewal is enabled (special thanks to Xantara for finding out).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16755 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 12 yıl önce
ebeveyn
işleme
6e5076b550
1 değiştirilmiş dosya ile 15 ekleme ve 16 silme
  1. 15 16
      src/map/itemdb.c

+ 15 - 16
src/map/itemdb.c

@@ -1194,37 +1194,36 @@ static int itemdb_readdb(void)
 /*======================================
  * item_db table reading
  *======================================*/
-static int itemdb_read_sqldb(void)
-{
-#ifdef RENEWAL
-	const char* item_db_name[] = { item_db_db, item_db_re_db, item_db2_db };
-#else
-	const char* item_db_name[] = { item_db_db, item_db2_db };
-#endif
+static int itemdb_read_sqldb(void) {
+
+	const char* item_db_name[] = {
+								#ifdef RENEWAL
+									item_db_re_db,
+								#else
+									item_db_db,
+								#endif
+									item_db2_db };
 	int fi;
 	
-	for( fi = 0; fi < ARRAYLENGTH(item_db_name); ++fi )
-	{
+	for( fi = 0; fi < ARRAYLENGTH(item_db_name); ++fi ) {
 		uint32 lines = 0, count = 0;
 
 		// retrieve all rows from the item database
-		if( SQL_ERROR == Sql_Query(mmysql_handle, "SELECT * FROM `%s`", item_db_name[fi]) )
-		{
+		if( SQL_ERROR == Sql_Query(mmysql_handle, "SELECT * FROM `%s`", item_db_name[fi]) ) {
 			Sql_ShowDebug(mmysql_handle);
 			continue;
 		}
 
 		// process rows one by one
-		while( SQL_SUCCESS == Sql_NextRow(mmysql_handle) )
-		{// wrap the result into a TXT-compatible format
+		while( SQL_SUCCESS == Sql_NextRow(mmysql_handle) ) {// wrap the result into a TXT-compatible format
 			char* str[22];
 			char* dummy = "";
 			int i;
 			++lines;
-			for( i = 0; i < 22; ++i )
-			{
+			for( i = 0; i < 22; ++i ) {
 				Sql_GetData(mmysql_handle, i, &str[i], NULL);
-				if( str[i] == NULL ) str[i] = dummy; // get rid of NULL columns
+				if( str[i] == NULL )
+					str[i] = dummy; // get rid of NULL columns
 			}
 
 			if (!itemdb_parse_dbrow(str, item_db_name[fi], lines, SCRIPT_IGNORE_EXTERNAL_BRACKETS))