Misc/Fixup

* Conditions: loot rows initially have no 'id'
 * fixed building talent string for hunter pets (different talents can occupy the same row/col spot)
 * added keys loot cols on creature table
 * fixed trying to show itemset type for itemsets without type
 * fixed waypoint calculation when moving entity between floors
This commit is contained in:
Sarjuuk
2024-06-02 20:47:01 +02:00
parent efab0bad32
commit f861886fdf
6 changed files with 14 additions and 6 deletions

View File

@@ -423,8 +423,9 @@ class AjaxAdmin extends AjaxHandler
'areaId' => $point[0]['areaId'],
'floor' => $point[0]['floor']
);
DB::Aowow()->query('UPDATE ?_creature_waypoints SET ?a WHERE `creatureOrPath` = ?d AND `point` = ?d', $p, $w['entry'], $w['pointId']);
}
DB::Aowow()->query('UPDATE ?_creature_waypoints SET ?a WHERE `creatureOrPath` = ?d AND `point` = ?d', $p, $w['entry'], $w['pointId']);
}
}
}

View File

@@ -344,7 +344,7 @@ class Conditions
$success = false;
foreach ($lvRows as $key => &$row)
{
$key = $row['id'].':'.$srcEntry; // it's a listview row .. if it doesn't have a numeric id something truely fucked up happened. ... also its past 2a.m.
$key = ($row['id'] ?? $key).':'.$srcEntry; // loot rows don't have an 'id' while being generated, but they have a usable $key
while (substr_count($key, ':') < 3) // pad with missing srcEntry, SrcId, cndTarget to group key
$key .= ':0';

View File

@@ -560,7 +560,7 @@ class Profiler
$petData['entry']
);
$_ = 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 `id` ORDER BY `row`, `col` ASC', $petSpells ?: [0], 1 << $morePet['type']);
$_ = 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,
'owner' => $profileId,

View File

@@ -113,7 +113,7 @@ class ItemsetList extends BaseType
if ($_ = $this->getField('contentGroup'))
$x .= Lang::itemset('notes', $_).($this->getField('heroic') ? ' <i class="q2">('.Lang::item('heroic').')</i>' : '').'<br />';
if (!$nCl || !$this->getField('contentGroup'))
if (!$nCl || !$this->getField('type'))
$x.= Lang::itemset('types', $this->getField('type')).'<br />';
if ($bonuses = $this->getBonuses())