mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -300,6 +300,12 @@ class Profiler
|
||||
if (!$char)
|
||||
return false;
|
||||
|
||||
if (!$char['name'])
|
||||
{
|
||||
trigger_error('char #'.$charGuid.' on realm #'.$realmId.' has empty name. skipping...', E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
|
||||
// reminder: this query should not fail: a placeholder entry is created as soon as a char listview is created or profile detail page is called
|
||||
$profile = DB::Aowow()->selectRow('SELECT id, lastupdated FROM ?_profiler_profiles WHERE realm = ?d AND realmGUID = ?d', $realmId, $char['guid']);
|
||||
if (!$profile)
|
||||
@@ -431,7 +437,7 @@ class Profiler
|
||||
// char is flagged for rename
|
||||
if ($char['at_login'] & 0x1)
|
||||
{
|
||||
$ri = DB::Aowow()->selectCell('SELECT MAX(renameItr) FROM ?_profiler_profiles WHERE realm = ?d AND realmGUID = ?d AND name = ?', $realmId, $charGuid, $char['name']);
|
||||
$ri = DB::Aowow()->selectCell('SELECT MAX(renameItr) FROM ?_profiler_profiles WHERE realm = ?d AND realmGUID IS NOT NULL AND name = ?', $realmId, $char['name']);
|
||||
$data['renameItr'] = $ri ? ++$ri : 1;
|
||||
}
|
||||
|
||||
@@ -773,6 +779,12 @@ class Profiler
|
||||
if (!$guild)
|
||||
return false;
|
||||
|
||||
if (!$guild['name'])
|
||||
{
|
||||
trigger_error('guild #'.$guildGuid.' on realm #'.$realmId.' has empty name. skipping...', E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
|
||||
// reminder: this query should not fail: a placeholder entry is created as soon as a team listview is created or team detail page is called
|
||||
$guildId = DB::Aowow()->selectCell('SELECT id FROM ?_profiler_guild WHERE realm = ?d AND realmGUID = ?d', $realmId, $guild['guildId']);
|
||||
|
||||
@@ -834,6 +846,12 @@ class Profiler
|
||||
if (!$team)
|
||||
return false;
|
||||
|
||||
if (!$team['name'])
|
||||
{
|
||||
trigger_error('arena team #'.$teamGuid.' on realm #'.$realmId.' has empty name. skipping...', E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
|
||||
// reminder: this query should not fail: a placeholder entry is created as soon as a team listview is created or team detail page is called
|
||||
$teamId = DB::Aowow()->selectCell('SELECT id FROM ?_profiler_arena_team WHERE realm = ?d AND realmGUID = ?d', $realmId, $team['arenaTeamId']);
|
||||
|
||||
|
||||
@@ -167,7 +167,15 @@ class RemoteArenaTeamList extends ArenaTeamList
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error('arena team "'.$curTpl['name'].'" belongs to nonexistant realm #'.$r, E_USER_WARNING);
|
||||
trigger_error('arena team #'.$guid.' belongs to nonexistant realm #'.$r, E_USER_WARNING);
|
||||
unset($this->templates[$guid]);
|
||||
continue;
|
||||
}
|
||||
|
||||
// empty name
|
||||
if (!$curTpl['name'])
|
||||
{
|
||||
trigger_error('arena team #'.$guid.' on realm #'.$r.' has empty name.', E_USER_WARNING);
|
||||
unset($this->templates[$guid]);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -196,7 +196,15 @@ class RemoteGuildList extends GuildList
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error('character "'.$curTpl['name'].'" belongs to nonexistant realm #'.$r, E_USER_WARNING);
|
||||
trigger_error('guild #'.$guid.' belongs to nonexistant realm #'.$r, E_USER_WARNING);
|
||||
unset($this->templates[$guid]);
|
||||
continue;
|
||||
}
|
||||
|
||||
// empty name
|
||||
if (!$curTpl['name'])
|
||||
{
|
||||
trigger_error('guild #'.$guid.' on realm #'.$r.' has empty name.', E_USER_WARNING);
|
||||
unset($this->templates[$guid]);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -573,7 +573,15 @@ class RemoteProfileList extends ProfileList
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error('character "'.$curTpl['name'].'" belongs to nonexistant realm #'.$r, E_USER_WARNING);
|
||||
trigger_error('char #'.$guid.' belongs to nonexistant realm #'.$r, E_USER_WARNING);
|
||||
unset($this->templates[$guid]);
|
||||
continue;
|
||||
}
|
||||
|
||||
// empty name
|
||||
if (!$curTpl['name'])
|
||||
{
|
||||
trigger_error('char #'.$guid.' on realm #'.$r.' has empty name.', E_USER_WARNING);
|
||||
unset($this->templates[$guid]);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ class ZonePage extends GenericPage
|
||||
}
|
||||
|
||||
// Instances
|
||||
if ($_ = DB::Aowow()->selectCol('SELECT id FROM ?_zones WHERE parentAreaId = ?d AND (flags & ?d) = 0', $this->typeId, CUSTOM_EXCLUDE_FOR_LISTVIEW))
|
||||
if ($_ = DB::Aowow()->selectCol('SELECT `id` FROM ?_zones WHERE `parentAreaId` = ?d AND (`cuFlags` & ?d) = 0', $this->typeId, CUSTOM_EXCLUDE_FOR_LISTVIEW))
|
||||
{
|
||||
$this->extendGlobalIds(Type::ZONE, ...$_);
|
||||
$infobox[] = Lang::maps('Instances').Lang::main('colon')."\n[zone=".implode("], \n[zone=", $_).']';
|
||||
|
||||
9
prQueue
9
prQueue
@@ -33,11 +33,10 @@ $error = function ($type, $realmGUID, $realmId)
|
||||
if ($type == TYPE_GUILD)
|
||||
$what = 'guild';
|
||||
if ($type == TYPE_ARENA_TEAM)
|
||||
$what = 'arena team';
|
||||
$what = 'arena team';
|
||||
|
||||
DB::Aowow()->query('UPDATE ?_profiler_sync SET status = ?d, errorCode = ?d WHERE realm = ?d AND realmGUID = ?d AND type = ?d', PR_QUEUE_STATUS_ERROR, PR_QUEUE_ERROR_CHAR, $realmId, $realmGUID, $type);
|
||||
trigger_error('prQueue - unknown '.$what.' guid #'.$realmGUID.' on realm #'.$realmId.' to sync into profiler.', E_USER_WARNING);
|
||||
CLI::write('unknown '.$what.' guid #'.$realmGUID.' on realm #'.$realmId.' to sync into profiler.', CLI::LOG_WARN);
|
||||
trigger_error('prQueue - '.$what.' #'.$realmGUID.' on realm #'.$realmId.' not found. Truncating local placeholder.', E_USER_WARNING);
|
||||
};
|
||||
|
||||
|
||||
@@ -78,6 +77,7 @@ while (DB::Aowow()->selectCell('SELECT value FROM ?_config WHERE `key` = "profil
|
||||
if (!Profiler::getCharFromRealm($row['realm'], $row['realmGUID']))
|
||||
{
|
||||
$error(TYPE_PROFILE, $row['realmGUID'], $row['realm']);
|
||||
DB::Aowow()->query('DELETE FROM ?_profiler_profiles WHERE realm = ?d AND realmGUID = ?d', $row['realm'], $row['realmGUID']);
|
||||
continue 2;
|
||||
}
|
||||
|
||||
@@ -86,6 +86,7 @@ while (DB::Aowow()->selectCell('SELECT value FROM ?_config WHERE `key` = "profil
|
||||
if (!Profiler::getGuildFromRealm($row['realm'], $row['realmGUID']))
|
||||
{
|
||||
$error(TYPE_GUILD, $row['realmGUID'], $row['realm']);
|
||||
DB::Aowow()->query('DELETE FROM ?_profiler_guild WHERE realm = ?d AND realmGUID = ?d', $row['realm'], $row['realmGUID']);
|
||||
continue 2;
|
||||
}
|
||||
|
||||
@@ -94,6 +95,7 @@ while (DB::Aowow()->selectCell('SELECT value FROM ?_config WHERE `key` = "profil
|
||||
if (!Profiler::getArenaTeamFromRealm($row['realm'], $row['realmGUID']))
|
||||
{
|
||||
$error(TYPE_ARENA_TEAM, $row['realmGUID'], $row['realm']);
|
||||
DB::Aowow()->query('DELETE FROM ?_profiler_arena_team WHERE realm = ?d AND realmGUID = ?d', $row['realm'], $row['realmGUID']);
|
||||
continue 2;
|
||||
}
|
||||
|
||||
@@ -101,7 +103,6 @@ while (DB::Aowow()->selectCell('SELECT value FROM ?_config WHERE `key` = "profil
|
||||
default:
|
||||
DB::Aowow()->query('DELETE FROM ?_profiler_sync WHERE realm = ?d AND type = ?d AND typeId = ?d', $row['realm'], $row['type'], $row['typeId']);
|
||||
trigger_error('prQueue - unknown type #'.$row['type'].' to sync into profiler. Removing from queue...', E_USER_ERROR);
|
||||
CLI::write('unknown type #'.$row['type'].' to sync into profiler. Removing from queue...', CLI::LOG_ERROR);
|
||||
}
|
||||
|
||||
$tCycle = microtime(true);
|
||||
|
||||
@@ -115,7 +115,7 @@ SqlGen::register(new class extends SetupScript
|
||||
|
||||
foreach ($baseData as &$bd)
|
||||
{
|
||||
if (!in_array($bd['parentMapId'], [0, 1, 530, 571]))
|
||||
if (in_array($bd['mapBak'], [0, 1, 530, 571]))
|
||||
continue;
|
||||
|
||||
if ($gPos = Game::worldPosToZonePos($bd['parentMapId'], $bd['parentY'], $bd['parentX']))
|
||||
|
||||
Reference in New Issue
Block a user