|
@@ -6251,7 +6251,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
|
|
|
|
|
|
sd->status.inventory[n].equip=pos;
|
|
sd->status.inventory[n].equip=pos;
|
|
|
|
|
|
- if(sd->status.inventory[n].equip & EQP_HAND_R) {
|
|
|
|
|
|
+ if(pos & EQP_HAND_R) {
|
|
if(sd->inventory_data[n])
|
|
if(sd->inventory_data[n])
|
|
sd->weapontype1 = sd->inventory_data[n]->look;
|
|
sd->weapontype1 = sd->inventory_data[n]->look;
|
|
else
|
|
else
|
|
@@ -6259,16 +6259,17 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
|
|
pc_calcweapontype(sd);
|
|
pc_calcweapontype(sd);
|
|
clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
|
|
clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
|
|
}
|
|
}
|
|
- if(sd->status.inventory[n].equip & EQP_HAND_L) {
|
|
|
|
|
|
+ if(pos & EQP_HAND_L) {
|
|
if(sd->inventory_data[n]) {
|
|
if(sd->inventory_data[n]) {
|
|
- if(sd->inventory_data[n]->type == 4) {
|
|
|
|
|
|
+ if(sd->inventory_data[n]->type == IT_WEAPON) {
|
|
sd->status.shield = 0;
|
|
sd->status.shield = 0;
|
|
if(sd->status.inventory[n].equip == EQP_HAND_L)
|
|
if(sd->status.inventory[n].equip == EQP_HAND_L)
|
|
sd->weapontype2 = sd->inventory_data[n]->look;
|
|
sd->weapontype2 = sd->inventory_data[n]->look;
|
|
else
|
|
else
|
|
sd->weapontype2 = 0;
|
|
sd->weapontype2 = 0;
|
|
}
|
|
}
|
|
- else if(sd->inventory_data[n]->type == 5) {
|
|
|
|
|
|
+ else
|
|
|
|
+ if(sd->inventory_data[n]->type == IT_ARMOR) {
|
|
sd->status.shield = sd->inventory_data[n]->look;
|
|
sd->status.shield = sd->inventory_data[n]->look;
|
|
sd->weapontype2 = 0;
|
|
sd->weapontype2 = 0;
|
|
}
|
|
}
|
|
@@ -6278,28 +6279,30 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
|
|
pc_calcweapontype(sd);
|
|
pc_calcweapontype(sd);
|
|
clif_changelook(&sd->bl,LOOK_SHIELD,sd->status.shield);
|
|
clif_changelook(&sd->bl,LOOK_SHIELD,sd->status.shield);
|
|
}
|
|
}
|
|
- if(sd->status.inventory[n].equip & EQP_HEAD_LOW) {
|
|
|
|
- if(sd->inventory_data[n])
|
|
|
|
|
|
+ //Added check to prevent sending the same look on multiple slots ->
|
|
|
|
+ //causes client to redraw item on top of itself. (suggested by Lupus)
|
|
|
|
+ if(pos & EQP_HEAD_LOW) {
|
|
|
|
+ if(sd->inventory_data[n] && !pos&(EQP_HEAD_TOP|EQP_HEAD_MID))
|
|
sd->status.head_bottom = sd->inventory_data[n]->look;
|
|
sd->status.head_bottom = sd->inventory_data[n]->look;
|
|
else
|
|
else
|
|
sd->status.head_bottom = 0;
|
|
sd->status.head_bottom = 0;
|
|
clif_changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom);
|
|
clif_changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom);
|
|
}
|
|
}
|
|
- if(sd->status.inventory[n].equip & EQP_HEAD_TOP) {
|
|
|
|
|
|
+ if(pos & EQP_HEAD_TOP) {
|
|
if(sd->inventory_data[n])
|
|
if(sd->inventory_data[n])
|
|
sd->status.head_top = sd->inventory_data[n]->look;
|
|
sd->status.head_top = sd->inventory_data[n]->look;
|
|
else
|
|
else
|
|
sd->status.head_top = 0;
|
|
sd->status.head_top = 0;
|
|
clif_changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top);
|
|
clif_changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top);
|
|
}
|
|
}
|
|
- if(sd->status.inventory[n].equip & EQP_HEAD_MID) {
|
|
|
|
- if(sd->inventory_data[n])
|
|
|
|
|
|
+ if(pos & EQP_HEAD_MID) {
|
|
|
|
+ if(sd->inventory_data[n] && !pos&EQP_HEAD_TOP)
|
|
sd->status.head_mid = sd->inventory_data[n]->look;
|
|
sd->status.head_mid = sd->inventory_data[n]->look;
|
|
else
|
|
else
|
|
sd->status.head_mid = 0;
|
|
sd->status.head_mid = 0;
|
|
clif_changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid);
|
|
clif_changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid);
|
|
}
|
|
}
|
|
- if(sd->status.inventory[n].equip & EQP_SHOES)
|
|
|
|
|
|
+ if(pos & EQP_SHOES)
|
|
clif_changelook(&sd->bl,LOOK_SHOES,0);
|
|
clif_changelook(&sd->bl,LOOK_SHOES,0);
|
|
|
|
|
|
pc_checkallowskill(sd); //Check if status changes should be halted.
|
|
pc_checkallowskill(sd); //Check if status changes should be halted.
|