From 7c21376f8dea2b438cb9470f74acc157a1929f06 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 28 Jun 2016 22:08:54 +0300 Subject: Use item attribute as flags varible. Now only ATTR_BROKEN flag exists. --- src/map/atcommand.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 094e64e2a..858bfea1b 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -4137,8 +4137,9 @@ ACMD(repairall) count = 0; for (i = 0; i < MAX_INVENTORY; i++) { - if (sd->status.inventory[i].nameid && sd->status.inventory[i].attribute == 1) { - sd->status.inventory[i].attribute = 0; + if (sd->status.inventory[i].nameid && (sd->status.inventory[i].attribute & ATTR_BROKEN) != 0) { + sd->status.inventory[i].attribute |= ATTR_BROKEN; + sd->status.inventory[i].attribute ^= ATTR_BROKEN; clif->produce_effect(sd, 0, sd->status.inventory[i].nameid); count++; } -- cgit v1.2.3-70-g09d2