From a2b971ef0af9491bdbd93e07e600a69df97a46a1 Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 18 Aug 2006 13:49:24 +0000 Subject: - Changed unit_free so that it receives which cleartype should be used when the character is still on a map. Used this on status_damage so that mobs that do not respawn when killed will properly display the death animation. - Should have fixed the signed/unsigned comparison warnings in the main regen function. - Fixed Energy Coat consuming 10x less SP per hit than it should. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8339 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/unit.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/map/unit.c') diff --git a/src/map/unit.c b/src/map/unit.c index 7c1e011ad..ea1efcca7 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1579,7 +1579,7 @@ int unit_remove_map(struct block_list *bl, int clrtype) { if(pd->pet.intimate <= 0) { clif_clearchar_area(bl,clrtype); map_delblock(bl); - unit_free(bl); + unit_free(bl,0); map_freeblock_unlock(); return 0; } @@ -1591,7 +1591,7 @@ int unit_remove_map(struct block_list *bl, int clrtype) { clif_emotion(bl, 28) ; //sob clif_clearchar_area(bl,clrtype); map_delblock(bl); - unit_free(bl); + unit_free(bl,0); map_freeblock_unlock(); return 0; } @@ -1604,17 +1604,17 @@ int unit_remove_map(struct block_list *bl, int clrtype) { /*========================================== * Function to free all related resources to the bl - * if unit is on map, it is removed using clrtype 0. + * if unit is on map, it is removed using the clrtype specified *------------------------------------------ */ -int unit_free(struct block_list *bl) { +int unit_free(struct block_list *bl, int clrtype) { struct unit_data *ud = unit_bl2ud( bl ); nullpo_retr(0, ud); map_freeblock_lock(); if( bl->prev ) //Players are supposed to logout with a "warp" effect. - unit_remove_map(bl, bl->type==BL_PC?3:0); + unit_remove_map(bl, clrtype); if( bl->type == BL_PC ) { struct map_session_data *sd = (struct map_session_data*)bl; -- cgit v1.2.3-60-g2f50