diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-07-29 09:10:51 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-07-29 09:10:51 +0000 |
commit | ec12f70e64fdd12235f74d9708332be0ff8c2683 (patch) | |
tree | aec85700e214fed923b3b0c5755a5fcf789193b4 /src/map/map.c | |
parent | 94f3da9dd8cb31ab928b62c44e076080ade23b8b (diff) | |
download | hercules-ec12f70e64fdd12235f74d9708332be0ff8c2683.tar.gz hercules-ec12f70e64fdd12235f74d9708332be0ff8c2683.tar.bz2 hercules-ec12f70e64fdd12235f74d9708332be0ff8c2683.tar.xz hercules-ec12f70e64fdd12235f74d9708332be0ff8c2683.zip |
- Fixed a bug cleaning instance variable on party when instance is destroy.
- Fixed a bug on Yuno Castle 2 and 3, not killing guardians.
- Moved battleground team leave on unit remove map to prevent a crash on multimap servers.
- Fixed a bug on checking range with the wrong target. Fix a crash on Item 2002 at refine >= 9.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13979 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/map.c b/src/map/map.c index bbff98410..8a74bcca1 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1518,8 +1518,6 @@ int map_quit(struct map_session_data *sd) if (sd->npc_timer_id != -1) //Cancel the event timer. npc_timerevent_quit(sd); - if( sd->state.bg_id ) - bg_team_leave(sd,1); npc_script_event(sd, NPCE_LOGOUT); //Unit_free handles clearing the player related data, @@ -3275,6 +3273,7 @@ int map_instance_destroy_timer(int tid, unsigned int tick, int id, intptr data) void map_instance_destroy(int instance_id) { int last = 0, type; + struct party_data *p; time_t now = time(NULL); if( !instance_id || !instance[instance_id].name_id ) @@ -3312,6 +3311,9 @@ void map_instance_destroy(int instance_id) instance[instance_id].ivar = NULL; instance[instance_id].svar = NULL; + if( instance[instance_id].party_id && (p = party_search(instance[instance_id].party_id)) != NULL ) + p->instance_id = 0; + ShowInfo("[Instance] Destroyed %s.\n", instance[instance_id].name); memset( &instance[instance_id], 0x00, sizeof(instance[0]) ); } |