diff options
author | shennetsind <ind@henn.et> | 2013-05-30 21:00:22 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-05-30 21:00:22 -0300 |
commit | 20bdc01fa687b174a732be4483ddea4982d67ce9 (patch) | |
tree | 3336c1c449a78d52d25d2534acbd319d10c56b45 /src/map/guild.c | |
parent | 21bbfad48084190b8a6881ee3b277993418a5137 (diff) | |
download | hercules-20bdc01fa687b174a732be4483ddea4982d67ce9.tar.gz hercules-20bdc01fa687b174a732be4483ddea4982d67ce9.tar.bz2 hercules-20bdc01fa687b174a732be4483ddea4982d67ce9.tar.xz hercules-20bdc01fa687b174a732be4483ddea4982d67ce9.zip |
Memory Slasher - May 30 Patch
http://hercules.ws/board/topic/928-memory-slasher-may-30-patch/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/guild.c')
-rw-r--r-- | src/map/guild.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index b83f05f00..a6c873861 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -24,6 +24,7 @@ #include "clif.h" #include "skill.h" #include "log.h" +#include "instance.h" #include <stdio.h> #include <stdlib.h> @@ -503,6 +504,8 @@ int guild_recv_info(struct guild *sg) { if((g = (struct guild*)idb_get(guild_db,sg->guild_id))==NULL) { guild_new = true; g=(struct guild *)aCalloc(1,sizeof(struct guild)); + g->instance = NULL; + g->instances = 0; idb_put(guild_db,sg->guild_id,g); if( hChSys.ally ) { struct hChSysCh *channel; @@ -926,7 +929,8 @@ int guild_member_withdraw(int guild_id, int account_id, int char_id, int flag, c sd->status.guild_id = 0; sd->guild = NULL; sd->guild_emblem_id = 0; - + if( g->instances ) + instance->check_kick(sd); clif->charnameupdate(sd); //Update display name [Skotlex] //TODO: send emblem update to self and people around } @@ -2211,6 +2215,10 @@ void do_final_guild(void) { for( g = dbi_first(iter); dbi_exists(iter); g = dbi_next(iter) ) { if( g->channel != NULL ) clif->chsys_delete((struct hChSysCh *)g->channel); + if( g->instance != NULL ) { + aFree(g->instance); + g->instance = NULL; + } } dbi_destroy(iter); |