1. #db\src\ProtoReader.cpp (same steps in ItemCSVReader.cpp)
  2. //Search:
  3. "ITEM_BELT",
  4. //Add after:
  5. "ITEM_GACHA"
  6. //Search: in array string* arSubType
  7. 0, //34
  8. //Add after:
  9. 0, //37
  10. //Search: in array int arNumberOfSubtype
  11. 0, //34
  12. //Add after:
  13. 0, //37
  14. #common\item_length.h
  15. //Search:
  16. ITEM_BELT,
  17. //Add after:
  18. ITEM_GACHA,
  19. #game\src\item_manager.cpp
  20. //Search:
  21. if (id == 0)
  22. //Add before: (be careful , before)
  23. if(item->GetType() == ITEM_GACHA)
  24. item->SetSocket(0, item->GetLimitValue(1));
  25. #game\src\char_item.cpp
  26. //Search: (CHARACTER::UseItemEx)
  27. case ITEM_EXTRACT:
  28. ...
  29. break;
  30. //Add after:
  31. case ITEM_GACHA:
  32. {
  33. DWORD dwBoxVnum = item->GetVnum();
  34. std::vector <DWORD> dwVnums;
  35. std::vector <DWORD> dwCounts;
  36. std::vector <LPITEM> item_gets(0);
  37. int count = 0;
  38. if (GiveItemFromSpecialItemGroup(dwBoxVnum, dwVnums, dwCounts, item_gets, count))
  39. {
  40. if(item->GetSocket(0) > 1)
  41. item->SetSocket(0, item->GetSocket(0) - 1);
  42. else
  43. ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (ITEM_GACHA)");
  44. }
  45. }
  46. break;