summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-25 12:04:09 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-25 12:04:09 +0000
commit952432e5f073fa9d840ff4acdb3abfc53335a5d3 (patch)
treee5df047ce97470d4ace9396a9ae53157290464fa /src/map/unit.c
parent61c9ecdec07f41a48e65a238d7f7338bb543c4e7 (diff)
downloadhercules-952432e5f073fa9d840ff4acdb3abfc53335a5d3.tar.gz
hercules-952432e5f073fa9d840ff4acdb3abfc53335a5d3.tar.bz2
hercules-952432e5f073fa9d840ff4acdb3abfc53335a5d3.tar.xz
hercules-952432e5f073fa9d840ff4acdb3abfc53335a5d3.zip
* Fixed mob control commands.
* Fixed memory leak in scripts (again). Still have a few lying. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6749 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index cf7d88aea..f0ce5c9ca 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1041,6 +1041,7 @@ int unit_stop_attack(struct block_list *bl)
delete_timer( ud->attacktimer, unit_attack_timer );
ud->attacktimer = -1;
+ ud->target = 0;
return 0;
}
@@ -1086,6 +1087,7 @@ int unit_attack(struct block_list *src,int target_id,int type)
if(battle_check_target(src,target,BCT_ENEMY)<=0 ||
!status_check_skilluse(src, target, 0, 0)
) {
+ ShowWarning("%d can't attack. :(",src->id);
unit_unattackable(src);
return 1;
}