diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 2 | ||||
-rw-r--r-- | src/map/skill.c | 8 | ||||
-rw-r--r-- | src/map/status.c | 16 | ||||
-rw-r--r-- | src/map/unit.c | 7 |
4 files changed, 16 insertions, 17 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 22d850132..484c65b01 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2817,7 +2817,7 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target, } } - if (sc && sc->data[SC_CLOAKING].timer != -1 && !(sc->data[SC_CLOAKING].val4&1)) + if (sc && sc->data[SC_CLOAKING].timer != -1 && !(sc->data[SC_CLOAKING].val4&2)) status_change_end(src,SC_CLOAKING,-1); //Check for counter attacks that block your attack. [Skotlex] diff --git a/src/map/skill.c b/src/map/skill.c index e8a80fd0f..47500b7e8 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -9490,16 +9490,16 @@ int skill_check_cloaking(struct block_list *bl, struct status_change *sc) if (sc->data[SC_CLOAKING].timer != -1) { if (sc->data[SC_CLOAKING].val1 < 3) //End cloaking. status_change_end(bl, SC_CLOAKING, -1); - else if(sc->data[SC_CLOAKING].val4&2) + else if(sc->data[SC_CLOAKING].val4&1) { //Remove wall bonus - sc->data[SC_CLOAKING].val4&=~2; + sc->data[SC_CLOAKING].val4&=~1; status_calc_bl(bl,SCB_SPEED); } } } - else if(sc->data[SC_CLOAKING].timer != -1 && !(sc->data[SC_CLOAKING].val4&2)) + else if(sc->data[SC_CLOAKING].timer != -1 && !(sc->data[SC_CLOAKING].val4&1)) { //Add wall speed bonus - sc->data[SC_CLOAKING].val4|=2; + sc->data[SC_CLOAKING].val4|=1; status_calc_bl(bl,SCB_SPEED); } 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: diff --git a/src/map/unit.c b/src/map/unit.c index 9ada29c7a..e14f3d388 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -668,7 +668,8 @@ int unit_can_move(struct block_list *bl) sc->data[SC_STOP].timer != -1 || sc->data[SC_CLOSECONFINE].timer != -1 || sc->data[SC_CLOSECONFINE2].timer != -1 || - (sc->data[SC_CLOAKING].timer != -1 && sc->data[SC_CLOAKING].val1 < 3) + (sc->data[SC_CLOAKING].timer != -1 && //Need wall at level 1-2 + sc->data[SC_CLOAKING].val1 < 3 && !(sc->data[SC_CLOAKING].val4&1)) )) return 0; } @@ -933,7 +934,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int ud->skilllv = skill_lv; if(sc && sc->data[SC_CLOAKING].timer != -1 && - !(sc->data[SC_CLOAKING].val4&1) && skill_num != AS_CLOAKING) + !(sc->data[SC_CLOAKING].val4&2) && skill_num != AS_CLOAKING) status_change_end(src,SC_CLOAKING,-1); if(casttime > 0) { @@ -1026,7 +1027,7 @@ int unit_skilluse_pos2( struct block_list *src, int skill_x, int skill_y, int sk ud->skilltarget = 0; if (sc && sc->data[SC_CLOAKING].timer != -1 && - !(sc->data[SC_CLOAKING].val4&1)) + !(sc->data[SC_CLOAKING].val4&2)) status_change_end(src,SC_CLOAKING,-1); if(casttime > 0) { |