mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 01:38:20 +00:00
Resolve incorrectly marked consumables being unusable (#770)
A change was made in the mounts pull request that broke consumables without correctly marked types such as the picnic basket
This commit is contained in:
parent
c552f46780
commit
ce2e6f595b
@ -272,9 +272,12 @@ void Item::UseNonEquip() {
|
||||
if (databasePet.lot != LOT_NULL) {
|
||||
GetInventory()->GetComponent()->SpawnPet(this);
|
||||
}
|
||||
} else if (type == eItemType::ITEM_TYPE_PACKAGE) {
|
||||
} else {
|
||||
auto* compRegistryTable = CDClientManager::Instance()->GetTable<CDComponentsRegistryTable>("ComponentsRegistry");
|
||||
const auto packageComponentId = compRegistryTable->GetByIDAndType(lot, COMPONENT_TYPE_PACKAGE);
|
||||
|
||||
if (packageComponentId == 0) return;
|
||||
|
||||
auto* packCompTable = CDClientManager::Instance()->GetTable<CDPackageComponentTable>("PackageComponent");
|
||||
auto packages = packCompTable->Query([=](const CDPackageComponent entry) {return entry.id == static_cast<uint32_t>(packageComponentId); });
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user