diff options
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 61 |
1 files changed, 1 insertions, 60 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 94d68df88..2b519462d 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -4261,7 +4261,6 @@ void mob_readdb(void) { mob->name_constants(); } - int mob_read_libconfig(const char *filename, bool ignore_missing) { config_t mob_db_conf; @@ -4809,59 +4808,6 @@ void mob_readskilldb(void) { } } -/** - * mob_skill_db table reading [CalciumKid] - * not overly sure if this is all correct - * seems to work though... - */ -int mob_read_sqlskilldb(void) { - const char* mob_skill_db_name[] = { - map->mob_skill_db_db, - map->mob_skill_db2_db - }; - int fi; - - if( battle_config.mob_skill_rate == 0 ) { - ShowStatus("Mob skill use disabled. Not reading mob skills.\n"); - return 0; - } - - for( fi = 0; fi < ARRAYLENGTH(mob_skill_db_name); ++fi ) { - uint32 lines = 0, count = 0; - - // retrieve all rows from the mob skill database - if( SQL_ERROR == SQL->Query(map->mysql_handle, "SELECT * FROM `%s`", mob_skill_db_name[fi]) ) { - Sql_ShowDebug(map->mysql_handle); - continue; - } - - // process rows one by one - while( SQL_SUCCESS == SQL->NextRow(map->mysql_handle) ) { - // wrap the result into a TXT-compatible format - char* str[19]; - char* dummy = ""; - int i; - ++lines; - for( i = 0; i < 19; ++i ) - { - SQL->GetData(map->mysql_handle, i, &str[i], NULL); - if( str[i] == NULL ) str[i] = dummy; // get rid of NULL columns - } - - if (!mob->parse_row_mobskilldb(str, 19, count)) - continue; - - count++; - } - - // free the query result - SQL->FreeResult(map->mysql_handle); - - ShowStatus("Done reading '"CL_WHITE"%"PRIu32""CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, mob_skill_db_name[fi]); - } - return 0; -} - /*========================================== * mob_race2_db.txt reading *------------------------------------------*/ @@ -4925,11 +4871,7 @@ void mob_load(bool minimal) { sv->readdb(map->db_path, "mob_item_ratio.txt", ',', 2, 2+MAX_ITEMRATIO_MOBS, -1, mob->readdb_itemratio); // must be read before mobdb mob->readchatdb(); mob->readdb(); - if (map->db_use_sql_mob_skill_db) { - mob->read_sqlskilldb(); - } else { - mob->readskilldb(); - } + mob->readskilldb(); sv->readdb(map->db_path, "mob_avail.txt", ',', 2, 12, -1, mob->readdb_mobavail); mob->read_randommonster(); sv->readdb(map->db_path, DBPATH"mob_race2_db.txt", ',', 2, 20, -1, mob->readdb_race2); @@ -5155,7 +5097,6 @@ void mob_defaults(void) { mob->readchatdb = mob_readchatdb; mob->parse_row_mobskilldb = mob_parse_row_mobskilldb; mob->readskilldb = mob_readskilldb; - mob->read_sqlskilldb = mob_read_sqlskilldb; mob->readdb_race2 = mob_readdb_race2; mob->readdb_itemratio = mob_readdb_itemratio; mob->load = mob_load; |