diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-28 22:08:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-30 02:32:10 +0300 |
commit | 7c21376f8dea2b438cb9470f74acc157a1929f06 (patch) | |
tree | 396829d37d642103dbd98e39b00bed7b8e875461 /src/map/clif.c | |
parent | 48064104f599a2dfa57440a1fda861c27bd55401 (diff) | |
download | hercules-7c21376f8dea2b438cb9470f74acc157a1929f06.tar.gz hercules-7c21376f8dea2b438cb9470f74acc157a1929f06.tar.bz2 hercules-7c21376f8dea2b438cb9470f74acc157a1929f06.tar.xz hercules-7c21376f8dea2b438cb9470f74acc157a1929f06.zip |
Use item attribute as flags varible. Now only ATTR_BROKEN flag exists.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 13a7b0839..21c3c1c3e 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2397,7 +2397,7 @@ void clif_additem(struct map_session_data *sd, int n, int amount, int fail) { p.nameid = sd->status.inventory[n].nameid; p.IsIdentified = sd->status.inventory[n].identify ? 1 : 0; - p.IsDamaged = sd->status.inventory[n].attribute ? 1 : 0; + p.IsDamaged = (sd->status.inventory[n].attribute & ATTR_BROKEN) != 0 ? 1 : 0; p.refiningLevel =sd->status.inventory[n].refine; clif->addcards2(&p.slot.card[0], &sd->status.inventory[n]); p.location = pc->equippoint(sd,n); @@ -2512,7 +2512,7 @@ void clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *i, struct p->location = eqp_pos; p->WearState = i->equip; #if PACKETVER < 20120925 - p->IsDamaged = i->attribute ? 1 : 0; + p->IsDamaged = (i->attribute & ATTR_BROKEN) != 0 ? 1 : 0; #endif p->RefiningLevel = i->refine; @@ -2532,7 +2532,7 @@ void clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *i, struct #if PACKETVER >= 20120925 p->Flag.IsIdentified = i->identify ? 1 : 0; - p->Flag.IsDamaged = i->attribute ? 1 : 0; + p->Flag.IsDamaged = (i->attribute & ATTR_BROKEN) != 0 ? 1 : 0; p->Flag.PlaceETCTab = i->favorite ? 1 : 0; p->Flag.SpareBits = 0; #endif @@ -6020,7 +6020,7 @@ void clif_item_repair_list(struct map_session_data *sd,struct map_session_data * WFIFOW(fd,0)=0x1fc; for (i = c = 0; i < MAX_INVENTORY; i++) { int nameid = dstsd->status.inventory[i].nameid; - if (nameid > 0 && dstsd->status.inventory[i].attribute != 0) { // && skill_can_repair(sd,nameid)) { + if (nameid > 0 && (dstsd->status.inventory[i].attribute & ATTR_BROKEN) != 0) { // && skill_can_repair(sd,nameid)) { WFIFOW(fd,c*13+4) = i; WFIFOW(fd,c*13+6) = nameid; WFIFOB(fd,c*13+8) = dstsd->status.inventory[i].refine; |