[Character] Convert NoRentExpired to Repositories (#3860)

* [Character] Convert NoRentExpired to Repositories

- Create a custom `GetSecondsSinceLastLogin` repository method to use in `NoRentExpired`.

* Update character_data_repository.h
This commit is contained in:
Alex King
2024-01-07 01:25:58 -05:00
committed by GitHub
parent 44d63c47d9
commit 20778ad7d9
4 changed files with 29 additions and 16 deletions
+5 -3
View File
@@ -763,10 +763,12 @@ void Client::BulkSendInventoryItems()
}
}
bool deletenorent = database.NoRentExpired(GetName());
if (deletenorent) { //client was offline for more than 30 minutes, delete no rent items
if (RuleB(Inventory, TransformSummonedBags))
const bool delete_no_rent = database.NoRentExpired(GetName());
if (delete_no_rent) { //client was offline for more than 30 minutes, delete no rent items
if (RuleB(Inventory, TransformSummonedBags)) {
DisenchantSummonedBags(false);
}
RemoveNoRent(false);
}