Profiler/Pets

* catch error case where a player owns a pet that is no longer tameable/has no pet family
This commit is contained in:
Sarjuuk
2025-10-19 22:42:50 +02:00
parent 4d421d2bbb
commit 6a32c770cd

View File

@@ -619,6 +619,12 @@ class Profiler
$petData['entry']
);
if (!$morePet)
{
trigger_error('char #'.$charGuid.' on realm #'.$realmId.' owns pet #'.$petGuid.' (creature entry: #'.$petData['entry'].') without pet family. skipping...', E_USER_WARNING);
continue;
}
$_ = DB::Aowow()->selectCol('SELECT `spell` AS ARRAY_KEY, MAX(IF(`spell` IN (?a), `rank`, 0)) FROM ?_talents WHERE `class` = 0 AND `petTypeMask` = ?d GROUP BY `row`, `col` ORDER BY `row`, `col` ASC', $petSpells ?: [0], 1 << $morePet['type']);
$pet = array(
'id' => $petGuid,