Jump to content
  • 0

[Bug] Using skills while storage opened.


Myth_

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   2
  • Joined:  11/30/14
  • Last Seen:  

I have notice that lately (on hercules and rathena servers) you can use non-clickable skills while you have your storage opened. For example using teleport skill or magnum break. Is there a way to fix this? Because as far as I remember I used to play a few severs where you wasn't able to do this, so I assume its a bug needed to be solved. Thanks for reading this, I'll be waiting for answers.

Edited by Myth_
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   2
  • Joined:  11/30/14
  • Last Seen:  

I've found this on clif.c: //SELF skills can be used with the storage open, issue: 8027

if( (pc_cant_act2(sd) || sd->chatID) && skill_id != RK_REFRESH && !(skill_id == SR_GENTLETOUCH_CURE &&
		(sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN)) &&
		sd->state.storage_flag && !(inf&INF_SELF_SKILL) ) //SELF skills can be used with the storage open, issue: 8027
		return;

How do I modify it so self skills can not be used with the storage open?

 

Apparently they fixed it on hercules: http://herc.ws/board/tracker/issue-8027-when-the-storage-is-open-you-can-use-self-skills/ but the syntax seems to be a little different than rAthena, if someone would be so kind to translate the fix so it can be used on rAthena I'd appreciate it enough.

 

EDIT :


I found a solution myself by replacing:

if( (pc_cant_act2(sd) || sd->chatID) && skill_id != RK_REFRESH && !(skill_id == SR_GENTLETOUCH_CURE &&
		(sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN)) &&
		sd->state.storage_flag && !(inf&INF_SELF_SKILL) ) //SELF skills can be used with the storage open, issue: 8027
		return;

to:

if( (pc_cant_act2(sd) || sd->chatID) && skill_id != RK_REFRESH && !(skill_id == SR_GENTLETOUCH_CURE &&
		(sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN)) &&
		sd->state.storage_flag && (inf&INF_SELF_SKILL) ) //SELF skills can be used with the storage open, issue: 8027
		return;

Just had to remove ! from !(inf&INF_SELF_SKILL) and leave it like this: (inf&INF_SELF_SKILL) /no1

 

Sorry for the inconvenience and thanks to you all for the support, topic can be closed now.

Edited by Myth_
  • Upvote 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   38
  • Joined:  04/28/13
  • Last Seen:  

Try to search clif.c:

void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd)
{
	struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)];
	if (pc_cant_act(sd))
		return;
	if (pc_issit(sd))
		return;

	clif_parse_UseSkillToPosSub(fd, sd,
		RFIFOW(fd,info->pos[0]), //skill lv
		RFIFOW(fd,info->pos[1]), //skill num
		RFIFOW(fd,info->pos[2]), //pos x
		RFIFOW(fd,info->pos[3]), //pos y
		-1	//Skill more info.
	);
}

and replace to:

void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd)
{
	struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)];
	if (pc_cant_act(sd))
		return;
	if (pc_issit(sd))
		return;
	if (sd->state.storage_flag)
		return;

	clif_parse_UseSkillToPosSub(fd, sd,
		RFIFOW(fd,info->pos[0]), //skill lv
		RFIFOW(fd,info->pos[1]), //skill num
		RFIFOW(fd,info->pos[2]), //pos x
		RFIFOW(fd,info->pos[3]), //pos y
		-1	//Skill more info.
	);
}

Not tested.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   2
  • Joined:  11/30/14
  • Last Seen:  

Try to search clif.c:

void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd)
{
	struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)];
	if (pc_cant_act(sd))
		return;
	if (pc_issit(sd))
		return;

	clif_parse_UseSkillToPosSub(fd, sd,
		RFIFOW(fd,info->pos[0]), //skill lv
		RFIFOW(fd,info->pos[1]), //skill num
		RFIFOW(fd,info->pos[2]), //pos x
		RFIFOW(fd,info->pos[3]), //pos y
		-1	//Skill more info.
	);
}

and replace to:

void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd)
{
	struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)];
	if (pc_cant_act(sd))
		return;
	if (pc_issit(sd))
		return;
	if (sd->state.storage_flag)
		return;

	clif_parse_UseSkillToPosSub(fd, sd,
		RFIFOW(fd,info->pos[0]), //skill lv
		RFIFOW(fd,info->pos[1]), //skill num
		RFIFOW(fd,info->pos[2]), //pos x
		RFIFOW(fd,info->pos[3]), //pos y
		-1	//Skill more info.
	);
}

Not tested.

 

Didn't work, I'm still able to use non-clickable skills while the storage is opened.

 

35d3pko.jpg

 

As you can see I have the storage opened and I can spam the skill Magnum Break or use Teleport.

 

Any other idea about how to fix it?

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

Technically this is official Behavior and should go into a source Request/Support topic

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...