Misc/Fixup

* fix Conditions derived from spell_area
 * Type Statistic should not be random searchable and excluded from "missing screenshots" UtilityPage
 * do not cut off querys in log
This commit is contained in:
Sarjuuk
2024-07-03 17:29:10 +02:00
parent d93b5df5bc
commit 05c036bd9f
4 changed files with 6 additions and 6 deletions

View File

@@ -95,7 +95,7 @@ class DB
public static function profiler($self, $query, $trace) public static function profiler($self, $query, $trace)
{ {
if ($trace) // actual query if ($trace) // actual query
self::$logs[] = [substr(str_replace("\n", ' ', $query), 0, 200)]; self::$logs[] = [str_replace("\n", ' ', $query)];
else // the statistics else // the statistics
{ {
end(self::$logs); end(self::$logs);

View File

@@ -1768,7 +1768,7 @@ abstract class Type
self::CHR_CLASS => ['CharClassList', 'class', 'g_classes', 0x1], self::CHR_CLASS => ['CharClassList', 'class', 'g_classes', 0x1],
self::CHR_RACE => ['CharRaceList', 'race', 'g_races', 0x1], self::CHR_RACE => ['CharRaceList', 'race', 'g_races', 0x1],
self::SKILL => ['SkillList', 'skill', 'g_skills', 0x1], self::SKILL => ['SkillList', 'skill', 'g_skills', 0x1],
self::STATISTIC => ['AchievementList', 'achievement', 'g_achievements', 0x1], // alias for achievements; exists only for Markup self::STATISTIC => ['AchievementList', 'achievement', 'g_achievements', 0x0], // alias for achievements; exists only for Markup
self::CURRENCY => ['CurrencyList', 'currency', 'g_gatheredcurrencies',0x1], self::CURRENCY => ['CurrencyList', 'currency', 'g_gatheredcurrencies',0x1],
self::SOUND => ['SoundList', 'sound', 'g_sounds', 0x1], self::SOUND => ['SoundList', 'sound', 'g_sounds', 0x1],
self::ICON => ['IconList', 'icon', 'g_icons', 0x1], self::ICON => ['IconList', 'icon', 'g_icons', 0x1],

View File

@@ -1005,13 +1005,13 @@ class SpellPage extends GenericPage
$cnd->addExternalCondition(Conditions::SRC_NONE, $lv['id'], [Conditions::QUESTSTATE, $questStart, $questStartState]); $cnd->addExternalCondition(Conditions::SRC_NONE, $lv['id'], [Conditions::QUESTSTATE, $questStart, $questStartState]);
if ($questEnd && $questEnd != $questStart) if ($questEnd && $questEnd != $questStart)
$cnd->addExternalCondition(Conditions::SRC_NONE, $lv['id'], [-Conditions::QUESTSTATE, $questEnd, $questEndState]); $cnd->addExternalCondition(Conditions::SRC_NONE, $lv['id'], [Conditions::QUESTSTATE, $questEnd, $questEndState]);
if ($raceMask) if ($raceMask)
$cnd->addExternalCondition(Conditions::SRC_NONE, $lv['id'], [-Conditions::CHR_RACE, $raceMask]); $cnd->addExternalCondition(Conditions::SRC_NONE, $lv['id'], [Conditions::CHR_RACE, $raceMask]);
if ($gender != 2) // 2: both if ($gender != 2) // 2: both
$cnd->addExternalCondition(Conditions::SRC_NONE, $lv['id'], [-Conditions::GENDER, $gender + 1]); $cnd->addExternalCondition(Conditions::SRC_NONE, $lv['id'], [Conditions::GENDER, $gender]);
// remove temp storage from result // remove temp storage from result
unset($resultLv[$idx]['__condition']); unset($resultLv[$idx]['__condition']);

View File

@@ -193,7 +193,7 @@ class UtilityPage extends GenericPage
$cnd[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0]; $cnd[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
foreach (Type::getClassesFor(Type::FLAG_NONE, 'contribute', CONTRIBUTE_SS) as $type => $classStr) foreach (Type::getClassesFor(Type::FLAG_RANDOM_SEARCHABLE, 'contribute', CONTRIBUTE_SS) as $type => $classStr)
{ {
$typeObj = new $classStr($cnd); $typeObj = new $classStr($cnd);
if (!$typeObj->error) if (!$typeObj->error)