Misc/Fixup

* Profiler: handle items with invalid enchantments
 * Profiler: convert (last?) forgotten INSERT IGNORE to ON DUPLICATE KEY UPDATE id=id
 * Areatrigger: fix null related tabs
 * LatestComments: fix lv template for replies
 * Conditions: fixed tab names for locale DE
This commit is contained in:
Sarjuuk
2024-07-08 16:13:51 +02:00
parent 828fa40d4b
commit 92a6e0122f
5 changed files with 12 additions and 6 deletions

View File

@@ -533,8 +533,14 @@ class Profiler
// cant reasonably get to the castItem from enchantId and slot
$profSpec = DB::Aowow()->selectCol('SELECT id AS ARRAY_KEY, skillLevel AS "1", skillLine AS "0" FROM ?_itemenchantment WHERE id IN (?a)', $permEnch);
foreach ($permEnch as $eId)
foreach ($permEnch as $slot => $eId)
{
if (!isset($profSpec[$eId]))
{
trigger_error('char #'.$charGuid.' on realm #'.$realmId.' has item in slot #'.$slot.' with invalid perm enchantment #'.CLI::bold($eId), E_USER_WARNING);
continue;
}
if ($x = Util::getEnchantmentScore(0, 0, !!$profSpec[$eId][1], $eId))
$data['gearscore'] += $x;
else if ($profSpec[$eId][0] != 776) // not runeforging

View File

@@ -314,7 +314,7 @@ class RemoteArenaTeamList extends ArenaTeamList
}
foreach (Util::createSqlBatchInsert($memberData) as $ins)
DB::Aowow()->query('INSERT IGNORE INTO ?_profiler_arena_team_member (?#) VALUES '.$ins, array_keys(reset($memberData)));
DB::Aowow()->query('INSERT INTO ?_profiler_arena_team_member (?#) VALUES '.$ins.' ON DUPLICATE KEY UPDATE `id` = `id`', array_keys(reset($memberData)));
}
}
}

View File

@@ -87,7 +87,7 @@ class AreaTriggerPage extends GenericPage
// tab: conditions
$cnd = new Conditions();
$cnd->getBySourceEntry($this->typeId, Conditions::SRC_AREATRIGGER_CLIENT)->prepare();
if ($tab = $cnd->toListviewTab());
if ($tab = $cnd->toListviewTab())
{
$this->extendGlobalData($cnd->getJsGlobals());
$this->lvTabs[] = $tab;

View File

@@ -114,7 +114,7 @@ class UtilityPage extends GenericPage
$this->lvTabs[] = ['commentpreview', ['data' => $comments]];
array_walk($replies, fn(&$d) => $d['date'] = date(Util::$dateFormatInternal, $d['date']));
$this->lvTabs[] = ['commentpreview', ['data' => $replies]];
$this->lvTabs[] = ['replypreview', ['data' => $replies]];
}
break;

View File

@@ -4894,8 +4894,8 @@ var LANG = {
/* AoWoW: start custom */
tab_conditions: 'Bedingungen',
tab_condition_for: 'Bedingung for',
tab_conditions: 'Konditionen',
tab_condition_for: 'Kondition für',
cnd_either: 'Entweder',
cnd_or: 'Oder',