diff options
author | Michieru <Michieru@users.noreply.github.com> | 2014-10-25 18:14:59 +0200 |
---|---|---|
committer | Michieru <Michieru@users.noreply.github.com> | 2014-10-25 18:14:59 +0200 |
commit | a5c0636f74a2177839aec9153b542afd8c36850a (patch) | |
tree | bf4f9b1e09113b4a3bcd6b02b705b3b2e9980ae2 /src/map/battle.c | |
parent | 3e1fe0d3842aab1c85f4dfd8e3533ca6631fc4e5 (diff) | |
download | hercules-a5c0636f74a2177839aec9153b542afd8c36850a.tar.gz hercules-a5c0636f74a2177839aec9153b542afd8c36850a.tar.bz2 hercules-a5c0636f74a2177839aec9153b542afd8c36850a.tar.xz hercules-a5c0636f74a2177839aec9153b542afd8c36850a.zip |
Sight Blaster and other skill fixes, magic reflect, crash, trap display and monster behavior fixes
- Fixed cast time of Sightrasher in pre-renewal (700ms -> 500ms)
- Official Sight Blaster behavior (bugreport:6945, partially bugreport:144)
* Sight Blaster's AoE is now 3x3 even in pre-renewal (it was originally larger so it hits traps before they trigger)
* Sight Blaster will now prevent traps from triggering as long as they are knocked back
* Fixed a bug that caused Sight Blaster to not work on traps and ice walls at all
* Sight Blaster will no longer expire when the attack was reflected
* Sight Blaster will now expire when hitting an ice wall
* Sight Blaster will now properly protect you from being attacked from its AoE range
- Sight, Ruwach and Sight Blaster will now check for a target every 20ms (previously every 250ms)
- Step action will now be canceled when being knocked back (skills won't be executed anymore when knocked out of range)
- When knock back magic is reflected it will no longer lead to the caster being knocked back (related to bugreport:6945)
- Activated traps can no longer be hit
- Fixed a problem that left "trap ghosts" forever on the screen when a trap was knocked out of the screen
- Monster behavior fixes
* Monsters will no longer be able to do normal attacks when hiding
* If out of any reason a monster on "attack" state can't move and can't do normal attacks, it will now use "attack" state skills
* The order of monster thought processing is now equal to official servers
- Fixed some potential map server crashes
Mega thanks to Playtester (rathena b88e95381d6a7)
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 3db887c42..5b041d9c3 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -6144,7 +6144,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f TBL_SKILL *su = (TBL_SKILL*)target; if( !su->group ) return 0; - if( skill->get_inf2(su->group->skill_id)&INF2_TRAP ) { //Only a few skills can target traps... + if( skill->get_inf2(su->group->skill_id)&INF2_TRAP && su->group->unit_id != UNT_USED_TRAPS) { //Only a few skills can target traps... switch( battle->get_current_skill(src) ) { case RK_DRAGONBREATH:// it can only hit traps in pvp/gvg maps case RK_DRAGONBREATH_WATER: @@ -6243,6 +6243,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f break; case BL_SKILL: { struct skill_unit *su = (struct skill_unit *)src; + struct status_change* sc = status->get_sc(target); if (!su->group) return 0; @@ -6253,6 +6254,11 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if (inf2&INF2_TARGET_SELF) return 1; } + //Status changes that prevent traps from triggering
+ if (sc && sc->count && skill->get_inf2(su->group->skill_id)&INF2_TRAP) {
+ if( sc->data[SC_WZ_SIGHTBLASTER] && sc->data[SC_WZ_SIGHTBLASTER]->val2 > 0 && sc->data[SC_WZ_SIGHTBLASTER]->val4%2 == 0)
+ return -1;
+ } } break; case BL_MER: |