diff options
author | Haru <haru@dotalux.com> | 2016-06-30 01:42:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-30 01:42:28 +0200 |
commit | be91934950494423961c7f9ca6dbfb42844359c2 (patch) | |
tree | 396829d37d642103dbd98e39b00bed7b8e875461 /src/map/atcommand.c | |
parent | 48064104f599a2dfa57440a1fda861c27bd55401 (diff) | |
parent | 7c21376f8dea2b438cb9470f74acc157a1929f06 (diff) | |
download | hercules-be91934950494423961c7f9ca6dbfb42844359c2.tar.gz hercules-be91934950494423961c7f9ca6dbfb42844359c2.tar.bz2 hercules-be91934950494423961c7f9ca6dbfb42844359c2.tar.xz hercules-be91934950494423961c7f9ca6dbfb42844359c2.zip |
Merge pull request #1329 from 4144/attribute
Use item attribute as flags varible. Now only ATTR_BROKEN flag exists.
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 5 |
1 files changed, 3 insertions, 2 deletions
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++; } |