Reviewed some settings again, fixing many glitches

This commit is contained in:
slawkens
2023-08-24 17:20:32 +02:00
parent 3ef53aff6c
commit 0746708743
56 changed files with 181 additions and 170 deletions

View File

@@ -43,7 +43,7 @@ if($email_new_time < 10) {
}
if(empty($errors)) {
$email_new_time = time() + $config['account_mail_change'] * 24 * 3600;
$email_new_time = time() + setting('account_mail_change') * 24 * 3600;
$account_logged->setCustomField("email_new", $email_new);
$account_logged->setCustomField("email_new_time", $email_new_time);
$twig->display('success.html.twig', array(

View File

@@ -20,7 +20,7 @@ if(!$logged) {
return;
}
if($config['account_country'])
if(setting('core.account_country'))
require SYSTEM . 'countries.conf.php';
$account = Account::find($account_logged->getId());
@@ -55,7 +55,7 @@ if(isset($_POST['changeinfosave']) && $_POST['changeinfosave'] == 1) {
if($show_form) {
$account_rlname = $account->rlname;
$account_location = $account->location;
if ($config['account_country']) {
if (setting('core.account_country')) {
$account_country = $account->country;
$countries = array();

View File

@@ -11,7 +11,7 @@
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Create Account';
if($config['account_country'])
if (setting('core.account_country'))
require SYSTEM . 'countries.conf.php';
if($logged)
@@ -20,7 +20,7 @@ if($logged)
return;
}
if(config('account_create_character_create')) {
if(setting('core.account_create_character_create')) {
require_once LIBS . 'CreateCharacter.php';
$createCharacter = new CreateCharacter();
}
@@ -68,7 +68,7 @@ if($save)
// country
$country = '';
if($config['account_country'])
if (setting('core.account_country'))
{
$country = $_POST['country'];
if(!isset($country))
@@ -93,7 +93,7 @@ if($save)
$errors['password'] = 'Password may not be the same as account name.';
}
if($config['account_mail_unique'])
if(setting('core.account_mail_unique'))
{
$test_email_account = new OTS_Account();
$test_email_account->findByEMail($email);
@@ -115,7 +115,7 @@ if($save)
}
if($account_db->isLoaded()) {
if (config('account_login_by_email') && !config('account_mail_unique')) {
if (config('account_login_by_email') && !setting('core.account_mail_unique')) {
$errors['account'] = 'Account with this email already exist.';
}
else if (!config('account_login_by_email')) {
@@ -150,7 +150,7 @@ if($save)
return;
}
if(config('account_create_character_create')) {
if(setting('core.account_create_character_create')) {
$character_name = isset($_POST['name']) ? stripslashes(ucwords(strtolower($_POST['name']))) : null;
$character_sex = isset($_POST['sex']) ? (int)$_POST['sex'] : null;
$character_vocation = isset($_POST['vocation']) ? (int)$_POST['vocation'] : null;
@@ -191,27 +191,28 @@ if($save)
$new_account->setCustomField('created', time());
$new_account->logAction('Account created.');
if($config['account_country']) {
if(setting('core.account_country')) {
$new_account->setCustomField('country', $country);
}
if($config['account_premium_days'] && $config['account_premium_days'] > 0) {
$settingAccountPremiumDays = setting('core.account_premium_days');
if($settingAccountPremiumDays && $settingAccountPremiumDays > 0) {
if($db->hasColumn('accounts', 'premend')) { // othire
$new_account->setCustomField('premend', time() + $config['account_premium_days'] * 86400);
$new_account->setCustomField('premend', time() + $settingAccountPremiumDays * 86400);
}
else { // rest
if ($db->hasColumn('accounts', 'premium_ends_at')) { // TFS 1.4+
$new_account->setCustomField('premium_ends_at', time() + $config['account_premium_days'] * (60 * 60 * 24));
$new_account->setCustomField('premium_ends_at', time() + $settingAccountPremiumDays * (60 * 60 * 24));
}
else {
$new_account->setCustomField('premdays', $config['account_premium_days']);
$new_account->setCustomField('premdays', $settingAccountPremiumDays);
$new_account->setCustomField('lastday', time());
}
}
}
if($config['account_premium_points']) {
$new_account->setCustomField('premium_points', $config['account_premium_points']);
if(setting('account_premium_points') && setting('account_premium_points') > 0) {
$new_account->setCustomField('premium_points', setting('account_premium_points'));
}
$tmp_account = $email;
@@ -219,7 +220,7 @@ if($save)
$tmp_account = (USE_ACCOUNT_NAME ? $account_name : $account_id);
}
if(setting('core.mail_enabled') && $config['account_mail_verify'])
if(setting('core.mail_enabled') && setting('core.account_mail_verify'))
{
$hash = md5(generateRandomString(16, true, true) . $email);
$new_account->setCustomField('email_hash', $hash);
@@ -238,7 +239,7 @@ if($save)
'description' => 'Your account ' . $account_type . ' is <b>' . $tmp_account . '</b><br/>You will need the account ' . $account_type . ' and your password to play on ' . configLua('serverName') . '.
Please keep your account ' . $account_type . ' and password in a safe place and
never give your account ' . $account_type . ' or password to anybody.',
'custom_buttons' => config('account_create_character_create') ? '' : null
'custom_buttons' => setting('core.account_create_character_create') ? '' : null
));
}
else
@@ -249,7 +250,7 @@ if($save)
}
else
{
if(config('account_create_character_create')) {
if(setting('core.account_create_character_create')) {
// character creation
$character_created = $createCharacter->doCreate($character_name, $character_sex, $character_vocation, $character_town, $new_account, $errors);
if (!$character_created) {
@@ -258,7 +259,7 @@ if($save)
}
}
if(config('account_create_auto_login')) {
if(setting('core.account_create_auto_login')) {
if ($hasBeenCreatedByEMail) {
$_POST['account_login'] = $email;
}
@@ -273,7 +274,7 @@ if($save)
}
echo 'Your account';
if(config('account_create_character_create')) {
if(setting('core.account_create_character_create')) {
echo ' and character have';
}
else {
@@ -281,7 +282,7 @@ if($save)
}
echo ' been created.';
if(!config('account_create_character_create')) {
if(!setting('core.account_create_character_create')) {
echo ' Now you can login and create your first character.';
}
@@ -291,10 +292,10 @@ if($save)
'description' => 'Your account ' . $account_type . ' is <b>' . $tmp_account . '</b><br/>You will need the account ' . $account_type . ' and your password to play on ' . configLua('serverName') . '.
Please keep your account ' . $account_type . ' and password in a safe place and
never give your account ' . $account_type . ' or password to anybody.',
'custom_buttons' => config('account_create_character_create') ? '' : null
'custom_buttons' => setting('core.account_create_character_create') ? '' : null
));
if(setting('core.mail_enabled') && $config['account_welcome_mail'])
if(setting('core.mail_enabled') && setting('account_welcome_mail'))
{
$mailBody = $twig->render('account.welcome_mail.html.twig', array(
'account' => $tmp_account
@@ -330,7 +331,7 @@ if(setting('core.account_country_recognize')) {
if(!empty($errors))
$twig->display('error_box.html.twig', array('errors' => $errors));
if($config['account_country']) {
if (setting('core.account_country')) {
$countries = array();
foreach (array('pl', 'se', 'br', 'us', 'gb') as $c)
$countries[$c] = $config['countries'][$c];
@@ -353,7 +354,7 @@ $params = array(
'save' => $save
);
if($save && config('account_create_character_create')) {
if($save && setting('core.account_create_character_create')) {
$params = array_merge($params, array(
'name' => $character_name,
'sex' => $character_sex,

View File

@@ -77,10 +77,10 @@ if($player->isLoaded() && !$player->isDeleted())
$rows = 0;
if($config['characters']['outfit'])
$outfit = $config['outfit_images_url'] . '?id=' . $player->getLookType() . ($db->hasColumn('players', 'lookaddons') ? '&addons=' . $player->getLookAddons() : '') . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet();
$outfit = setting('core.outfit_images_url') . '?id=' . $player->getLookType() . ($db->hasColumn('players', 'lookaddons') ? '&addons=' . $player->getLookAddons() : '') . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet();
$flag = '';
if($config['account_country']) {
if(setting('core.account_country')) {
$flag = getFlagImage($account->getCountry());
}
@@ -423,7 +423,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
if($db->hasColumn('players', 'deletion'))
$deleted = 'deletion';
$query = $db->query('SELECT `name`, `level`, `vocation`' . $promotion . ' FROM `players` WHERE `name` LIKE ' . $db->quote('%' . $name . '%') . ' AND ' . $deleted . ' != 1 LIMIT ' . (int)config('characters_search_limit') . ';');
$query = $db->query('SELECT `name`, `level`, `vocation`' . $promotion . ' FROM `players` WHERE `name` LIKE ' . $db->quote('%' . $name . '%') . ' AND ' . $deleted . ' != 1 LIMIT ' . (int)setting('core.characters_search_limit') . ';');
if($query->rowCount() > 0) {
echo 'Did you mean:<ul>';
foreach($query as $player) {

View File

@@ -17,7 +17,7 @@ $title = 'Creatures';
if (empty($_REQUEST['name'])) {
// display list of monsters
$preview = config('monsters_images_preview');
$preview = setting('core.monsters_images_preview');
$creatures = Monster::where('hidden', '!=', 1)->when(!empty($_REQUEST['boss']), function ($query) {
$query->where('rewardboss', 1);
})->get()->toArray();
@@ -65,7 +65,7 @@ if (isset($creature['name'])) {
$item['name'] = getItemNameById($item['id']);
$item['rarity_chance'] = round($item['chance'] / 1000, 2);
$item['rarity'] = getItemRarity($item['chance']);
$item['tooltip'] = ucfirst($item['name']) . '<br/>Chance: ' . $item['rarity'] . (config('monsters_loot_percentage') ? ' ('. $item['rarity_chance'] .'%)' : '') . '<br/>Max count: ' . $item['count'];
$item['tooltip'] = ucfirst($item['name']) . '<br/>Chance: ' . $item['rarity'] . (setting('core.monsters_loot_percentage') ? ' ('. $item['rarity_chance'] .'%)' : '') . '<br/>Max count: ' . $item['count'];
}
$creature['loot'] = isset($loot) ? $loot : null;

View File

@@ -57,7 +57,7 @@ foreach($posts as &$post) {
}
if($config['characters']['outfit']) {
$post['outfit'] = $config['outfit_images_url'] . '?id=' . $player->getLookType() . ($lookaddons ? '&addons=' . $player->getLookAddons() : '') . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet();
$post['outfit'] = setting('core.outfit_images_url') . '?id=' . $player->getLookType() . ($lookaddons ? '&addons=' . $player->getLookAddons() : '') . '&head=' . $player->getLookHead() . '&body=' . $player->getLookBody() . '&legs=' . $player->getLookLegs() . '&feet=' . $player->getLookFeet();
}
$groupName = '';

View File

@@ -43,7 +43,7 @@ if(empty($errors)) {
$saved = false;
if($guild_leader) {
if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') {
$description = htmlspecialchars(stripslashes(substr(trim($_REQUEST['description']),0,$config['guild_description_chars_limit'])));
$description = htmlspecialchars(stripslashes(substr(trim($_REQUEST['description']),0, setting('core.guild_description_chars_limit'))));
$guild->setCustomField('description', $description);
$saved = true;
}

View File

@@ -42,7 +42,7 @@ if(empty($errors)) {
if($guild_leader)
{
$max_image_size_b = $config['guild_image_size_kb'] * 1024;
$max_image_size_b = setting('core.guild_image_size_kb') * 1024;
$allowed_ext = array('image/gif', 'image/jpg', 'image/pjpeg', 'image/jpeg', 'image/bmp', 'image/png', 'image/x-png');
$ext_name = array('image/gif' => 'gif', 'image/jpg' => 'jpg', 'image/jpeg' => 'jpg', 'image/pjpeg' => 'jpg', 'image/bmp' => 'bmp', 'image/png' => 'png', 'image/x-png' => 'png');
$save_file_name = str_replace(' ', '_', strtolower($guild->getName()));
@@ -62,7 +62,7 @@ if(empty($errors)) {
}
}
else {
$upload_errors[] = 'You didn\'t send file or file is too big. Limit: <b>'.$config['guild_image_size_kb'].' KB</b>.';
$upload_errors[] = 'You didn\'t send file or file is too big. Limit: <b>'.setting('core.guild_image_size_kb').' KB</b>.';
}
if(empty($upload_errors)) {

View File

@@ -46,7 +46,7 @@ if(empty($errors)) {
$saved = false;
if($guild_leader) {
if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') {
$motd = htmlspecialchars(stripslashes(substr($_REQUEST['motd'],0, $config['guild_motd_chars_limit'])));
$motd = htmlspecialchars(stripslashes(substr($_REQUEST['motd'],0, setting('core.guild_motd_chars_limit'))));
$guild->setCustomField('motd', $motd);
$saved = true;
}

View File

@@ -28,8 +28,8 @@ if(empty($guild_errors))
$player_rank = $player->getRank();
if(!$player_rank->isLoaded())
{
if($player->getLevel() >= $config['guild_need_level']) {
if(!$config['guild_need_premium'] || $account_logged->isPremium()) {
if($player->getLevel() >= setting('core.guild_need_level')) {
if(!setting('core.guild_need_premium') || $account_logged->isPremium()) {
$array_of_player_nig[] = $player->getName();
}
}
@@ -39,7 +39,7 @@ if(empty($guild_errors))
if(empty($todo)) {
if(count($array_of_player_nig) == 0) {
$guild_errors[] = 'On your account all characters are in guilds, have too low level to create new guild' . ($config['guild_need_premium'] ? ' or you don\' have a premium account' : '') . '.';
$guild_errors[] = 'On your account all characters are in guilds, have too low level to create new guild' . (setting('core.guild_need_premium') ? ' or you don\' have a premium account' : '') . '.';
}
}
@@ -91,10 +91,10 @@ if($todo == 'save')
}
if(empty($guild_errors)) {
if($player->getLevel() < $config['guild_need_level']) {
$guild_errors[] = 'Character <b>'.$name.'</b> has too low level. To create guild you need character with level <b>'.$config['guild_need_level'].'</b>.';
if($player->getLevel() < setting('core.guild_need_level')) {
$guild_errors[] = 'Character <b>'.$name.'</b> has too low level. To create guild you need character with level <b>' . setting('core.guild_need_level') . '</b>.';
}
if($config['guild_need_premium'] && !$account_logged->isPremium()) {
if(setting('core.guild_need_premium') && !$account_logged->isPremium()) {
$guild_errors[] = 'Character <b>'.$name.'</b> is on FREE account. To create guild you need PREMIUM account.';
}
}
@@ -112,7 +112,7 @@ if(isset($todo) && $todo == 'save')
$new_guild->setName($guild_name);
$new_guild->setOwner($player);
$new_guild->save();
$new_guild->setCustomField('description', config('guild_description_default'));
$new_guild->setCustomField('description', setting('core.guild_description_default'));
//$new_guild->setCustomField('creationdata', time());
$ranks = $new_guild->getGuildRanksList();
$ranks->orderBy('level', POT::ORDER_DESC);

View File

@@ -26,7 +26,7 @@ if(count($guilds_list) > 0)
$description = $guild->getCustomField('description');
$description_with_lines = str_replace(array("\r\n", "\n", "\r"), '<br />', $description, $count);
if ($count < $config['guild_description_lines_limit'])
if ($count < setting('core.guild_description_lines_limit'))
$description = nl2br($description);
$guildName = $guild->getName();

View File

@@ -85,7 +85,7 @@ if(empty($guild_logo) || !file_exists(GUILD_IMAGES_DIR . $guild_logo))
$description = $guild->getCustomField('description');
$description_with_lines = str_replace(array("\r\n", "\n", "\r"), '<br />', $description, $count);
if($count < $config['guild_description_lines_limit'])
if($count < setting('core.guild_description_lines_limit'))
$description = nl2br($description);
//$description = $description_with_lines;

View File

@@ -239,7 +239,7 @@ foreach($highscores as $id => &$player)
$player['link'] = getPlayerLink($player['name'], false);
$player['flag'] = getFlagImage($player['country']);
if($settingHighscoresOutfit) {
$player['outfit'] = '<img style="position:absolute;margin-top:' . (in_array($player['looktype'], config('outfit_images_wrong_looktypes')) ? '-15px;margin-left:5px' : '-45px;margin-left:-25px') . ';" src="' . config('outfit_images_url') . '?id=' . $player['looktype'] . ($outfit_addons ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] . '" alt="" />';
$player['outfit'] = '<img style="position:absolute;margin-top:' . (in_array($player['looktype'], setting('core.outfit_images_wrong_looktypes')) ? '-15px;margin-left:5px' : '-45px;margin-left:-25px') . ';" src="' . setting('core.outfit_images_url') . '?id=' . $player['looktype'] . ($outfit_addons ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] . '" alt="" />';
}
$player['rank'] = $offset + $i;
}

View File

@@ -21,7 +21,7 @@ if($cache->enabled() && $cache->fetch('last_kills', $tmp)) {
else {
if($db->hasTable('player_killers')) // tfs 0.3
{
$players_deaths = $db->query('SELECT `player_deaths`.`id`, `player_deaths`.`date`, `player_deaths`.`level`, `players`.`name`' . ($db->hasColumn('players', 'world_id') ? ', `players`.`world_id`' : '') . ' FROM `player_deaths` LEFT JOIN `players` ON `player_deaths`.`player_id` = `players`.`id` ORDER BY `date` DESC LIMIT 0, ' . $config['last_kills_limit']);
$players_deaths = $db->query('SELECT `player_deaths`.`id`, `player_deaths`.`date`, `player_deaths`.`level`, `players`.`name`' . ($db->hasColumn('players', 'world_id') ? ', `players`.`world_id`' : '') . ' FROM `player_deaths` LEFT JOIN `players` ON `player_deaths`.`player_id` = `players`.`id` ORDER BY `date` DESC LIMIT 0, ' . setting('core.last_kills_limit'));
if(!empty($players_deaths)) {
foreach($players_deaths as $death) {
@@ -82,9 +82,9 @@ else {
}
}
} else {
//$players_deaths = $db->query("SELECT `p`.`name` AS `victim`, `player_deaths`.`killed_by` as `killed_by`, `player_deaths`.`time` as `time`, `player_deaths`.`is_player` as `is_player`, `player_deaths`.`level` as `level` FROM `player_deaths`, `players` as `d` INNER JOIN `players` as `p` ON player_deaths.player_id = p.id WHERE player_deaths.`is_player`='1' ORDER BY `time` DESC LIMIT " . $config['last_kills_limit'] . ";");
//$players_deaths = $db->query("SELECT `p`.`name` AS `victim`, `player_deaths`.`killed_by` as `killed_by`, `player_deaths`.`time` as `time`, `player_deaths`.`is_player` as `is_player`, `player_deaths`.`level` as `level` FROM `player_deaths`, `players` as `d` INNER JOIN `players` as `p` ON player_deaths.player_id = p.id WHERE player_deaths.`is_player`='1' ORDER BY `time` DESC LIMIT " . setting('core.last_kills_limit') . ";");
$players_deaths = $db->query("SELECT `p`.`name` AS `victim`, `d`.`killed_by` as `killed_by`, `d`.`time` as `time`, `d`.`level`, `d`.`is_player` FROM `player_deaths` as `d` INNER JOIN `players` as `p` ON d.player_id = p.id ORDER BY `time` DESC LIMIT " . $config['last_kills_limit'] . ";");
$players_deaths = $db->query("SELECT `p`.`name` AS `victim`, `d`.`killed_by` as `killed_by`, `d`.`time` as `time`, `d`.`level`, `d`.`is_player` FROM `player_deaths` as `d` INNER JOIN `players` as `p` ON d.player_id = p.id ORDER BY `time` DESC LIMIT " . setting('core.last_kills_limit') . ";");
if(!empty($players_deaths)) {
foreach($players_deaths as $death) {
$players_deaths_count++;
@@ -114,4 +114,4 @@ else {
$twig->display('lastkills.html.twig', array(
'lastkills' => $last_kills
));
));

View File

@@ -62,7 +62,7 @@ if(isset($_GET['archive']))
'content' => $content_,
'date' => $news['date'],
'icon' => $categories[$news['category']]['icon_id'],
'author' => $config['news_author'] ? $author : '',
'author' => setting('core.news_author') ? $author : '',
'comments' => $news['comments'] != 0 ? getForumThreadLink($news['comments']) : null,
));
}
@@ -116,7 +116,7 @@ if(!$news_cached)
);
}
$tickers_db = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'news` WHERE `type` = ' . TICKER .($canEdit ? '' : ' AND `hidden` != 1') .' ORDER BY `date` DESC LIMIT ' . $config['news_ticker_limit']);
$tickers_db = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'news` WHERE `type` = ' . TICKER .($canEdit ? '' : ' AND `hidden` != 1') .' ORDER BY `date` DESC LIMIT ' . setting('core.news_ticker_limit'));
$tickers_content = '';
if($tickers_db->rowCount() > 0)
{
@@ -167,7 +167,7 @@ else {
if(!$news_cached)
{
ob_start();
$newses = $db->query('SELECT * FROM ' . $db->tableName(TABLE_PREFIX . 'news') . ' WHERE type = ' . NEWS . ($canEdit ? '' : ' AND hidden != 1') . ' ORDER BY date' . ' DESC LIMIT ' . $config['news_limit']);
$newses = $db->query('SELECT * FROM ' . $db->tableName(TABLE_PREFIX . 'news') . ' WHERE type = ' . NEWS . ($canEdit ? '' : ' AND hidden != 1') . ' ORDER BY date' . ' DESC LIMIT ' . setting('core.news_limit'));
if($newses->rowCount() > 0)
{
foreach($newses as $news)
@@ -211,7 +211,7 @@ if(!$news_cached)
'content' => $content_ . $admin_options,
'date' => $news['date'],
'icon' => $categories[$news['category']]['icon_id'],
'author' => $config['news_author'] ? $author : '',
'author' => setting('core.news_author') ? $author : '',
'comments' => $news['comments'] != 0 ? getForumThreadLink($news['comments']) : null,
'hidden'=> $news['hidden']
));

View File

@@ -15,7 +15,7 @@ use MyAAC\Models\ServerRecord;
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Who is online?';
if($config['account_country'])
if (setting('core.account_country'))
require SYSTEM . 'countries.conf.php';
$promotion = '';
@@ -42,7 +42,7 @@ if($db->hasColumn('players', 'skull_time')) {
$outfit_addons = false;
$outfit = '';
if($config['online_outfit']) {
if (setting('core.online_outfit')) {
$outfit = ', lookbody, lookfeet, lookhead, looklegs, looktype';
if($db->hasColumn('players', 'lookaddons')) {
$outfit .= ', lookaddons';
@@ -50,7 +50,7 @@ if($config['online_outfit']) {
}
}
if($config['online_vocations']) {
if (setting('core.online_vocations')) {
$vocs = array();
foreach($config['vocations'] as $id => $name) {
$vocs[$id] = 0;
@@ -67,7 +67,7 @@ $players = 0;
$data = '';
foreach($playersOnline as $player) {
$skull = '';
if($config['online_skulls'])
if (setting('core.online_skulls'))
{
if($player['skulltime'] > 0)
{
@@ -90,18 +90,18 @@ foreach($playersOnline as $player) {
'player' => $player,
'level' => $player['level'],
'vocation' => $config['vocations'][$player['vocation']],
'country_image' => $config['account_country'] ? getFlagImage($player['country']) : null,
'outfit' => $config['online_outfit'] ? $config['outfit_images_url'] . '?id=' . $player['looktype'] . ($outfit_addons ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] : null
'country_image' => setting('core.account_country') ? getFlagImage($player['country']) : null,
'outfit' => setting('core.online_outfit') ? setting('core.outfit_images_url') . '?id=' . $player['looktype'] . ($outfit_addons ? '&addons=' . $player['lookaddons'] : '') . '&head=' . $player['lookhead'] . '&body=' . $player['lookbody'] . '&legs=' . $player['looklegs'] . '&feet=' . $player['lookfeet'] : null
);
if($config['online_vocations']) {
if (setting('core.online_vocations')) {
$vocs[($player['vocation'] > $config['vocations_amount'] ? $player['vocation'] - $config['vocations_amount'] : $player['vocation'])]++;
}
}
$record = '';
if($players > 0) {
if($config['online_record']) {
if( setting('core.online_record')) {
$result = null;
$timestamp = false;
if($db->hasTable('server_record')) {

View File

@@ -71,7 +71,7 @@ $twig->display('spells.html.twig', array(
'post_vocation_id' => $vocation_id,
'post_vocation' => $vocation,
'spells' => $spells,
'item_path' => $config['item_images_url'],
'item_path' => setting('core.item_images_url'),
));
?>

View File

@@ -11,7 +11,7 @@
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Support in game';
if($config['account_country'])
if(setting('core.account_country'))
require SYSTEM . 'countries.conf.php';
$groups = new OTS_Groups_List();