mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 10:44:08 +00:00
Vault corrections
This commit is contained in:
@@ -2173,3 +2173,15 @@ void Entity::AddToGroup(const std::string& group) {
|
||||
m_Groups.push_back(group);
|
||||
}
|
||||
}
|
||||
|
||||
void Entity::RetroactiveVaultSize() {
|
||||
auto inventoryComponent = GetComponent<InventoryComponent>();
|
||||
if (!inventoryComponent) return;
|
||||
|
||||
auto itemsVault = inventoryComponent->GetInventory(eInventoryType::VAULT_ITEMS);
|
||||
auto modelVault = inventoryComponent->GetInventory(eInventoryType::VAULT_MODELS);
|
||||
|
||||
if (itemsVault->GetSize() == modelVault->GetSize()) return;
|
||||
|
||||
modelVault->SetSize(itemsVault->GetSize());
|
||||
}
|
||||
|
Reference in New Issue
Block a user