summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-03-10 17:03:08 -0300
committershennetsind <ind@henn.et>2014-03-10 17:03:08 -0300
commit73ab0c441de0f74c2e621a594df7e269ce89bfc5 (patch)
tree9aec530dfa13c548bd3a0bae7039899f7063ab01 /src/map
parent1e9b96f85671b8515a3e962c4640575d95768b09 (diff)
downloadhercules-73ab0c441de0f74c2e621a594df7e269ce89bfc5.tar.gz
hercules-73ab0c441de0f74c2e621a594df7e269ce89bfc5.tar.bz2
hercules-73ab0c441de0f74c2e621a594df7e269ce89bfc5.tar.xz
hercules-73ab0c441de0f74c2e621a594df7e269ce89bfc5.zip
Fixed Bug 8046
Fixed issue with permanent statuses being removed during logout for memory-freeing operations, special thanks to streusel and all those who contributed to the bug report. http://hercules.ws/board/tracker/issue-8046-cart-disappearance/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.h1
-rw-r--r--src/map/status.c2
-rw-r--r--src/map/unit.c2
3 files changed, 4 insertions, 1 deletions
diff --git a/src/map/pc.h b/src/map/pc.h
index 66915492a..cc95b07e1 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -187,6 +187,7 @@ struct map_session_data {
unsigned int hpmeter_visible : 1;
unsigned int itemcheck : 1;
unsigned int standalone : 1;/* [Ind/Hercules <3] */
+ unsigned int loggingout : 1;
} state;
struct {
unsigned char no_weapon_damage, no_magic_damage, no_misc_damage;
diff --git a/src/map/status.c b/src/map/status.c
index 5dcf35198..f23a48fe0 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -9605,7 +9605,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
if (sce->timer != tid && tid != INVALID_TIMER)
return 0;
- if( sd && sce->timer == INVALID_TIMER )
+ if( sd && sce->timer == INVALID_TIMER && !sd->state.loggingout )
chrif->del_scdata_single(sd->status.account_id,sd->status.char_id,type);
if (tid == INVALID_TIMER) {
diff --git a/src/map/unit.c b/src/map/unit.c
index 47cf07ef6..5dd63879f 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -2330,6 +2330,8 @@ int unit_free(struct block_list *bl, clr_type clrtype) {
int i;
unsigned int k;
+ sd->state.loggingout = 1;
+
if( status->isdead(bl) )
pc->setrestartvalue(sd,2);