|
@@ -10121,7 +10121,7 @@ bool pc_equipitem(struct map_session_data *sd,short n,int req_pos,bool equipswit
|
|
|
|
|
|
if( n < 0 || n >= MAX_INVENTORY ) {
|
|
if( n < 0 || n >= MAX_INVENTORY ) {
|
|
if( equipswitch ){
|
|
if( equipswitch ){
|
|
- clif_equipswitch_add( sd, n, req_pos, true );
|
|
|
|
|
|
+ clif_equipswitch_add( sd, n, req_pos, ITEM_EQUIP_ACK_FAIL );
|
|
}else{
|
|
}else{
|
|
clif_equipitemack(sd,0,0,ITEM_EQUIP_ACK_FAIL);
|
|
clif_equipitemack(sd,0,0,ITEM_EQUIP_ACK_FAIL);
|
|
}
|
|
}
|
|
@@ -10129,7 +10129,7 @@ bool pc_equipitem(struct map_session_data *sd,short n,int req_pos,bool equipswit
|
|
}
|
|
}
|
|
if( DIFF_TICK(sd->canequip_tick,gettick()) > 0 ) {
|
|
if( DIFF_TICK(sd->canequip_tick,gettick()) > 0 ) {
|
|
if( equipswitch ){
|
|
if( equipswitch ){
|
|
- clif_equipswitch_add( sd, n, req_pos, true );
|
|
|
|
|
|
+ clif_equipswitch_add( sd, n, req_pos, ITEM_EQUIP_ACK_FAIL );
|
|
}else{
|
|
}else{
|
|
clif_equipitemack(sd,n,0,ITEM_EQUIP_ACK_FAIL);
|
|
clif_equipitemack(sd,n,0,ITEM_EQUIP_ACK_FAIL);
|
|
}
|
|
}
|
|
@@ -10145,7 +10145,7 @@ bool pc_equipitem(struct map_session_data *sd,short n,int req_pos,bool equipswit
|
|
|
|
|
|
if((res = pc_isequip(sd,n))) {
|
|
if((res = pc_isequip(sd,n))) {
|
|
if( equipswitch ){
|
|
if( equipswitch ){
|
|
- clif_equipswitch_add( sd, n, req_pos, true );
|
|
|
|
|
|
+ clif_equipswitch_add( sd, n, req_pos, res );
|
|
}else{
|
|
}else{
|
|
clif_equipitemack(sd,n,0,res); // fail
|
|
clif_equipitemack(sd,n,0,res); // fail
|
|
}
|
|
}
|
|
@@ -10153,13 +10153,13 @@ bool pc_equipitem(struct map_session_data *sd,short n,int req_pos,bool equipswit
|
|
}
|
|
}
|
|
|
|
|
|
if( equipswitch && id->type == IT_AMMO ){
|
|
if( equipswitch && id->type == IT_AMMO ){
|
|
- clif_equipswitch_add( sd, n, req_pos, true );
|
|
|
|
|
|
+ clif_equipswitch_add( sd, n, req_pos, ITEM_EQUIP_ACK_FAIL );
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
if (!(pos&req_pos) || sd->inventory.u.items_inventory[n].equip != 0 || sd->inventory.u.items_inventory[n].attribute==1 ) { // [Valaris]
|
|
if (!(pos&req_pos) || sd->inventory.u.items_inventory[n].equip != 0 || sd->inventory.u.items_inventory[n].attribute==1 ) { // [Valaris]
|
|
if( equipswitch ){
|
|
if( equipswitch ){
|
|
- clif_equipswitch_add( sd, n, req_pos, true );
|
|
|
|
|
|
+ clif_equipswitch_add( sd, n, req_pos, ITEM_EQUIP_ACK_FAIL );
|
|
}else{
|
|
}else{
|
|
clif_equipitemack(sd,n,0,ITEM_EQUIP_ACK_FAIL); // fail
|
|
clif_equipitemack(sd,n,0,ITEM_EQUIP_ACK_FAIL); // fail
|
|
}
|
|
}
|
|
@@ -10168,7 +10168,7 @@ bool pc_equipitem(struct map_session_data *sd,short n,int req_pos,bool equipswit
|
|
if( sd->sc.count && (sd->sc.data[SC_BERSERK] || sd->sc.data[SC_SATURDAYNIGHTFEVER] ||
|
|
if( sd->sc.count && (sd->sc.data[SC_BERSERK] || sd->sc.data[SC_SATURDAYNIGHTFEVER] ||
|
|
sd->sc.data[SC_KYOUGAKU] || (sd->sc.data[SC_PYROCLASTIC] && sd->inventory_data[n]->type == IT_WEAPON)) ) {
|
|
sd->sc.data[SC_KYOUGAKU] || (sd->sc.data[SC_PYROCLASTIC] && sd->inventory_data[n]->type == IT_WEAPON)) ) {
|
|
if( equipswitch ){
|
|
if( equipswitch ){
|
|
- clif_equipswitch_add( sd, n, req_pos, true );
|
|
|
|
|
|
+ clif_equipswitch_add( sd, n, req_pos, ITEM_EQUIP_ACK_FAIL );
|
|
}else{
|
|
}else{
|
|
clif_equipitemack(sd,n,0,ITEM_EQUIP_ACK_FAIL); //Fail
|
|
clif_equipitemack(sd,n,0,ITEM_EQUIP_ACK_FAIL); //Fail
|
|
}
|
|
}
|
|
@@ -10239,7 +10239,7 @@ bool pc_equipitem(struct map_session_data *sd,short n,int req_pos,bool equipswit
|
|
}
|
|
}
|
|
|
|
|
|
sd->inventory.u.items_inventory[n].equipSwitch = pos;
|
|
sd->inventory.u.items_inventory[n].equipSwitch = pos;
|
|
- clif_equipswitch_add( sd, n, pos, false );
|
|
|
|
|
|
+ clif_equipswitch_add( sd, n, pos, ITEM_EQUIP_ACK_OK );
|
|
return true;
|
|
return true;
|
|
}else{
|
|
}else{
|
|
for(i=0;i<EQI_MAX;i++) {
|
|
for(i=0;i<EQI_MAX;i++) {
|
|
@@ -10638,7 +10638,7 @@ int pc_equipswitch( struct map_session_data* sd, int index ){
|
|
sd->inventory.u.items_inventory[unequipped_index].equipSwitch = unequipped_position;
|
|
sd->inventory.u.items_inventory[unequipped_index].equipSwitch = unequipped_position;
|
|
|
|
|
|
// Notify the client
|
|
// Notify the client
|
|
- clif_equipswitch_add( sd, unequipped_index, unequipped_position, false );
|
|
|
|
|
|
+ clif_equipswitch_add( sd, unequipped_index, unequipped_position, ITEM_EQUIP_ACK_OK );
|
|
}
|
|
}
|
|
|
|
|
|
return all_position;
|
|
return all_position;
|