summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/guild.c10
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)