summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/pc.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index b34c927a2..f862a739d 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1051,6 +1051,24 @@ static int pc_isequip(struct map_session_data *sd, int n)
return 0;
}
}
+
+ if ( battle_config.unequip_restricted_equipment & 1 ) {
+ int i;
+ for ( i = 0; i < map->list[sd->bl.m].zone->disabled_items_count; i++ )
+ if ( map->list[sd->bl.m].zone->disabled_items[i] == sd->status.inventory[n].nameid )
+ return 0;
+ }
+
+ if ( battle_config.unequip_restricted_equipment & 2 ) {
+ if ( !itemdb_isspecial( sd->status.inventory[n].card[0] ) ) {
+ int i, slot;
+ for ( slot = 0; slot < MAX_SLOTS; slot++ )
+ for ( i = 0; i < map->list[sd->bl.m].zone->disabled_items_count; i++ )
+ if ( map->list[sd->bl.m].zone->disabled_items[i] == sd->status.inventory[n].card[slot] )
+ return 0;
+ }
+ }
+
if (sd->sc.count) {
if(item->equip & EQP_ARMS && item->type == IT_WEAPON && sd->sc.data[SC_NOEQUIPWEAPON]) // Also works with left-hand weapons [DracoRPG]
@@ -1106,23 +1124,6 @@ static int pc_isequip(struct map_session_data *sd, int n)
return 0;
}
- if ( battle_config.unequip_restricted_equipment & 1 ) {
- int i;
- for ( i = 0; i < map->list[sd->bl.m].zone->disabled_items_count; i++ )
- if ( map->list[sd->bl.m].zone->disabled_items[i] == sd->status.inventory[n].nameid )
- return 0;
- }
-
- if ( battle_config.unequip_restricted_equipment & 2 ) {
- if ( !itemdb_isspecial( sd->status.inventory[n].card[0] ) ) {
- int i, slot;
- for ( slot = 0; slot < MAX_SLOTS; slot++ )
- for ( i = 0; i < map->list[sd->bl.m].zone->disabled_items_count; i++ )
- if ( map->list[sd->bl.m].zone->disabled_items[i] == sd->status.inventory[n].card[slot] )
- return 0;
- }
- }
-
return 1;
}