Advertisement
Guest User

Untitled

a guest
Jun 18th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. Go to file shop.cpp
  2.  
  3. Look for:
  4.  
  5. LPITEM item;
  6. if (m_pkPC) {
  7. item = r_item.pkItem;
  8. }
  9. else {
  10. item = ITEM_MANAGER::instance().CreateItem (r_item.vnum, r_item.count);
  11. }
  12. if (!item) {
  13. return SHOP_SUBHEADER_GC_SOLD_OUT;
  14. }
  15. Add below:
  16.  
  17. //block duplicate item purchase begin
  18. if (ch->CountSpecifyItem(item->GetVnum()) >= 1)
  19. {
  20. ch->ChatPacket(CHAT_TYPE_INFO, "You can only buy one item of each type.");
  21. return SHOP_SUBHEADER_GC_END;
  22. }
  23. //block duplicate item purchase end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement