فهرست منبع

Follow-up to r17352 : Fixed map server crash on guild break - bugreport:7720

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17354 54d463be-8e91-2dee-dedb-b68131a5f0ec
akinari1087 12 سال پیش
والد
کامیت
91cc117015
1فایلهای تغییر یافته به همراه8 افزوده شده و 8 حذف شده
  1. 8 8
      src/map/guild.c

+ 8 - 8
src/map/guild.c

@@ -1732,8 +1732,7 @@ int guild_broken(int guild_id,int flag)
 {
 	struct guild *g = guild_search(guild_id);
 	struct map_session_data *sd = NULL;
-	int i, j;
-	int idxlist[MAX_INVENTORY];
+	int i;
 
 	if(flag!=0 || g==NULL)
 		return 0;
@@ -1749,11 +1748,6 @@ int guild_broken(int guild_id,int flag)
 		}
 	}
 
-	//Guild bound item check - Removes the bound flag
-	j = pc_bound_chk(sd,2,idxlist);
-	for(i=0;i<j;i++)
-		sd->status.inventory[idxlist[i]].bound = 0;
-
 	guild_db->foreach(guild_db,guild_broken_sub,guild_id);
 	castle_db->foreach(castle_db,castle_guild_broken_sub,guild_id);
 	guild_storage_delete(guild_id);
@@ -1843,7 +1837,8 @@ int guild_gm_changed(int guild_id, int account_id, int char_id)
 int guild_break(struct map_session_data *sd,char *name)
 {
 	struct guild *g;
-	int i;
+	int i, j;
+	int idxlist[MAX_INVENTORY];
 
 	nullpo_ret(sd);
 
@@ -1864,6 +1859,11 @@ int guild_break(struct map_session_data *sd,char *name)
 		return 0;
 	}
 
+	//Guild bound item check - Removes the bound flag
+	j = pc_bound_chk(sd,2,idxlist);
+	for(i=0;i<j;i++)
+		sd->status.inventory[idxlist[i]].bound = 0;
+
 	intif_guild_break(g->guild_id);
 	return 1;
 }