[Doors] Fix door saving for versions (#4905)

* [Doors] Fix door saving for versions

- Door saving wasn't saving to the proper version on `#door save`

* Update doors.cpp

---------

Co-authored-by: Chris Miles <akkadius1@gmail.com>
This commit is contained in:
nytmyr 2025-06-09 12:47:56 -05:00 committed by GitHub
parent 4e28bcf85e
commit 3d70063a68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -852,11 +852,13 @@ void Doors::CreateDatabaseEntry()
const auto& l = DoorsRepository::GetWhere(
content_db,
fmt::format(
"zone = '{}' AND doorid = {}",
"zone = '{}' AND (version = {} OR version = -1) AND doorid = {}",
zone->GetShortName(),
zone->GetInstanceVersion(),
GetDoorID()
)
);
if (!l.empty()) {
auto e = l[0];