summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-20 20:34:06 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-20 20:34:06 +0000
commit2a0f10a6f77e1df9490f0181fb84f91e7591c412 (patch)
treec5d4088747df422a843d001525bbaee9fbbad459 /src/map/status.c
parentb1cb80992092152a1fe459f4a3ac24c5c41940bc (diff)
downloadhercules-2a0f10a6f77e1df9490f0181fb84f91e7591c412.tar.gz
hercules-2a0f10a6f77e1df9490f0181fb84f91e7591c412.tar.bz2
hercules-2a0f10a6f77e1df9490f0181fb84f91e7591c412.tar.xz
hercules-2a0f10a6f77e1df9490f0181fb84f91e7591c412.zip
- Corrected Cloaking level 1-2 not letting you move across walls.
- updated cloaking code so that when you set "enable cloaking without walls", the code will consider you as "always next to a wall", thus you get the wall-speed bonus always. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7778 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 52cc5db8b..ab0ccb0f0 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3473,7 +3473,7 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha
}
if(sc->data[SC_CLOAKING].timer!=-1)
speed = speed * 100 /(
- (sc->data[SC_CLOAKING].val4&2?25:0) //Wall speed bonus
+ (sc->data[SC_CLOAKING].val4&1?25:0) //Wall speed bonus
+sc->data[SC_CLOAKING].val3); //Normal adjustment bonus.
if(sc->data[SC_LONGING].timer!=-1)
@@ -4904,14 +4904,12 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
val3 *= -1; //Substract the Dodge speed bonus.
val3+= 70+val1*3; //Speed adjustment without a wall.
//With a wall, it is val3 +25.
- //val4&2 signals the presence of a wall.
- if (!val4)
- { //val4&1 signals eternal cloaking (not cancelled on attack) [Skotlex]
- if (bl->type == BL_PC) //Standard cloaking.
- val4 = battle_config.pc_cloak_check_type&2?1:0;
- else
- val4 = battle_config.monster_cloak_check_type&2?1:0;
- }
+ //val4&1 signals the presence of a wall.
+ //val4&2 signals eternal cloaking (not cancelled on attack) [Skotlex]
+ if (bl->type == BL_PC) //Standard cloaking.
+ val4 |= battle_config.pc_cloak_check_type&3;
+ else
+ val4 |= battle_config.monster_cloak_check_type&3;
break;
case SC_SIGHT: /* サイト/ルアフ */
case SC_RUWACH: