summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-01 18:37:16 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-01 18:37:16 +0000
commita0eb9095c25591758ece37f741d9936ae7c1df5d (patch)
tree4214c55b318e5a174e929ec99d66dcb72f40431f /src/map/unit.c
parentc8d4b89b3de0e8db730fbd375c5b4abd38ac6dff (diff)
downloadhercules-a0eb9095c25591758ece37f741d9936ae7c1df5d.tar.gz
hercules-a0eb9095c25591758ece37f741d9936ae7c1df5d.tar.bz2
hercules-a0eb9095c25591758ece37f741d9936ae7c1df5d.tar.xz
hercules-a0eb9095c25591758ece37f741d9936ae7c1df5d.zip
- Made Deluge/volcano/v. gale be castable on top of each other again
- Modified unit_walktoxy and NPC_RUN to enable running even when the caster does not has the MD_CANMOVE bit on. - PF_MINDBREAKER will now silently fail if you try to use it on someone who already has the status active. - Cleaned up yet again skill_landprotector, now new cells of Deluge/Volcano/V.Gale will delete previous cells when they are recasted on top of each other. - Summoned Marine Spheres no longer get the MD_CANMOVE bit. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8039 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 606d64801..9d2356d58 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -258,6 +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
int unit_walktoxy( struct block_list *bl, int x, int y, int easy) {
struct unit_data *ud = NULL;
struct status_change *sc = NULL;
@@ -271,11 +272,13 @@ int unit_walktoxy( struct block_list *bl, int x, int y, int easy) {
if( ud == NULL) return 0;
- // 移動出来ないユニットは弾く
- if(!(status_get_mode(bl)&MD_CANMOVE) || !unit_can_move(bl))
+ if(!(easy&2) && !status_get_mode(bl)&MD_CANMOVE)
+ return 0;
+
+ if (!unit_can_move(bl))
return 0;
- ud->state.walk_easy = easy;
+ ud->state.walk_easy = easy&1;
ud->target = 0;
ud->to_x = x;
ud->to_y = y;