diff options
author | Kevin <Kevin@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-04-26 22:20:20 +0000 |
---|---|---|
committer | Kevin <Kevin@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-04-26 22:20:20 +0000 |
commit | a184ee1870554dc203de4d3b51f29a3324aaf746 (patch) | |
tree | e00168a036a86a92b46907bd042c8c2ba57e44d3 /src/map/guild.c | |
parent | 7e0628c6afa5697af386df0b872eb6f1236930f7 (diff) | |
download | hercules-a184ee1870554dc203de4d3b51f29a3324aaf746.tar.gz hercules-a184ee1870554dc203de4d3b51f29a3324aaf746.tar.bz2 hercules-a184ee1870554dc203de4d3b51f29a3324aaf746.tar.xz hercules-a184ee1870554dc203de4d3b51f29a3324aaf746.zip |
Uncommented and cleaned up the OnGuildBreak code.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12659 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/guild.c')
-rw-r--r-- | src/map/guild.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index 92e721042..0f4ec272b 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -1580,27 +1580,25 @@ int castle_guild_broken_sub(DBKey key,void *data,va_list ap) int guild_broken(int guild_id,int flag) { struct guild *g=guild_search(guild_id); -// struct guild_castle *gc=NULL; + struct guild_castle *gc=NULL; struct map_session_data *sd; int i; -// char *name;; + char name[50]; if(flag!=0 || g==NULL) return 0; //we call castle_event::OnGuildBreak of all castlesof the guild //you can set all castle_events in the castle_db.txt -/* name=(char *)aCalloc(50,sizeof(char)); //24 char = event name, + space for "::OnGuildBreak" for(i=0;i<MAX_GUILDCASTLE;i++){ if( (gc=guild_castle_search(i)) != NULL ){ if(gc->guild_id == guild_id){ - memcpy(name,gc->castle_event,50); + safestrncpy(name, gc->castle_event, 50); npc_event_do(strcat(name,"::OnGuildBreak")); } } } - free(name); -*/ + for(i=0;i<g->max_member;i++){ // ギルド解散を通知 if((sd=g->member[i].sd)!=NULL){ if(sd->state.storage_flag == 2) |