Sharpshooting Bug

Kuroyama

New member
Messages
128
Points
0
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?

 
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 :)

 
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.

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?

 
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.

Code:
{
	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
	}
},

 
Last edited by a moderator:
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

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

 
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.

 
Back
Top