Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Go to file shop.cpp
- Look for:
- LPITEM item;
- if (m_pkPC) {
- item = r_item.pkItem;
- }
- else {
- item = ITEM_MANAGER::instance().CreateItem (r_item.vnum, r_item.count);
- }
- if (!item) {
- return SHOP_SUBHEADER_GC_SOLD_OUT;
- }
- Add below:
- //block duplicate item purchase begin
- if (ch->CountSpecifyItem(item->GetVnum()) >= 1)
- {
- ch->ChatPacket(CHAT_TYPE_INFO, "You can only buy one item of each type.");
- return SHOP_SUBHEADER_GC_END;
- }
- //block duplicate item purchase end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement