summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorgreenboxal2 <greenboxal2@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-04-21 06:58:45 +0000
committergreenboxal2 <greenboxal2@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-04-21 06:58:45 +0000
commitdda9ac430f39fb36dc2d230632b7e449037f97f6 (patch)
tree3a1e313555f764ff0748d4f51849612a76325c08 /src/map/unit.c
parent6c98217932604008f0974e4cad17b6c636d061b2 (diff)
downloadhercules-dda9ac430f39fb36dc2d230632b7e449037f97f6.tar.gz
hercules-dda9ac430f39fb36dc2d230632b7e449037f97f6.tar.bz2
hercules-dda9ac430f39fb36dc2d230632b7e449037f97f6.tar.xz
hercules-dda9ac430f39fb36dc2d230632b7e449037f97f6.zip
Fixed bugreport:5593 elemental bl was not removed when pc is removed/freed.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15899 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 2dd33af10..bdabb0152 100644
--- a/src/map/unit.c
+++ b/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);
}