diff options
-rw-r--r-- | src/map/map.c | 3 | ||||
-rw-r--r-- | src/map/pc.c | 16 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/map/map.c b/src/map/map.c index 7adeee3d5..04ac8a239 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -3765,10 +3765,9 @@ struct map_zone_data *map_merge_zone(struct map_zone_data *main, struct map_zone CREATE(zone->capped_skills, struct map_zone_skill_damage_cap_entry *, zone->capped_skills_count); - for(i = 0, cursor = 0; i < main->capped_skills_count; i++, cursor++ ) { CREATE(zone->capped_skills[cursor], struct map_zone_skill_damage_cap_entry, 1); - memcpy(zone->capped_skills[cursor], main->disabled_commands[i], sizeof(struct map_zone_skill_damage_cap_entry)); + memcpy(zone->capped_skills[cursor], main->capped_skills[i], sizeof(struct map_zone_skill_damage_cap_entry)); } for(i = 0; i < other->capped_skills_count; i++, cursor++ ) { 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; } |