Jump to content
  • 0

Assassin/SinX can't equip weapons on the Left Side


TemplarOfTheMist

Question


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   1
  • Joined:  06/05/12
  • Last Seen:  

Hello,

In my emulator, I cannot seem to equip weapons on the Shield slot or Left Hand. All weapons (daggers, swords) just go straight to the Right thus not allowing me to dual-wield daggers. Just the official weapons, as I don't have anything custom.

Which part of src should I look into?

Thanks!

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   1
  • Joined:  06/05/12
  • Last Seen:  

From my research I think pc.c is the only one I should check... Here is my current PC.C

int pc_equippoint_sub(struct map_session_data *sd,struct item_data* id){
	int ep = 0;

	nullpo_ret(sd);
	nullpo_ret(id);

	if (!itemdb_isequip2(id))
		return 0; //Not equippable by players.

	ep = id->equip;
	if(id->look == W_DAGGER	||
		id->look == W_1HSWORD ||
		id->look == W_1HAXE) {
		if(ep == EQP_HAND_R && (pc_checkskill(sd,AS_LEFT) > 0 || (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN ||
			(sd->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO))//Kagerou and Oboro can dual wield daggers. [Rytech]
			return EQP_ARMS;
	}
	return ep;
}

 

Should this be changed to

if(ep == EQP_HAND_R && (pc_checkskill(sd,AS_LEFT) > 0 && (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN?
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  802
  • Reputation:   229
  • Joined:  01/30/13
  • Last Seen:  

I honestly don't understand that code part either (why axes, why swords?).

Anyway, you could debug here (just set a breakpoint, run server in debug, then log in and equip an item, then check the variables):

	if(pos == EQP_ARMS && id->equip == EQP_HAND_R) { //Dual wield capable weapon.
		pos = (req_pos&EQP_ARMS);
		if (pos == EQP_ARMS) //User specified both slots, pick one for them.
			pos = sd->equip_index[EQI_HAND_R] >= 0 ? EQP_HAND_L : EQP_HAND_R;
	}

Is pos "EQP_ARMS"? What is req_pos? What does pos get set to at the end?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   1
  • Joined:  06/05/12
  • Last Seen:  

6 hours ago, Playtester said:

I honestly don't understand that code part either (why axes, why swords?).

Anyway, you could debug here (just set a breakpoint, run server in debug, then log in and equip an item, then check the variables):


	if(pos == EQP_ARMS && id->equip == EQP_HAND_R) { //Dual wield capable weapon.
		pos = (req_pos&EQP_ARMS);
		if (pos == EQP_ARMS) //User specified both slots, pick one for them.
			pos = sd->equip_index[EQI_HAND_R] >= 0 ? EQP_HAND_L : EQP_HAND_R;
	}

Is pos "EQP_ARMS"? What is req_pos? What does pos get set to at the end?

This is the block of code I currently have at pc.c:

int pc_equippoint_sub(struct map_session_data *sd,struct item_data* id){
	int ep = 0;

	nullpo_ret(sd);
	nullpo_ret(id);

	if (!itemdb_isequip2(id))
		return 0; //Not equippable by players.

	ep = id->equip;
	if(id->look == W_DAGGER	||
		id->look == W_1HSWORD ||
		id->look == W_1HAXE) {
		if(ep == EQP_HAND_R && (pc_checkskill(sd,AS_LEFT) > 0 || (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN ||
			(sd->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO))//Kagerou and Oboro can dual wield daggers. [Rytech]
			return EQP_ARMS;
	}
	return ep;
}

This seems to be the same one with the latest rAthena code but I have no idea why doesn't it work...

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  802
  • Reputation:   229
  • Joined:  01/30/13
  • Last Seen:  

You did not actually react to anything I said... the code I quoted is somewhere else. Debug it and answer my question or I can't help you.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   1
  • Joined:  06/05/12
  • Last Seen:  

16 hours ago, Playtester said:

You did not actually react to anything I said... the code I quoted is somewhere else. Debug it and answer my question or I can't help you.

Apologies for misunderstanding your reply. Is there a way to debug it other that from Windows? I currently do not have a test server within my resources. My server is currently up on a Linux based VPS though.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  802
  • Reputation:   229
  • Joined:  01/30/13
  • Last Seen:  

I only know how to do it with visual studio.

You can always just run a test server on your local computer.

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...