Skip to content

Commit

Permalink
Sightblaster (fixes #788)
Browse files Browse the repository at this point in the history
* Fixed Sightblaster printing errors to the map server log every time it's not used against a trap
* Fixed Sightblaster displaying damage twice and showing it's animation on every hit (partial revert of d95f5d2)
(Added a few comments so that it's clear it can't be moved to the other traps.)
  • Loading branch information
Playtester committed Jan 24, 2016
1 parent 4fd4c1d commit 41e6b4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/map/skill.c
Original file line number Diff line number Diff line change
Expand Up @@ -3279,7 +3279,6 @@ int64 skill_attack (int attack_type, struct block_list* src, struct block_list *
case WM_REVERBERATION_MAGIC:
dmg.dmotion = clif_skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,dmg.div_,WM_REVERBERATION,-2,6);
break;
case WZ_SIGHTBLASTER:
case HT_CLAYMORETRAP:
case HT_BLASTMINE:
case HT_FLASHER:
Expand All @@ -3290,9 +3289,14 @@ int64 skill_attack (int attack_type, struct block_list* src, struct block_list *
dmg.dmotion = clif_skill_damage(src, bl, tick, dmg.amotion, dmg.dmotion, damage, dmg.div_, skill_id, (flag&SD_LEVEL) ? -1 : skill_lv, 5);
if( dsrc != src ) // avoid damage display redundancy
break;
//Fall through
case HT_LANDMINE:
dmg.dmotion = clif_skill_damage(dsrc,bl,tick, dmg.amotion, dmg.dmotion, damage, dmg.div_, skill_id, -1, type);
break;
case WZ_SIGHTBLASTER:
//Sightblaster should never call clif_skill_damage twice
dmg.dmotion = clif_skill_damage(src, bl, tick, dmg.amotion, dmg.dmotion, damage, dmg.div_, skill_id, (flag&SD_LEVEL) ? -1 : skill_lv, 5);
break;
case RL_R_TRIP_PLUSATK:
case RL_BANISHING_BUSTER:
case RL_S_STORM:
Expand Down
4 changes: 3 additions & 1 deletion src/map/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -12679,8 +12679,10 @@ int status_change_timer_sub(struct block_list* bl, va_list ap)
if (battle_check_target( src, bl, BCT_ENEMY ) > 0 &&
status_check_skilluse(src, bl, WZ_SIGHTBLASTER, 2))
{
struct skill_unit *su = (struct skill_unit *)bl;
if (sce) {
struct skill_unit *su = NULL;
if(bl->type == BL_SKILL)
su = (struct skill_unit *)bl;
if (skill_attack(BF_MAGIC,src,src,bl,WZ_SIGHTBLASTER,sce->val1,tick,0x1000000)
&& (!su || !su->group || !(skill_get_inf2(su->group->skill_id)&INF2_TRAP))) { // The hit is not counted if it's against a trap
sce->val2 = 0; // This signals it to end.
Expand Down

0 comments on commit 41e6b4a

Please sign in to comment.