Browse Source

Battlegrounds bug fix, bugreport:4996

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15035 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 13 years ago
parent
commit
ceabffe099
2 changed files with 2 additions and 1 deletions
  1. 2 0
      src/map/map.c
  2. 0 1
      src/map/unit.c

+ 2 - 0
src/map/map.c

@@ -1566,6 +1566,8 @@ int map_quit(struct map_session_data *sd)
 	if (sd->npc_id)
 	if (sd->npc_id)
 		npc_event_dequeue(sd);
 		npc_event_dequeue(sd);
 
 
+	if( sd->bg_id )
+		bg_team_leave(sd,1);
 	npc_script_event(sd, NPCE_LOGOUT);
 	npc_script_event(sd, NPCE_LOGOUT);
 
 
 	//Unit_free handles clearing the player related data, 
 	//Unit_free handles clearing the player related data, 

+ 0 - 1
src/map/unit.c

@@ -2139,7 +2139,6 @@ int unit_free(struct block_list *bl, clr_type clrtype)
 			guild_send_memberinfoshort(sd,0);
 			guild_send_memberinfoshort(sd,0);
 			pc_cleareventtimer(sd);
 			pc_cleareventtimer(sd);
 			pc_inventory_rental_clear(sd);
 			pc_inventory_rental_clear(sd);
-			if( sd->bg_id ) bg_team_leave(sd,1);
 			pc_delspiritball(sd,sd->spiritball,1);
 			pc_delspiritball(sd,sd->spiritball,1);
 
 
 			if( sd->reg )
 			if( sd->reg )