diff options
author | shennetsind <ind@henn.et> | 2013-05-15 16:47:08 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-05-15 16:47:08 -0300 |
commit | 0aee4fd57f2f4135361f4182a08a98cf52ed9d10 (patch) | |
tree | d7f43f0a5a63e73e21291f906e33109232ce7830 /src/map/pc.c | |
parent | 75942979098d34d52adc2537b6f28e02be7d7bae (diff) | |
download | hercules-0aee4fd57f2f4135361f4182a08a98cf52ed9d10.tar.gz hercules-0aee4fd57f2f4135361f4182a08a98cf52ed9d10.tar.bz2 hercules-0aee4fd57f2f4135361f4182a08a98cf52ed9d10.tar.xz hercules-0aee4fd57f2f4135361f4182a08a98cf52ed9d10.zip |
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 <ind@henn.et>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; |