diff options
author | shennetsind <ind@henn.et> | 2013-06-08 17:20:12 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-06-08 17:20:12 -0300 |
commit | 27147633d447400d4a095a4166c64d3a0df4e078 (patch) | |
tree | 6fe2c0b85b7e4f124799bebe4aae3b225ea6b772 /src/map/buyingstore.c | |
parent | 97b6ba1229f845dc8ae47c91586a195a5bf37e9c (diff) | |
download | hercules-27147633d447400d4a095a4166c64d3a0df4e078.tar.gz hercules-27147633d447400d4a095a4166c64d3a0df4e078.tar.bz2 hercules-27147633d447400d4a095a4166c64d3a0df4e078.tar.xz hercules-27147633d447400d4a095a4166c64d3a0df4e078.zip |
Follow up d73783f22b2bb881aab74524d153d89a5932a199
Adjusting pc.c interface name to adhere with the rest (pretty much we try to make it as short as we can, and being there were no conflicts we saw no reason to maintain the 'i')
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/buyingstore.c')
-rw-r--r-- | src/map/buyingstore.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index 0fed57d37..764b51015 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -100,7 +100,7 @@ void buyingstore_create(struct map_session_data* sd, int zenylimit, unsigned cha return; } - if( !iPc->can_give_items(sd) ) + if( !pc->can_give_items(sd) ) {// custom: GM is not allowed to buy (give zeny) sd->buyingstore.slots = 0; clif->message(sd->fd, msg_txt(246)); @@ -147,7 +147,7 @@ void buyingstore_create(struct map_session_data* sd, int zenylimit, unsigned cha break; } - if( !id->flag.buyingstore || !itemdb_cantrade_sub(id, iPc->get_group_level(sd), iPc->get_group_level(sd)) || ( idx = iPc->search_inventory(sd, nameid) ) == -1 ) + if( !id->flag.buyingstore || !itemdb_cantrade_sub(id, pc->get_group_level(sd), pc->get_group_level(sd)) || ( idx = pc->search_inventory(sd, nameid) ) == -1 ) {// restrictions: allowed, no character-bound items and at least one must be owned break; } @@ -221,7 +221,7 @@ void buyingstore_open(struct map_session_data* sd, int account_id) return; } - if( !iPc->can_give_items(sd) ) + if( !pc->can_give_items(sd) ) {// custom: GM is not allowed to sell clif->message(sd->fd, msg_txt(246)); return; @@ -259,7 +259,7 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int return; } - if( !iPc->can_give_items(sd) ) + if( !pc->can_give_items(sd) ) {// custom: GM is not allowed to sell clif->message(sd->fd, msg_txt(246)); clif->buyingstore_trade_failed_seller(sd, BUYINGSTORE_TRADE_SELLER_FAILED, 0); @@ -314,7 +314,7 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int return; } - if( sd->status.inventory[index].expire_time || !itemdb_cantrade(&sd->status.inventory[index], iPc->get_group_level(sd), iPc->get_group_level(pl_sd)) || memcmp(sd->status.inventory[index].card, buyingstore_blankslots, sizeof(buyingstore_blankslots)) ) + if( sd->status.inventory[index].expire_time || !itemdb_cantrade(&sd->status.inventory[index], pc->get_group_level(sd), pc->get_group_level(pl_sd)) || memcmp(sd->status.inventory[index].card, buyingstore_blankslots, sizeof(buyingstore_blankslots)) ) {// non-tradable item clif->buyingstore_trade_failed_seller(sd, BUYINGSTORE_TRADE_SELLER_FAILED, nameid); return; @@ -333,7 +333,7 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int return; } - if( iPc->checkadditem(pl_sd, nameid, amount) == ADDITEM_OVERAMOUNT ) + if( pc->checkadditem(pl_sd, nameid, amount) == ADDITEM_OVERAMOUNT ) {// buyer does not have enough space for this item clif->buyingstore_trade_failed_seller(sd, BUYINGSTORE_TRADE_SELLER_FAILED, nameid); return; @@ -369,13 +369,13 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int zeny = amount*pl_sd->buyingstore.items[listidx].price; // move item - iPc->additem(pl_sd, &sd->status.inventory[index], amount, LOG_TYPE_BUYING_STORE); - iPc->delitem(sd, index, amount, 1, 0, LOG_TYPE_BUYING_STORE); + pc->additem(pl_sd, &sd->status.inventory[index], amount, LOG_TYPE_BUYING_STORE); + pc->delitem(sd, index, amount, 1, 0, LOG_TYPE_BUYING_STORE); pl_sd->buyingstore.items[listidx].amount-= amount; // pay up - iPc->payzeny(pl_sd, zeny, LOG_TYPE_BUYING_STORE, sd); - iPc->getzeny(sd, zeny, LOG_TYPE_BUYING_STORE, pl_sd); + pc->payzeny(pl_sd, zeny, LOG_TYPE_BUYING_STORE, sd); + pc->getzeny(sd, zeny, LOG_TYPE_BUYING_STORE, pl_sd); pl_sd->buyingstore.zenylimit-= zeny; // notify clients |