Fixed bugreport:6156 HT_REMOVETRAP must show a skill fail message when it fails.
Fixed bugreport:4160 after casting skills it should now check for the path if it is ok to execute same as official behavior. Fixed bugreport:5830 now caster should not hit/chase target between an obstacle same as official behavior. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16370 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
7207c06aeb
commit
f52904ee31
@ -6623,8 +6623,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|
|||||||
|
|
||||||
case MA_REMOVETRAP:
|
case MA_REMOVETRAP:
|
||||||
case HT_REMOVETRAP:
|
case HT_REMOVETRAP:
|
||||||
//FIXME: I think clif_skill_fail() is supposed to be sent if it fails below [ultramage]
|
|
||||||
clif_skill_nodamage(src, bl, skillid, skilllv, 1);
|
|
||||||
{
|
{
|
||||||
struct skill_unit* su;
|
struct skill_unit* su;
|
||||||
struct skill_unit_group* sg;
|
struct skill_unit_group* sg;
|
||||||
@ -6634,6 +6632,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|
|||||||
// Players can only remove their own traps or traps on Vs maps.
|
// Players can only remove their own traps or traps on Vs maps.
|
||||||
if( su && (sg = su->group) && (src->type == BL_MER || sg->src_id == src->id || map_flag_vs(bl->m)) && (skill_get_inf2(sg->skill_id)&INF2_TRAP) )
|
if( su && (sg = su->group) && (src->type == BL_MER || sg->src_id == src->id || map_flag_vs(bl->m)) && (skill_get_inf2(sg->skill_id)&INF2_TRAP) )
|
||||||
{
|
{
|
||||||
|
clif_skill_nodamage(src, bl, skillid, skilllv, 1);
|
||||||
if( sd && !(sg->unit_id == UNT_USED_TRAPS || (sg->unit_id == UNT_ANKLESNARE && sg->val2 != 0 )) )
|
if( sd && !(sg->unit_id == UNT_USED_TRAPS || (sg->unit_id == UNT_ANKLESNARE && sg->val2 != 0 )) )
|
||||||
{ // prevent picking up expired traps
|
{ // prevent picking up expired traps
|
||||||
if( battle_config.skill_removetrap_type )
|
if( battle_config.skill_removetrap_type )
|
||||||
@ -6669,7 +6668,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
skill_delunit(su);
|
skill_delunit(su);
|
||||||
}
|
}else if(sd)
|
||||||
|
clif_skill_fail(sd, skillid, USESKILL_FAIL_LEVEL, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case HT_SPRINGTRAP:
|
case HT_SPRINGTRAP:
|
||||||
@ -8823,6 +8824,9 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data)
|
|||||||
skill_consume_requirement(sd,ud->skillid,ud->skilllv,1);
|
skill_consume_requirement(sd,ud->skillid,ud->skilllv,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( !path_search_long(NULL, src->m, src->x, src->y, target->x, target->y, CELL_CHKWALL) )
|
||||||
|
break;
|
||||||
|
|
||||||
if( (src->type == BL_MER || src->type == BL_HOM) && !skill_check_condition_mercenary(src, ud->skillid, ud->skilllv, 1) )
|
if( (src->type == BL_MER || src->type == BL_HOM) && !skill_check_condition_mercenary(src, ud->skillid, ud->skilllv, 1) )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -323,6 +323,8 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag)
|
|||||||
|
|
||||||
if( ud == NULL) return 0;
|
if( ud == NULL) return 0;
|
||||||
|
|
||||||
|
if( !path_search_long(NULL, bl->m, bl->x, bl->y, x, y, CELL_CHKWALL) ) return 0;
|
||||||
|
|
||||||
if (flag&4 && DIFF_TICK(ud->canmove_tick, gettick()) > 0 &&
|
if (flag&4 && DIFF_TICK(ud->canmove_tick, gettick()) > 0 &&
|
||||||
DIFF_TICK(ud->canmove_tick, gettick()) < 2000)
|
DIFF_TICK(ud->canmove_tick, gettick()) < 2000)
|
||||||
{ // Delay walking command. [Skotlex]
|
{ // Delay walking command. [Skotlex]
|
||||||
@ -1712,7 +1714,8 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if( status_isdead(src) || status_isdead(target) ||
|
if( status_isdead(src) || status_isdead(target) ||
|
||||||
battle_check_target(src,target,BCT_ENEMY) <= 0 || !status_check_skilluse(src, target, 0, 0) )
|
battle_check_target(src,target,BCT_ENEMY) <= 0 || !status_check_skilluse(src, target, 0, 0) ||
|
||||||
|
!path_search_long(NULL, src->m, src->x, src->y, target->x, target->y, CELL_CHKWALL) )
|
||||||
return 0; // can't attack under these conditions
|
return 0; // can't attack under these conditions
|
||||||
|
|
||||||
if( src->m != target->m )
|
if( src->m != target->m )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user