Prechádzať zdrojové kódy

Fixed bugreport:5593 elemental bl was not removed when pc is removed/freed.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15899 54d463be-8e91-2dee-dedb-b68131a5f0ec
greenboxal2 13 rokov pred
rodič
commit
2c4afbf2c6
1 zmenil súbory, kde vykonal 3 pridanie a 0 odobranie
  1. 3 0
      src/map/unit.c

+ 3 - 0
src/map/unit.c

@@ -2180,6 +2180,8 @@ void unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype)
 		unit_remove_map(&sd->hd->bl, clrtype);
 	if(sd->md)
 		unit_remove_map(&sd->md->bl, clrtype);
+	if(sd->ed)
+		unit_remove_map(&sd->ed->bl, clrtype);
 }
 
 void unit_free_pc(struct map_session_data *sd)
@@ -2187,6 +2189,7 @@ void unit_free_pc(struct map_session_data *sd)
 	if (sd->pd) unit_free(&sd->pd->bl,CLR_OUTSIGHT);
 	if (sd->hd) unit_free(&sd->hd->bl,CLR_OUTSIGHT);
 	if (sd->md) unit_free(&sd->md->bl,CLR_OUTSIGHT);
+	if (sd->ed) unit_free(&sd->ed->bl,CLR_OUTSIGHT);
 	unit_free(&sd->bl,CLR_TELEPORT);
 }