|
@@ -1801,13 +1801,35 @@ uint8 pc_isequip(map_session_data *sd,int n)
|
|
|
|
|
|
if(item == nullptr)
|
|
if(item == nullptr)
|
|
return ITEM_EQUIP_ACK_FAIL;
|
|
return ITEM_EQUIP_ACK_FAIL;
|
|
- if(item->elv && sd->status.base_level < (unsigned int)item->elv)
|
|
|
|
|
|
+
|
|
|
|
+ if (sd->sc.count && sd->sc.getSCE(SC_SPIRIT) && sd->sc.getSCE(SC_SPIRIT)->val2 == SL_SUPERNOVICE) {
|
|
|
|
+ //Spirit of Super Novice equip bonuses. [Skotlex]
|
|
|
|
+ if (sd->status.base_level >= 90 && item->equip & EQP_HELM)
|
|
|
|
+ return ITEM_EQUIP_ACK_OK; //Can equip all helms
|
|
|
|
+
|
|
|
|
+ if (sd->status.base_level >= 96 && item->equip & EQP_ARMS && item->type == IT_WEAPON && item->weapon_level == 4)
|
|
|
|
+ switch (item->subtype) { //In weapons, the look determines type of weapon.
|
|
|
|
+ case W_DAGGER: //All level 4 - Daggers
|
|
|
|
+ case W_1HSWORD: //All level 4 - 1H Swords
|
|
|
|
+ case W_1HAXE: //All level 4 - 1H Axes
|
|
|
|
+ case W_MACE: //All level 4 - 1H Maces
|
|
|
|
+ case W_STAFF: //All level 4 - 1H Staves
|
|
|
|
+ case W_2HSTAFF: //All level 4 - 2H Staves
|
|
|
|
+ return ITEM_EQUIP_ACK_OK;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(item->elv && sd->status.base_level < static_cast<unsigned int>(item->elv))
|
|
return ITEM_EQUIP_ACK_FAILLEVEL;
|
|
return ITEM_EQUIP_ACK_FAILLEVEL;
|
|
- if(item->elvmax && sd->status.base_level > (unsigned int)item->elvmax)
|
|
|
|
|
|
+ if(item->elvmax && sd->status.base_level > static_cast<unsigned int>(item->elvmax))
|
|
return ITEM_EQUIP_ACK_FAILLEVEL;
|
|
return ITEM_EQUIP_ACK_FAILLEVEL;
|
|
if(item->sex != SEX_BOTH && sd->status.sex != item->sex)
|
|
if(item->sex != SEX_BOTH && sd->status.sex != item->sex)
|
|
return ITEM_EQUIP_ACK_FAIL;
|
|
return ITEM_EQUIP_ACK_FAIL;
|
|
|
|
|
|
|
|
+ // Broken equip
|
|
|
|
+ if (sd->inventory.u.items_inventory[n].attribute == 1)
|
|
|
|
+ return ITEM_EQUIP_ACK_FAIL;
|
|
|
|
+
|
|
//fail to equip if item is restricted
|
|
//fail to equip if item is restricted
|
|
if (!battle_config.allow_equip_restricted_item && itemdb_isNoEquip(item, sd->bl.m))
|
|
if (!battle_config.allow_equip_restricted_item && itemdb_isNoEquip(item, sd->bl.m))
|
|
return ITEM_EQUIP_ACK_FAIL;
|
|
return ITEM_EQUIP_ACK_FAIL;
|
|
@@ -1874,23 +1896,6 @@ uint8 pc_isequip(map_session_data *sd,int n)
|
|
return ITEM_EQUIP_ACK_FAIL;
|
|
return ITEM_EQUIP_ACK_FAIL;
|
|
if(item->equip && (sd->sc.getSCE(SC_KYOUGAKU) || sd->sc.getSCE(SC_SUHIDE)))
|
|
if(item->equip && (sd->sc.getSCE(SC_KYOUGAKU) || sd->sc.getSCE(SC_SUHIDE)))
|
|
return ITEM_EQUIP_ACK_FAIL;
|
|
return ITEM_EQUIP_ACK_FAIL;
|
|
-
|
|
|
|
- if (sd->sc.getSCE(SC_SPIRIT) && sd->sc.getSCE(SC_SPIRIT)->val2 == SL_SUPERNOVICE) {
|
|
|
|
- //Spirit of Super Novice equip bonuses. [Skotlex]
|
|
|
|
- if (sd->status.base_level > 90 && item->equip & EQP_HELM)
|
|
|
|
- return ITEM_EQUIP_ACK_OK; //Can equip all helms
|
|
|
|
-
|
|
|
|
- if (sd->status.base_level > 96 && item->equip & EQP_ARMS && item->type == IT_WEAPON && item->weapon_level == 4)
|
|
|
|
- switch(item->subtype) { //In weapons, the look determines type of weapon.
|
|
|
|
- case W_DAGGER: //All level 4 - Daggers
|
|
|
|
- case W_1HSWORD: //All level 4 - 1H Swords
|
|
|
|
- case W_1HAXE: //All level 4 - 1H Axes
|
|
|
|
- case W_MACE: //All level 4 - 1H Maces
|
|
|
|
- case W_STAFF: //All level 4 - 1H Staves
|
|
|
|
- case W_2HSTAFF: //All level 4 - 2H Staves
|
|
|
|
- return ITEM_EQUIP_ACK_OK;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
//Not equipable by class. [Skotlex]
|
|
//Not equipable by class. [Skotlex]
|
|
@@ -11916,7 +11921,7 @@ bool pc_equipitem(map_session_data *sd,short n,int req_pos,bool equipswitch)
|
|
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) {
|
|
if( equipswitch ){
|
|
if( equipswitch ){
|
|
clif_equipswitch_add( sd, n, req_pos, ITEM_EQUIP_ACK_FAIL );
|
|
clif_equipswitch_add( sd, n, req_pos, ITEM_EQUIP_ACK_FAIL );
|
|
}else{
|
|
}else{
|