Jump to content
  • 0

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


Question

Posted

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!

6 answers to this question

Recommended Posts

  • 0
Posted

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?
  • 0
Posted

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?

  • 0
Posted
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...

  • 0
Posted
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.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...