|
@@ -20869,6 +20869,10 @@ void clif_parse_equipswitch_request_single( int fd, struct map_session_data* sd
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ // Check if the item exists
|
|
|
+ if (sd->inventory_data[index] == nullptr)
|
|
|
+ return;
|
|
|
+
|
|
|
// Check if the item was already added to equip switch
|
|
|
if( sd->inventory.u.items_inventory[index].equipSwitch ){
|
|
|
if( sd->npc_id ){
|
|
@@ -20884,9 +20888,10 @@ void clif_parse_equipswitch_request_single( int fd, struct map_session_data* sd
|
|
|
}
|
|
|
|
|
|
pc_equipswitch( sd, index );
|
|
|
- }else{
|
|
|
- pc_equipitem( sd, index, pc_equippoint(sd, index), true );
|
|
|
+ return;
|
|
|
}
|
|
|
+
|
|
|
+ pc_equipitem( sd, index, pc_equippoint(sd, index), true );
|
|
|
#endif
|
|
|
}
|
|
|
|