diff --git a/src/map/itemdb.cpp b/src/map/itemdb.cpp index e2c30302da..38c814b58e 100644 --- a/src/map/itemdb.cpp +++ b/src/map/itemdb.cpp @@ -4164,10 +4164,13 @@ static int itemdb_read_sqldb(void) { uint32 total_columns = Sql_NumColumns(mmysql_handle); uint64 total_rows = Sql_NumRows(mmysql_handle), rows = 0, count = 0; + ShowStatus("Loading '" CL_WHITE "%" PRIdPTR CL_RESET "' entries in '" CL_WHITE "%s" CL_RESET "'\n", total_rows, item_db_name[fi]); + // process rows one by one while( SQL_SUCCESS == Sql_NextRow(mmysql_handle) ) { - ShowStatus( "Loading [%" PRIu64 "/%" PRIu64 "] rows from '" CL_WHITE "%s" CL_RESET "'" CL_CLL "\r", ++rows, total_rows, item_db_name[fi] ); - +#ifdef DEBUG + ShowStatus( "Loading [%" PRIu64 "/%" PRIu64 "] entries in '" CL_WHITE "%s" CL_RESET "'" CL_CLL "\r", ++rows, total_rows, item_db_name[fi] ); +#endif std::vector data = {}; for( uint32 i = 0; i < total_columns; ++i ) { diff --git a/src/map/map.cpp b/src/map/map.cpp index 1e4465b2e9..fe975f9a17 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -3777,6 +3777,8 @@ int map_readallmaps (void) int maps_removed = 0; + ShowStatus("Loading %d maps.\n", map_num); + for (int i = 0; i < map_num; i++) { size_t size; bool success = false; @@ -3784,8 +3786,10 @@ int map_readallmaps (void) struct map_data *mapdata = &map[i]; char map_cache_decode_buffer[MAX_MAP_SIZE]; +#ifdef DEBUG // show progress ShowStatus("Loading maps [%i/%i]: %s" CL_CLL "\r", i, map_num, mapdata->name); +#endif if( enable_grf ){ // try to load the map @@ -4841,10 +4845,12 @@ void MapServer::finalize(){ do_clear_npc(); // remove all objects on maps + ShowStatus("Cleaning up %d maps.\n", map_num); for (int i = 0; i < map_num; i++) { struct map_data *mapdata = map_getmapdata(i); - +#ifdef DEBUG ShowStatus("Cleaning up maps [%d/%d]: %s..." CL_CLL "\r", i++, map_num, mapdata->name); +#endif map_foreachinmap(cleanup_sub, i, BL_ALL); channel_delete(mapdata->channel,false); } diff --git a/src/map/mob.cpp b/src/map/mob.cpp index 0716d42503..27d9ae9c03 100644 --- a/src/map/mob.cpp +++ b/src/map/mob.cpp @@ -5281,10 +5281,13 @@ static int mob_read_sqldb(void) uint32 total_columns = Sql_NumColumns(mmysql_handle); uint64 total_rows = Sql_NumRows(mmysql_handle), rows = 0, count = 0; + ShowStatus("Loading '" CL_WHITE "%" PRIdPTR CL_RESET "' entries in '" CL_WHITE "%s" CL_RESET "'\n", total_rows, mob_db_name[fi]); + // process rows one by one while( SQL_SUCCESS == Sql_NextRow(mmysql_handle) ) { - ShowStatus("Loading [%" PRIu64 "/%" PRIu64 "] rows from '" CL_WHITE "%s" CL_RESET "'" CL_CLL "\r", ++rows, total_rows, mob_db_name[fi]); - +#ifdef DEBUG + ShowStatus("Loading [%" PRIu64 "/%" PRIu64 "] entries in '" CL_WHITE "%s" CL_RESET "'" CL_CLL "\r", ++rows, total_rows, mob_db_name[fi]); +#endif std::vector data = {}; for (uint32 i = 0; i < total_columns; i++) { diff --git a/src/map/npc.cpp b/src/map/npc.cpp index 374365eca5..2c1f398601 100644 --- a/src/map/npc.cpp +++ b/src/map/npc.cpp @@ -6028,10 +6028,14 @@ int npc_reload(void) { //TODO: the following code is copy-pasted from do_init_npc(); clean it up // Reloading npcs now + ShowStatus("Loading NPC Files\n"); for (nsl = npc_src_files; nsl; nsl = nsl->next) { +#ifdef DEBUG ShowStatus("Loading NPC file: %s" CL_CLL "\r", nsl->name); +#endif npc_parsesrcfile(nsl->name); } + ShowInfo("Loaded NPC Files\n"); ShowInfo ("Done loading '" CL_WHITE "%d" CL_RESET "' NPCs:" CL_CLL "\n" "\t-'" CL_WHITE "%d" CL_RESET "' Warps\n" "\t-'" CL_WHITE "%d" CL_RESET "' Shops\n" @@ -6185,7 +6189,9 @@ void do_init_npc(void){ // process all npc files ShowStatus("Loading NPCs...\r"); for( file = npc_src_files; file != NULL; file = file->next ) { +#ifdef DEBUG ShowStatus("Loading NPC file: %s" CL_CLL "\r", file->name); +#endif npc_parsesrcfile(file->name); } ShowInfo ("Done loading '" CL_WHITE "%d" CL_RESET "' NPCs:" CL_CLL "\n"