Loot/LinkedLoot

* rework npc <-> chest loot linking
 * difficulty is now directly stored
 * should fix multiple issues where loot tabs had wrong difficulty or null title
This commit is contained in:
Sarjuuk
2024-07-04 21:18:10 +02:00
parent 02e33b4038
commit 2e9b503c59
4 changed files with 241 additions and 21 deletions

View File

@@ -236,10 +236,10 @@ class ObjectPage extends GenericPage
if ($ll['encounterId'])
$relBoss = [$ll['npcId'], Lang::profiler('encounterNames', $ll['encounterId'])];
// difficulty dummy
else if ($c = DB::Aowow()->selectRow('SELECT id, name_loc0, name_loc2, name_loc3, name_loc6, name_loc8 FROM ?_creature WHERE difficultyEntry1 = ?d OR difficultyEntry2 = ?d OR difficultyEntry3 = ?d', abs($ll['npcId']), abs($ll['npcId']), abs($ll['npcId'])))
else if ($c = DB::Aowow()->selectRow('SELECT `id`, `name_loc0`, `name_loc2`, `name_loc3`, `name_loc6`, `name_loc8` FROM ?_creature WHERE `difficultyEntry1` = ?d OR `difficultyEntry2` = ?d OR `difficultyEntry3` = ?d', $ll['npcId'], $ll['npcId'], $ll['npcId']))
$relBoss = [$c['id'], Util::localizedString($c, 'name')];
// base creature
else if ($c = DB::Aowow()->selectRow('SELECT id, name_loc0, name_loc2, name_loc3, name_loc6, name_loc8 FROM ?_creature WHERE id = ?d', abs($ll['npcId'])))
else if ($c = DB::Aowow()->selectRow('SELECT `id`, `name_loc0`, `name_loc2`, `name_loc3`, `name_loc6`, `name_loc8` FROM ?_creature WHERE `id` = ?d', $ll['npcId']))
$relBoss = [$c['id'], Util::localizedString($c, 'name')];
}