Fixed #219
* Manhole effect (SC__MANHOLE & UNT_MANHOLE) is ignore player's knockback immunity at GVG/BG maps (only if target is BL_PC). Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
This commit is contained in:
parent
c7dcca3b6e
commit
73bd593055
@ -2388,7 +2388,7 @@ static int skill_area_temp[8];
|
|||||||
short skill_blown(struct block_list* src, struct block_list* target, char count, int8 dir, unsigned char flag)
|
short skill_blown(struct block_list* src, struct block_list* target, char count, int8 dir, unsigned char flag)
|
||||||
{
|
{
|
||||||
int dx = 0, dy = 0;
|
int dx = 0, dy = 0;
|
||||||
int reason = 0, checkflag = 0;
|
uint8 reason = 0, checkflag = 0;
|
||||||
|
|
||||||
nullpo_ret(src);
|
nullpo_ret(src);
|
||||||
nullpo_ret(target);
|
nullpo_ret(target);
|
||||||
@ -12895,7 +12895,9 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, uns
|
|||||||
|
|
||||||
if( td )
|
if( td )
|
||||||
sec = DIFF_TICK(td->tick, tick);
|
sec = DIFF_TICK(td->tick, tick);
|
||||||
if( !unit_blown_immune(bl,0x1) ) {
|
if( (sg->unit_id == UNT_MANHOLE && bl->type == BL_PC)
|
||||||
|
|| !unit_blown_immune(bl,0x1) )
|
||||||
|
{
|
||||||
unit_movepos(bl, unit->bl.x, unit->bl.y, 0, 0);
|
unit_movepos(bl, unit->bl.x, unit->bl.y, 0, 0);
|
||||||
clif_fixpos(bl);
|
clif_fixpos(bl);
|
||||||
}
|
}
|
||||||
|
@ -10052,7 +10052,6 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
|
|||||||
case SC_ELECTRICSHOCKER:
|
case SC_ELECTRICSHOCKER:
|
||||||
case SC_BITE:
|
case SC_BITE:
|
||||||
case SC_THORNSTRAP:
|
case SC_THORNSTRAP:
|
||||||
case SC__MANHOLE:
|
|
||||||
//case SC__CHAOS:
|
//case SC__CHAOS:
|
||||||
case SC_CRYSTALIZE:
|
case SC_CRYSTALIZE:
|
||||||
case SC_CURSEDCIRCLE_ATKER:
|
case SC_CURSEDCIRCLE_ATKER:
|
||||||
@ -10067,6 +10066,10 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
|
|||||||
if (!unit_blown_immune(bl,0x1))
|
if (!unit_blown_immune(bl,0x1))
|
||||||
unit_stop_walking(bl,1);
|
unit_stop_walking(bl,1);
|
||||||
break;
|
break;
|
||||||
|
case SC__MANHOLE:
|
||||||
|
if (bl->type == BL_PC || !unit_blown_immune(bl,0x1))
|
||||||
|
unit_stop_walking(bl,1);
|
||||||
|
break;
|
||||||
case SC_HIDING:
|
case SC_HIDING:
|
||||||
case SC_CLOAKING:
|
case SC_CLOAKING:
|
||||||
case SC_CLOAKINGEXCEED:
|
case SC_CLOAKINGEXCEED:
|
||||||
|
@ -1097,9 +1097,10 @@ int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag)
|
|||||||
* 5 - target has 'special_state.no_knockback';
|
* 5 - target has 'special_state.no_knockback';
|
||||||
* 6 - target is trap that cannot be knocked back
|
* 6 - target is trap that cannot be knocked back
|
||||||
*/
|
*/
|
||||||
int unit_blown_immune(struct block_list* bl, int flag)
|
uint8 unit_blown_immune(struct block_list* bl, uint8 flag)
|
||||||
{
|
{
|
||||||
if ((flag&0x1) && (map_flag_gvg(bl->m) || map[bl->m].flag.battleground)
|
if ((flag&0x1)
|
||||||
|
&& (map_flag_gvg(bl->m) || map[bl->m].flag.battleground)
|
||||||
&& ((flag&0x2) || !(battle_config.skill_trap_type&0x1)))
|
&& ((flag&0x2) || !(battle_config.skill_trap_type&0x1)))
|
||||||
return 1; // No knocking back in WoE / BG
|
return 1; // No knocking back in WoE / BG
|
||||||
|
|
||||||
@ -1118,16 +1119,15 @@ int unit_blown_immune(struct block_list* bl, int flag)
|
|||||||
case BL_PC: {
|
case BL_PC: {
|
||||||
struct map_session_data *sd = BL_CAST(BL_PC, bl);
|
struct map_session_data *sd = BL_CAST(BL_PC, bl);
|
||||||
// Basilica caster can't be knocked-back by normal monsters.
|
// Basilica caster can't be knocked-back by normal monsters.
|
||||||
if( sd->sc.data[SC_BASILICA] && sd->sc.data[SC_BASILICA]->val4 == sd->bl.id && !(flag&0x4))
|
if( !(flag&0x4) && &sd->sc && sd->sc.data[SC_BASILICA] && sd->sc.data[SC_BASILICA]->val4 == sd->bl.id)
|
||||||
return 4;
|
return 4;
|
||||||
// Target has special_state.no_knockback (equip)
|
// Target has special_state.no_knockback (equip)
|
||||||
if( (flag&0x1) && (flag&0x2) && sd->special_state.no_knockback )
|
if( (flag&(0x1|0x2)) && sd->special_state.no_knockback )
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BL_SKILL: {
|
case BL_SKILL: {
|
||||||
struct skill_unit* su = NULL;
|
struct skill_unit* su = (struct skill_unit *)bl;
|
||||||
su = (struct skill_unit *)bl;
|
|
||||||
// Trap cannot be knocked back
|
// Trap cannot be knocked back
|
||||||
if (su && su->group && skill_get_unit_flag(su->group->skill_id)&UF_NOKNOCKBACK)
|
if (su && su->group && skill_get_unit_flag(su->group->skill_id)&UF_NOKNOCKBACK)
|
||||||
return 6;
|
return 6;
|
||||||
|
@ -100,7 +100,7 @@ int unit_warp(struct block_list *bl, short map, short x, short y, clr_type type)
|
|||||||
int unit_setdir(struct block_list *bl, unsigned char dir);
|
int unit_setdir(struct block_list *bl, unsigned char dir);
|
||||||
uint8 unit_getdir(struct block_list *bl);
|
uint8 unit_getdir(struct block_list *bl);
|
||||||
int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag);
|
int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag);
|
||||||
int unit_blown_immune(struct block_list* bl, int flag);
|
uint8 unit_blown_immune(struct block_list* bl, uint8 flag);
|
||||||
|
|
||||||
// Can-reach checks
|
// Can-reach checks
|
||||||
bool unit_can_reach_pos(struct block_list *bl,int x,int y,int easy);
|
bool unit_can_reach_pos(struct block_list *bl,int x,int y,int easy);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user