Fix equip order (#6876)
* Fixes equip order * Accessoires now prioritize the left side of the equipment window (if both slots are occupied) * Weapons now prioritize the left side (right hand) in renewal * Weapons still prioritize the right side (shield hand) in pre-renewal
This commit is contained in:
parent
c200e67ae2
commit
9acb50006a
@ -11386,7 +11386,7 @@ bool pc_equipitem(struct map_session_data *sd,short n,int req_pos,bool equipswit
|
|||||||
if(pos == EQP_ACC) { //Accessories should only go in one of the two.
|
if(pos == EQP_ACC) { //Accessories should only go in one of the two.
|
||||||
pos = req_pos&EQP_ACC;
|
pos = req_pos&EQP_ACC;
|
||||||
if (pos == EQP_ACC) //User specified both slots.
|
if (pos == EQP_ACC) //User specified both slots.
|
||||||
pos = equip_index[EQI_ACC_R] >= 0 ? EQP_ACC_L : EQP_ACC_R;
|
pos = (equip_index[EQI_ACC_R] >= 0 && equip_index[EQI_ACC_L] < 0) ? EQP_ACC_L : EQP_ACC_R;
|
||||||
|
|
||||||
for (i = 0; i < sd->inventory_data[n]->slots; i++) { // Accessories that have cards that force equip location
|
for (i = 0; i < sd->inventory_data[n]->slots; i++) { // Accessories that have cards that force equip location
|
||||||
if (!sd->inventory.u.items_inventory[n].card[i])
|
if (!sd->inventory.u.items_inventory[n].card[i])
|
||||||
@ -11406,11 +11406,15 @@ bool pc_equipitem(struct map_session_data *sd,short n,int req_pos,bool equipswit
|
|||||||
} else if(pos == EQP_ARMS && id->equip == EQP_HAND_R) { //Dual wield capable weapon.
|
} else if(pos == EQP_ARMS && id->equip == EQP_HAND_R) { //Dual wield capable weapon.
|
||||||
pos = (req_pos&EQP_ARMS);
|
pos = (req_pos&EQP_ARMS);
|
||||||
if (pos == EQP_ARMS) //User specified both slots, pick one for them.
|
if (pos == EQP_ARMS) //User specified both slots, pick one for them.
|
||||||
|
#ifdef RENEWAL
|
||||||
|
pos = (equip_index[EQI_HAND_R] >= 0 && equip_index[EQI_HAND_L] < 0) ? EQP_HAND_L : EQP_HAND_R;
|
||||||
|
#else
|
||||||
pos = equip_index[EQI_HAND_R] >= 0 ? EQP_HAND_L : EQP_HAND_R;
|
pos = equip_index[EQI_HAND_R] >= 0 ? EQP_HAND_L : EQP_HAND_R;
|
||||||
|
#endif
|
||||||
} else if(pos == EQP_SHADOW_ACC) { // Shadow System
|
} else if(pos == EQP_SHADOW_ACC) { // Shadow System
|
||||||
pos = req_pos&EQP_SHADOW_ACC;
|
pos = req_pos&EQP_SHADOW_ACC;
|
||||||
if (pos == EQP_SHADOW_ACC)
|
if (pos == EQP_SHADOW_ACC)
|
||||||
pos = equip_index[EQI_SHADOW_ACC_L] >= 0 ? EQP_SHADOW_ACC_R : EQP_SHADOW_ACC_L;
|
pos = (equip_index[EQI_SHADOW_ACC_L] >= 0 && equip_index[EQI_SHADOW_ACC_R] < 0) ? EQP_SHADOW_ACC_R : EQP_SHADOW_ACC_L;
|
||||||
} else if(pos == EQP_SHADOW_ARMS && id->equip == EQP_SHADOW_WEAPON) {
|
} else if(pos == EQP_SHADOW_ARMS && id->equip == EQP_SHADOW_WEAPON) {
|
||||||
pos = (req_pos&EQP_SHADOW_ARMS);
|
pos = (req_pos&EQP_SHADOW_ARMS);
|
||||||
if( pos == EQP_SHADOW_ARMS )
|
if( pos == EQP_SHADOW_ARMS )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user