summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index afb06527d..9ee65d2d2 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6833,13 +6833,14 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
int i=0,j=0;
int64 tick = timer->gettick();
- for(j = 0; j < 5; j++)
+ for(j = 0; j < 5; j++) {
if (sd->devotion[j]){
struct map_session_data *devsd = map->id2sd(sd->devotion[j]);
if (devsd)
status_change_end(&devsd->bl, SC_DEVOTION, INVALID_TIMER);
sd->devotion[j] = 0;
}
+ }
if(sd->status.pet_id > 0 && sd->pd) {
struct pet_data *pd = sd->pd;
@@ -7137,6 +7138,17 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
}
}
}
+
+ // Remove autotrade to prevent autotrading from save point
+ if( sd->state.standalone || sd->state.autotrade
+ && (map->list[sd->bl.m].flag.pvp || map->list[sd->bl.m].flag.gvg)
+ ) {
+ sd->state.autotrade = 0;
+ sd->state.standalone = 0;
+ pc->autotrade_update(sd,PAUC_REMOVE);
+ map->quit(sd);
+ }
+
// pvp
// disable certain pvp functions on pk_mode [Valaris]
if( map->list[sd->bl.m].flag.pvp && !battle_config.pk_mode && !map->list[sd->bl.m].flag.pvp_nocalcrank ) {
@@ -7166,10 +7178,10 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
}
}
-
//Reset "can log out" tick.
if( battle_config.prevent_logout )
sd->canlog_tick = timer->gettick() - battle_config.prevent_logout;
+
return 1;
}