summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-01-06 15:26:00 -0200
committershennetsind <ind@henn.et>2014-01-08 11:22:00 -0200
commitb79a9d7efa9213e3c791ec356bf21b712878d1aa (patch)
tree043173233a97e805a49089a5ced25f213a86217f /src/map/map.c
parent85327cde8e451b8b1bacd1f5a98c034a6f42e5ea (diff)
downloadhercules-b79a9d7efa9213e3c791ec356bf21b712878d1aa.tar.gz
hercules-b79a9d7efa9213e3c791ec356bf21b712878d1aa.tar.bz2
hercules-b79a9d7efa9213e3c791ec356bf21b712878d1aa.tar.xz
hercules-b79a9d7efa9213e3c791ec356bf21b712878d1aa.zip
Introducing Hercules Autotrade Persistency
Aka autotrading merchants survive server restarts. Originally sekai's (aka me). Special Thanks to Haruna, Michieru. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/map.c b/src/map/map.c
index aef34ef00..922807158 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1676,6 +1676,9 @@ int map_quit(struct map_session_data *sd) {
if( sd->bg_id && !sd->bg_queue.arena ) /* TODO: dump this chunk after bg_queue is fully enabled */
bg->team_leave(sd,1);
+ if( sd->state.autotrade && runflag != MAPSERVER_ST_SHUTDOWN && !hChSys.closing )
+ pc->autotrade_update(sd,PAUC_REMOVE);
+
skill->cooldown_save(sd);
pc->itemcd_do(sd,false);
@@ -3606,6 +3609,10 @@ int inter_config_read(char *cfgName) {
map->db_use_sql_mob_skill_db = config_switch(w2);
ShowStatus ("Using monster skill database as SQL: '%s'\n", w2);
}
+ else if(strcmpi(w1,"autotrade_merchants_db")==0)
+ strcpy(map->autotrade_merchants_db, w2);
+ else if(strcmpi(w1,"autotrade_data_db")==0)
+ strcpy(map->autotrade_data_db, w2);
/* sql log db */
else if(strcmpi(w1,"log_db_ip")==0)
strcpy(logs->db_ip, w2);