diff options
author | shennetsind <ind@henn.et> | 2013-11-07 16:04:51 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-11-07 16:04:51 -0200 |
commit | b9b32ac7609e33c21b488d722103cc0eea16b12c (patch) | |
tree | a2d96930f2f608a14374434e487c1f06ea703728 /src/map/clif.c | |
parent | 52864b40d6f9df5682b257ac2f36d645895364be (diff) | |
download | hercules-b9b32ac7609e33c21b488d722103cc0eea16b12c.tar.gz hercules-b9b32ac7609e33c21b488d722103cc0eea16b12c.tar.bz2 hercules-b9b32ac7609e33c21b488d722103cc0eea16b12c.tar.xz hercules-b9b32ac7609e33c21b488d722103cc0eea16b12c.zip |
Item Bound Fixes/Adjustments/Improvements
Special Thanks to Haruna
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 04614158a..fecf0be0e 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1802,13 +1802,13 @@ void clif_selllist(struct map_session_data *sd) if( !itemdb_cansell(&sd->status.inventory[i], pc->get_group_level(sd)) ) continue; - if( sd->status.inventory[i].expire_time || (sd->status.inventory[i].bound && !pc->can_give_bounded_items(sd)) ) - continue; // Cannot Sell Rental Items or Account Bounded Items + if( sd->status.inventory[i].expire_time ) + continue; // Cannot Sell Rental Items if( sd->status.inventory[i].bound && !pc->can_give_bounded_items(sd)) continue; // Don't allow sale of bound items - val=sd->inventory_data[i]->value_sell; + val=sd->inventory_data[i]->value_sell; if( val < 0 ) continue; WFIFOW(fd,4+c*10)=i+2; @@ -2232,7 +2232,10 @@ void clif_additem(struct map_session_data *sd, int n, int amount, int fail) { p.HireExpireDate = sd->status.inventory[n].expire_time; #endif #if PACKETVER >= 20071002 - p.bindOnEquipType = sd->status.inventory[n].bound ? 2 : 0; + /* why restrict the flag to non-stackable? because this is the only packet allows stackable to, + * show the color, and therefore it'd be inconsistent with the rest (aka it'd show yellow, you relog/refresh and boom its gone) + */ + p.bindOnEquipType = sd->status.inventory[n].bound && !itemdb->isstackable2(sd->inventory_data[n]) ? 2 : 0; #endif } p.result = (unsigned char)fail; @@ -2381,7 +2384,6 @@ void clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item *i, stru #if PACKETVER >= 20080102 p->HireExpireDate = i->expire_time; - p->bindOnEquipType = i->bound ? 2 : 0; #endif #if PACKETVER >= 20120925 @@ -15067,8 +15069,8 @@ void clif_parse_Auction_setitem(int fd, struct map_session_data *sd) if( !pc->can_give_items(sd) || sd->status.inventory[idx].expire_time || !sd->status.inventory[idx].identify || - !itemdb_canauction(&sd->status.inventory[idx],pc->get_group_level(sd)) || - (sd->status.inventory[idx].bound && !pc->can_give_bounded_items(sd)) ) { // Quest Item or something else + !itemdb_canauction(&sd->status.inventory[idx],pc->get_group_level(sd)) || // Quest Item or something else + (sd->status.inventory[idx].bound && !pc->can_give_bounded_items(sd)) ) { clif->auction_setitem(sd->fd, idx, true); return; } @@ -15145,13 +15147,11 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd) return; } - // Auction checks... - if( sd->status.inventory[sd->auction.index].bound && !pc->can_give_bounded_items(sd) ) { - clif->message(sd->fd, msg_txt(293)); - clif->auction_message(fd, 2); // The auction has been canceled - return; + if( sd->status.zeny < (auction.hours * battle_config.auction_feeperhour) ) { + clif_Auction_message(fd, 5); // You do not have enough zeny to pay the Auction Fee. + return; } - + if( auction.buynow > battle_config.auction_maximumprice ) { // Zeny Limits auction.buynow = battle_config.auction_maximumprice; @@ -15177,6 +15177,13 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd) return; } + // Auction checks... + if( sd->status.inventory[sd->auction.index].bound && !pc->can_give_bounded_items(sd) ) { + clif->message(sd->fd, msg_txt(293)); + clif->auction_message(fd, 2); // The auction has been canceled + return; + } + safestrncpy(auction.item_name, item->jname, sizeof(auction.item_name)); auction.type = item->type; memcpy(&auction.item, &sd->status.inventory[sd->auction.index], sizeof(struct item)); |