summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-18 13:49:24 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-18 13:49:24 +0000
commita2b971ef0af9491bdbd93e07e600a69df97a46a1 (patch)
treedcc1210cb9863ebf921cf93bfe33bc08e0cf842a /src/map/unit.c
parenteb5b93986c7ade4100da3d1bcaf07c9f2b7824e4 (diff)
downloadhercules-a2b971ef0af9491bdbd93e07e600a69df97a46a1.tar.gz
hercules-a2b971ef0af9491bdbd93e07e600a69df97a46a1.tar.bz2
hercules-a2b971ef0af9491bdbd93e07e600a69df97a46a1.tar.xz
hercules-a2b971ef0af9491bdbd93e07e600a69df97a46a1.zip
- 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
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c10
1 files changed, 5 insertions, 5 deletions
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;