summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-02 04:09:01 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-02 04:09:01 +0000
commit46649a93ab9a214c8cb842a25588699f76db0023 (patch)
tree859c670c3b83c47c6dc0d9f884122ae8b2d0ad80 /src/map/unit.c
parentdbcc79545f9c8cb17b1aa3b274673c79b2621d26 (diff)
downloadhercules-46649a93ab9a214c8cb842a25588699f76db0023.tar.gz
hercules-46649a93ab9a214c8cb842a25588699f76db0023.tar.bz2
hercules-46649a93ab9a214c8cb842a25588699f76db0023.tar.xz
hercules-46649a93ab9a214c8cb842a25588699f76db0023.zip
- Fixed NPC_SELFDESTRUCTION damaging yourself, causing the source to be knocked back, as well as making others in the splash damage not receive any damage if they are hurt after the caster.
- Fixed NPC_RUN not setting the mob's state to MSS_WALK (normally not set by the mob ai) - unit_walktoxy flag&2 setting will now also ignore unit_can_move, for a forced walk. - Adjusted NPC_RUN level of Marine Spheres (5->7 cells) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8044 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 9d2356d58..0755ef9c4 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -258,7 +258,7 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data)
return 0;
}
-//Easy parameter: &1 -> 1/2 = easy/hard, &2 -> ignore MD_CANMOVE check
+//Easy parameter: &1 -> 1/2 = easy/hard, &2 -> force walking.
int unit_walktoxy( struct block_list *bl, int x, int y, int easy) {
struct unit_data *ud = NULL;
struct status_change *sc = NULL;
@@ -272,12 +272,9 @@ int unit_walktoxy( struct block_list *bl, int x, int y, int easy) {
if( ud == NULL) return 0;
- if(!(easy&2) && !status_get_mode(bl)&MD_CANMOVE)
+ if(!(easy&2) && (!status_get_mode(bl)&MD_CANMOVE || !unit_can_move(bl)))
return 0;
- if (!unit_can_move(bl))
- return 0;
-
ud->state.walk_easy = easy&1;
ud->target = 0;
ud->to_x = x;