[Database] Move pets query to content database (#4296)

This commit is contained in:
JJ 2024-05-04 17:59:57 -04:00 committed by GitHub
parent dfd1bfbd49
commit f77eec83e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -383,7 +383,7 @@ bool ZoneDatabase::GetPetEntry(const std::string& pet_type, PetRecord *p)
bool ZoneDatabase::GetPoweredPetEntry(const std::string& pet_type, int16 pet_power, PetRecord* r)
{
const auto& l = PetsRepository::GetWhere(
*this,
content_db,
fmt::format(
"`type` = '{}' AND `petpower` <= {} ORDER BY `petpower` DESC LIMIT 1",
pet_type,
@ -395,7 +395,7 @@ bool ZoneDatabase::GetPoweredPetEntry(const std::string& pet_type, int16 pet_pow
return false;
}
auto e = l.front();
auto &e = l.front();
r->npc_type = e.npcID;
r->temporary = e.temp;