diff options
author | shennetsind <ind@henn.et> | 2013-09-17 08:25:07 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-09-17 08:25:07 -0300 |
commit | 5ac2ced45782fc15a9da9c0e714d201acfa5d20c (patch) | |
tree | a1098fe3cb3eb74d24bb4bc77442c5af0b15d7f2 /src/map/npc.c | |
parent | 1ffca100f401142260a6cbeb5d9052170e401728 (diff) | |
download | hercules-5ac2ced45782fc15a9da9c0e714d201acfa5d20c.tar.gz hercules-5ac2ced45782fc15a9da9c0e714d201acfa5d20c.tar.bz2 hercules-5ac2ced45782fc15a9da9c0e714d201acfa5d20c.tar.xz hercules-5ac2ced45782fc15a9da9c0e714d201acfa5d20c.zip |
HPM: Itemdb.c Interface
Fully Integrated. Closes #110
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index bb3a4b38e..13a625f07 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1296,7 +1296,7 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns if( j == nd->u.shop.count || nd->u.shop.shop_item[j].value <= 0 ) return 5; - if( !itemdb_isstackable(nameid) && amount > 1 ) + if( !itemdb->isstackable(nameid) && amount > 1 ) { ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n", sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid); amount = item_list[i*2+0] = 1; @@ -1402,7 +1402,7 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po if( nd->u.shop.shop_item[i].value <= 0 ) return 5; - if(!itemdb_isstackable(nameid) && amount > 1) + if(!itemdb->isstackable(nameid) && amount > 1) { ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n", sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid); @@ -1495,7 +1495,7 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list) if( !itemdb->exists(nameid) ) return 3; // item no longer in itemdb - if( !itemdb_isstackable(nameid) && amount > 1 ) { + if( !itemdb->isstackable(nameid) && amount > 1 ) { //Exploit? You can't buy more than 1 of equipment types o.O ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of nonstackable item %d!\n", sd->status.name, sd->status.account_id, sd->status.char_id, amount, nameid); @@ -1605,7 +1605,7 @@ int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* item_li script->setarray_pc(sd, "@sold_nameid", i, (void*)(intptr_t)sd->status.inventory[idx].nameid, &key_nameid); script->setarray_pc(sd, "@sold_quantity", i, (void*)(intptr_t)item_list[i*2+1], &key_amount); - if( itemdb_isequip(sd->status.inventory[idx].nameid) ) + if( itemdb->isequip(sd->status.inventory[idx].nameid) ) {// process equipment based information into the arrays script->setarray_pc(sd, "@sold_refine", i, (void*)(intptr_t)sd->status.inventory[idx].refine, &key_refine); script->setarray_pc(sd, "@sold_attribute", i, (void*)(intptr_t)sd->status.inventory[idx].attribute, &key_attribute); |