fix: lastUpdatedTime updating (#1784)

* Create new LastSave() Method for Database and renew LastUpdatedTime in Save()

* Attach UpdateLastSave() to sqlite and mysql

* Fix compilation issues

* Add updateTime functionality to UpdatePropertyDetails()
This commit is contained in:
ElectScholar
2025-05-03 20:19:31 -07:00
committed by GitHub
parent b31f9670d1
commit 4f97ecc073
8 changed files with 25 additions and 1 deletions

View File

@@ -165,7 +165,9 @@ void PropertyManagementComponent::UpdatePropertyDetails(std::string name, std::s
info.id = propertyId;
info.name = propertyName;
info.description = propertyDescription;
info.lastUpdatedTime = std::chrono::duration_cast<std::chrono::seconds>(std::chrono::system_clock::now().time_since_epoch()).count();
Database::Get()->UpdateLastSave(info);
Database::Get()->UpdatePropertyDetails(info);
OnQueryPropertyData(GetOwner(), UNASSIGNED_SYSTEM_ADDRESS);
@@ -688,6 +690,10 @@ void PropertyManagementComponent::Save() {
Database::Get()->RemoveModel(model.id);
}
IProperty::Info info;
info.id = propertyId;
info.lastUpdatedTime = std::chrono::duration_cast<std::chrono::seconds>(std::chrono::system_clock::now().time_since_epoch()).count();
Database::Get()->UpdateLastSave(info);
}
void PropertyManagementComponent::AddModel(LWOOBJID modelId, LWOOBJID spawnerId) {