"Boosts and potions!"

Fixed crate opening such that the item has an iOpt of 1.
This commit is contained in:
Gent
2020-09-14 10:27:52 -04:00
committed by dongresource
parent a976fef2b4
commit 148d90f4f1
6 changed files with 70 additions and 34 deletions

View File

@@ -721,6 +721,7 @@ void ItemManager::chestOpenHandler(CNSocket *sock, CNPacketData *data) {
// item reward
item->sItem.iType = 0;
item->sItem.iID = 96;
item->sItem.iOpt = 1;
item->iSlotNum = pkt->iSlotNum;
item->eIL = pkt->eIL;
@@ -751,10 +752,8 @@ int ItemManager::findFreeSlot(Player *plr) {
return -1;
}
bool ItemManager::isItemRegistered(int32_t id, int32_t type) {
return ItemData.find(std::pair<int32_t, int32_t>(id, type)) != ItemData.end();
}
Item ItemManager::getItemData(int32_t id, int32_t type) {
return ItemData[std::pair<int32_t, int32_t>(id, type)];
Item* ItemManager::getItemData(int32_t id, int32_t type) {
if(ItemData.find(std::pair<int32_t, int32_t>(id, type)) != ItemData.end())
return &ItemData[std::pair<int32_t, int32_t>(id, type)];
return nullptr;
}