mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Util/Realms
* check for accessibility * use for achievements/realm firsts
This commit is contained in:
@@ -103,14 +103,9 @@ class AchievementPage extends GenericPage
|
||||
if ($this->subject->getField('flags') & 0x100 && DB::isConnectable(DB_AUTH))
|
||||
{
|
||||
$avlb = [];
|
||||
foreach (DB::Auth()->selectCol('SELECT id AS ARRAY_KEY, name FROM realmlist WHERE allowedSecurityLevel = 0 AND gamebuild = ?d', WOW_BUILD) AS $rId => $name)
|
||||
{
|
||||
if (!DB::isConnectable(DB_CHARACTERS . $rId))
|
||||
continue;
|
||||
|
||||
foreach (Util::getRealms() AS $rId => $rData)
|
||||
if (!DB::Characters($rId)->selectCell('SELECT 1 FROM character_achievement WHERE achievement = ?d LIMIT 1', $this->typeId))
|
||||
$avlb[] = Util::ucWords($name);
|
||||
}
|
||||
$avlb[] = Util::ucWords($rData['name']);
|
||||
|
||||
if ($avlb)
|
||||
$infobox[] = Lang::achievement('rfAvailable').implode(', ', $avlb);
|
||||
|
||||
Reference in New Issue
Block a user