diff options
author | shennetsind <ind@henn.et> | 2014-02-20 11:48:51 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2014-02-20 11:48:51 -0300 |
commit | a7d421274b308f7d9cc4ac39935beae851b29b97 (patch) | |
tree | bb914b439491cba1c6e0958a76699a91a9b1dfdb /src/map/unit.c | |
parent | d0b9510cf0d7a47e53aa341462a1175326dfc09d (diff) | |
download | hercules-a7d421274b308f7d9cc4ac39935beae851b29b97.tar.gz hercules-a7d421274b308f7d9cc4ac39935beae851b29b97.tar.bz2 hercules-a7d421274b308f7d9cc4ac39935beae851b29b97.tar.xz hercules-a7d421274b308f7d9cc4ac39935beae851b29b97.zip |
Fixed Bug 8037
Player's var db was being cleared on unit free rather than on auth db clear, which'd cause map server to crash when trying to save already-disconnected (aka char logged out when char server was down) data.
Special Thanks to FeNixZ.
http://hercules.ws/board/tracker/issue-8037-map-crash-every-6-12/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 2926661ad..96d2c7775 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -2352,13 +2352,7 @@ int unit_free(struct block_list *bl, clr_type clrtype) { pc->delspiritball(sd,sd->spiritball,1); for(i = 1; i < 5; i++) pc->del_charm(sd, sd->charm[i], i); - - if( sd->var_db ) - sd->var_db->destroy(sd->var_db,script->reg_destroy); - - if( sd->array_db ) - sd->array_db->destroy(sd->array_db,script->array_free_db); - + if( sd->st && sd->st->state != RUN ) {// free attached scripts that are waiting script->free_state(sd->st); sd->st = NULL; |