From 0aee4fd57f2f4135361f4182a08a98cf52ed9d10 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 15 May 2013 16:47:08 -0300 Subject: HPM Update Made SQL and strlib functions HPM-friendly, special thanks to Yommy for bringing the issue up. Added partial map.c support, for the all-handy map[] array, beware that soon the whole map.c renewal design will be commit and when that happens your usage of map.c functions in plugins might require some updates. Signed-off-by: shennetsind --- src/map/pc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index 7d3b5c4a2..50188aeb3 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -9115,7 +9115,7 @@ int pc_autosave(int tid, unsigned int tick, int id, intptr_t data) save_flag = 1; //Noone was saved, so save first found char. iter = mapit_getallusers(); - for( sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter) ) + for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter) ) { if(sd->bl.id == last_save_id && save_flag != 1) { save_flag = 1; @@ -9132,7 +9132,7 @@ int pc_autosave(int tid, unsigned int tick, int id, intptr_t data) chrif_save(sd,0); break; } - mapit_free(iter); + mapit->free(iter); interval = autosave_interval/(map_usercount()+1); if(interval < minsave_interval) @@ -9620,10 +9620,10 @@ int pc_readdb(void) count = 0; // Reset and read skilltree memset(skill_tree,0,sizeof(skill_tree)); - sv_readdb(db_path, DBPATH"skill_tree.txt", ',', 3+MAX_PC_SKILL_REQUIRE*2, 4+MAX_PC_SKILL_REQUIRE*2, -1, &pc_readdb_skilltree); + sv->readdb(db_path, DBPATH"skill_tree.txt", ',', 3+MAX_PC_SKILL_REQUIRE*2, 4+MAX_PC_SKILL_REQUIRE*2, -1, &pc_readdb_skilltree); #if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) - sv_readdb(db_path, "re/level_penalty.txt", ',', 4, 4, -1, &pc_readdb_levelpenalty); + sv->readdb(db_path, "re/level_penalty.txt", ',', 4, 4, -1, &pc_readdb_levelpenalty); for( k=1; k < 3; k++ ){ // fill in the blanks for( j = 0; j < RC_MAX; j++ ){ int tmp = 0; -- cgit v1.2.3-60-g2f50