- #db\src\ProtoReader.cpp (same steps in ItemCSVReader.cpp)
- //Search:
- "ITEM_BELT",
- //Add after:
- "ITEM_GACHA"
- //Search: in array string* arSubType
- 0, //34
- //Add after:
- 0, //37
- //Search: in array int arNumberOfSubtype
- 0, //34
- //Add after:
- 0, //37
- #common\item_length.h
- //Search:
- ITEM_BELT,
- //Add after:
- ITEM_GACHA,
- #game\src\item_manager.cpp
- //Search:
- if (id == 0)
- //Add before: (be careful , before)
- if(item->GetType() == ITEM_GACHA)
- item->SetSocket(0, item->GetLimitValue(1));
- #game\src\char_item.cpp
- //Search: (CHARACTER::UseItemEx)
- case ITEM_EXTRACT:
- ...
- break;
- //Add after:
- case ITEM_GACHA:
- {
- DWORD dwBoxVnum = item->GetVnum();
- std::vector <DWORD> dwVnums;
- std::vector <DWORD> dwCounts;
- std::vector <LPITEM> item_gets(0);
- int count = 0;
- if (GiveItemFromSpecialItemGroup(dwBoxVnum, dwVnums, dwCounts, item_gets, count))
- {
- if(item->GetSocket(0) > 1)
- item->SetSocket(0, item->GetSocket(0) - 1);
- else
- ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (ITEM_GACHA)");
- }
- }
- break;