|
@@ -6841,8 +6841,9 @@ enum e_setpos pc_setpos(map_session_data* sd, unsigned short mapindex, int x, in
|
|
|
}
|
|
|
for(int i = 0; i < EQI_MAX; i++ ) {
|
|
|
if( sd->equip_index[i] >= 0 )
|
|
|
- if( pc_isequip(sd,sd->equip_index[i]) )
|
|
|
+ if( pc_isequip( sd, sd->equip_index[i] ) != ITEM_EQUIP_ACK_OK ){
|
|
|
pc_unequipitem(sd,sd->equip_index[i],2);
|
|
|
+ }
|
|
|
}
|
|
|
if (battle_config.clear_unit_onwarp&BL_PC)
|
|
|
skill_clear_unitgroup(&sd->bl);
|
|
@@ -9148,8 +9149,9 @@ int pc_resetlvl(map_session_data* sd,int type)
|
|
|
|
|
|
for(i=0;i<EQI_MAX;i++) { // unequip items that can't be equipped by base 1 [Valaris]
|
|
|
if(sd->equip_index[i] >= 0)
|
|
|
- if(pc_isequip(sd,sd->equip_index[i]))
|
|
|
+ if( pc_isequip( sd, sd->equip_index[i] ) != ITEM_EQUIP_ACK_OK ){
|
|
|
pc_unequipitem(sd,sd->equip_index[i],2);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if ((type == 1 || type == 2 || type == 3) && sd->status.party_id)
|
|
@@ -10784,8 +10786,9 @@ bool pc_jobchange(map_session_data *sd,int job, char upper)
|
|
|
|
|
|
for(i=0;i<EQI_MAX;i++) {
|
|
|
if(sd->equip_index[i] >= 0)
|
|
|
- if(pc_isequip(sd,sd->equip_index[i]))
|
|
|
+ if( pc_isequip( sd, sd->equip_index[i] ) != ITEM_EQUIP_ACK_OK ){
|
|
|
pc_unequipitem(sd,sd->equip_index[i],2); // unequip invalid item for class
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//Change look, if disguised, you need to undisguise
|
|
@@ -11811,7 +11814,6 @@ bool pc_equipitem(map_session_data *sd,short n,int req_pos,bool equipswitch)
|
|
|
{
|
|
|
int i, pos, flag = 0, iflag;
|
|
|
struct item_data *id;
|
|
|
- uint8 res = ITEM_EQUIP_ACK_OK;
|
|
|
short* equip_index;
|
|
|
|
|
|
nullpo_retr(false,sd);
|
|
@@ -11841,7 +11843,9 @@ bool pc_equipitem(map_session_data *sd,short n,int req_pos,bool equipswitch)
|
|
|
if(battle_config.battle_log && !equipswitch)
|
|
|
ShowInfo("equip %u (%d) %x:%x\n",sd->inventory.u.items_inventory[n].nameid,n,id?id->equip:0,req_pos);
|
|
|
|
|
|
- if((res = pc_isequip(sd,n))) {
|
|
|
+ uint8 res = pc_isequip( sd, n );
|
|
|
+
|
|
|
+ if( res != ITEM_EQUIP_ACK_OK ){
|
|
|
if( equipswitch ){
|
|
|
clif_equipswitch_add( sd, n, req_pos, res );
|
|
|
}else{
|