Jump to content
  • 0
Sign in to follow this  
Kuroyama

Sharpshooting Bug

Question

So my snipers weapon has been damaged by WS buff (and stripped by stalker), his weapon has been unequipped but he can still use sharpshooting skill

How to make sharpshooting skill failed when the player has no equipped weapon?

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0
On 12/19/2020 at 5:29 PM, Kuroyama said:

So my snipers weapon has been damaged by WS buff (and stripped by stalker), his weapon has been unequipped but he can still use sharpshooting skill

How to make sharpshooting skill failed when the player has no equipped weapon?

Try this one, i didnt test it yet
 

Find this line in src/map/skill.c

		case NC_FLAMELAUNCHER:
			if (sd) pc->overheat(sd,1);
			/* Fall through */
		case SN_SHARPSHOOTING:
		case MA_SHARPSHOOTING:

Then replace with this one

		case NC_FLAMELAUNCHER:
			if (sd) pc->overheat(sd,1);
			/* Fall through */
		case SN_SHARPSHOOTING:
		case MA_SHARPSHOOTING:
			if(sd->weapontype != W_BOW){
				clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0, 0);
			}
			else{
			skill->area_temp[1] = bl->id;
			map->foreachinpath(skill->attack_area,src->m,src->x,src->y,bl->x,bl->y,
			                   skill->get_splash(skill_id, skill_lv),skill->get_maxcount(skill_id,skill_lv), skill->splash_target(src),
			                   skill->get_type(skill_id, skill_lv), src, src, skill_id, skill_lv, tick, flag, BCT_ENEMY);
			}
		break;

after editing, please recompile and check it ingame

if this code will fixed your problem, dont forget to make as solve :)

Share this post


Link to post
Share on other sites
  • 0
On 12/19/2020 at 5:29 PM, Kuroyama said:

So my snipers weapon has been damaged by WS buff (and stripped by stalker), his weapon has been unequipped but he can still use sharpshooting skill

How to make sharpshooting skill failed when the player has no equipped weapon?

Experiencing this too on november svn revision, all of the skills can cast without pre-requisite or required weapons.

You can rapid fire without gun, arrow shower and double strafe without bow, sonic blow without katar on assassin cross (equipped with dagger).

I don't know if that's the new normal but that's not quite right.

 

On 12/27/2020 at 7:53 PM, Kuya Jeo said:

Try this one, i didnt test it yet
 

Find this line in src/map/skill.c

case NC_FLAMELAUNCHER: if (sd) pc->overheat(sd,1); /* Fall through */ case SN_SHARPSHOOTING: case MA_SHARPSHOOTING:


		case NC_FLAMELAUNCHER:
			if (sd) pc->overheat(sd,1);
			/* Fall through */
		case SN_SHARPSHOOTING:
		case MA_SHARPSHOOTING:

Then replace with this one

case NC_FLAMELAUNCHER: if (sd) pc->overheat(sd,1); /* Fall through */ case SN_SHARPSHOOTING: case MA_SHARPSHOOTING: if(sd->weapontype != W_BOW){ clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0, 0); } else{ skill->area_temp[1] = bl->id; map->foreachinpath(skill->attack_area,src->m,src->x,src->y,bl->x,bl->y, skill->get_splash(skill_id, skill_lv),skill->get_maxcount(skill_id,skill_lv), skill->splash_target(src), skill->get_type(skill_id, skill_lv), src, src, skill_id, skill_lv, tick, flag, BCT_ENEMY); } break;


		case NC_FLAMELAUNCHER:
			if (sd) pc->overheat(sd,1);
			/* Fall through */
		case SN_SHARPSHOOTING:
		case MA_SHARPSHOOTING:
			if(sd->weapontype != W_BOW){
				clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0, 0);
			}
			else{
			skill->area_temp[1] = bl->id;
			map->foreachinpath(skill->attack_area,src->m,src->x,src->y,bl->x,bl->y,
			                   skill->get_splash(skill_id, skill_lv),skill->get_maxcount(skill_id,skill_lv), skill->splash_target(src),
			                   skill->get_type(skill_id, skill_lv), src, src, skill_id, skill_lv, tick, flag, BCT_ENEMY);
			}
		break;

after editing, please recompile and check it ingame

if this code will fixed your problem, dont forget to make as solve :)

This here works on me, but the concern is how bout the other skills?

Does it really act to be like bug behavior or needed to manually code like this solution above?

Share this post


Link to post
Share on other sites
  • 0
On 12/19/2020 at 5:29 PM, Kuroyama said:

So my snipers weapon has been damaged by WS buff (and stripped by stalker), his weapon has been unequipped but he can still use sharpshooting skill

How to make sharpshooting skill failed when the player has no equipped weapon?

i tested with latest stable revision on both pre-re and renewal
Client ver. 2019-05-30aRagexeRE

and i cannot reproduce the bug. do you have any src modifications and what client version did you use?

 

BTW this is the skill code on latest rev. IDK why yours is different from the video.

{
	Id: 382
	Name: "SN_SHARPSHOOTING"
	Description: "Focused Arrow Strike"
	MaxLevel: 5
	Range: 9
	Hit: "BDT_MULTIHIT"
	SkillType: {
		Enemy: true
	}
	AttackType: "Weapon"
	Element: "Ele_Weapon"
	SplashRange: 1
	InterruptCast: true
	SkillInstances: 13
	CastTime: 2000
	AfterCastActDelay: 1500
	CoolDown: 0
	Requirements: {
		SPCost: {
			Lv1: 18
			Lv2: 21
			Lv3: 24
			Lv4: 27
			Lv5: 30
			Lv6: 33
			Lv7: 36
			Lv8: 39
			Lv9: 42
			Lv10: 45
		}
		WeaponTypes: {
			Bows: true
		}
		AmmoTypes: {
			A_ARROW: true
		}
		AmmoAmount: 1
	}
},

 

Edited by Dduwsmitt

Share this post


Link to post
Share on other sites
  • 0
10 hours ago, xJhay said:

Experiencing this too on november svn revision, all of the skills can cast without pre-requisite or required weapons.

You can rapid fire without gun, arrow shower and double strafe without bow, sonic blow without katar on assassin cross (equipped with dagger).

I don't know if that's the new normal but that's not quite right.

 

This here works on me, but the concern is how bout the other skills?

Does it really act to be like bug behavior or needed to manually code like this solution above?

as you can see, i just copied the same code below the sharpshooting, so it will work, i will not affect other skills because it has a BREAK on the end

10 hours ago, xJhay said:

Experiencing this too on november svn revision, all of the skills can cast without pre-requisite or required weapons.

You can rapid fire without gun, arrow shower and double strafe without bow, sonic blow without katar on assassin cross (equipped with dagger).

I don't know if that's the new normal but that's not quite right.

 

This here works on me, but the concern is how bout the other skills?

Does it really act to be like bug behavior or needed to manually code like this solution above?

If other skills still in bug then maybe there something wrong with the skill behavior, i just test it on the latest svn and i didnt experience this kind of bug, im using 2013, 2015 and 2019 client

Share this post


Link to post
Share on other sites
  • 0
7 hours ago, Kuya Jeo said:

as you can see, i just copied the same code below the sharpshooting, so it will work, i will not affect other skills because it has a BREAK on the end

If other skills still in bug then maybe there something wrong with the skill behavior, i just test it on the latest svn and i didnt experience this kind of bug, im using 2013, 2015 and 2019 client

I saw it now, skill is bugging because of this:

Mine is good now. Thanks everyone.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.