diff --git a/system/clients.conf.php b/system/clients.conf.php
index 4daaec15..b3ec18d5 100644
--- a/system/clients.conf.php
+++ b/system/clients.conf.php
@@ -76,11 +76,13 @@ $config['clients'] = [
1096,
1097,
1098,
+
1100,
1102,
1140,
1150,
1180,
+
1200,
1202,
1215,
@@ -89,4 +91,12 @@ $config['clients'] = [
1240,
1251,
1260,
+ 1270,
+ 1280,
+ 1285,
+ 1286,
+ 1290,
+ 1291,
+
+ 1300,
];
diff --git a/system/functions.php b/system/functions.php
index e8dcc169..0811d054 100644
--- a/system/functions.php
+++ b/system/functions.php
@@ -1037,7 +1037,7 @@ function getTopPlayers($limit = 5) {
$deleted = 'deletion';
$is_tfs10 = $db->hasTable('players_online');
- $players = $db->query('SELECT `id`, `name`, `level`, `experience`, `looktype`' . ($db->hasColumn('players', 'lookaddons') ? ', `lookaddons`' : '') . ', `lookhead`, `lookbody`, `looklegs`, `lookfeet`' . ($is_tfs10 ? '' : ', `online`') . ' FROM `players` WHERE `group_id` < ' . config('highscores_groups_hidden') . ' AND `id` NOT IN (' . implode(', ', config('highscores_ids_hidden')) . ') AND `' . $deleted . '` = 0 AND `account_id` != 1 ORDER BY `experience` DESC LIMIT ' . (int)$limit)->fetchAll();
+ $players = $db->query('SELECT `id`, `name`, `level`, `vocation`, `experience`, `looktype`' . ($db->hasColumn('players', 'lookaddons') ? ', `lookaddons`' : '') . ', `lookhead`, `lookbody`, `looklegs`, `lookfeet`' . ($is_tfs10 ? '' : ', `online`') . ' FROM `players` WHERE `group_id` < ' . config('highscores_groups_hidden') . ' AND `id` NOT IN (' . implode(', ', config('highscores_ids_hidden')) . ') AND `' . $deleted . '` = 0 AND `account_id` != 1 ORDER BY `experience` DESC LIMIT ' . (int)$limit)->fetchAll();
if($is_tfs10) {
foreach($players as &$player) {
diff --git a/system/locale/pt_br/install.php b/system/locale/pt_br/install.php
index 029fd322..e47faede 100644
--- a/system/locale/pt_br/install.php
+++ b/system/locale/pt_br/install.php
@@ -19,7 +19,7 @@ $locale['not_loaded'] = 'Não carregado';
$locale['loading_spinner'] = 'Por favor aguarde, instalando...';
$locale['importing_spinner'] = 'Por favor, aguarde, importando dados...';
-$locale['please_fill_all'] = 'or favor, preencha todas as entradas!';
+$locale['please_fill_all'] = 'Por favor, preencha todas as entradas!';
$locale['already_installed'] = 'MyAAC já foi instalado. Por favor, apague o diretório install/ . Se você quiser reinstalar o MyAAC - exclua o arquivo config.local.php do diretório principal e atualize a página.';
// welcome
diff --git a/system/pages/account/create.php b/system/pages/account/create.php
index 6a7a218d..20cd0170 100644
--- a/system/pages/account/create.php
+++ b/system/pages/account/create.php
@@ -244,6 +244,14 @@ if($save)
}
else
{
+ if(config('account_create_character_create')) {
+ // character creation
+ $character_created = $createCharacter->doCreate($character_name, $character_sex, $character_vocation, $character_town, $new_account, $errors);
+ if (!$character_created) {
+ error('There was an error creating your character. Please create your character later in account management page.');
+ }
+ }
+
if($config['account_create_auto_login']) {
$_POST['account_login'] = USE_ACCOUNT_NAME ? $account_name : $account_id;
$_POST['password_login'] = $password2;
@@ -286,14 +294,6 @@ if($save)
error('An error occurred while sending email. For Admin: More info can be found in system/logs/mailer-error.log');
}
}
-
- if(config('account_create_character_create')) {
- // character creation
- $character_created = $createCharacter->doCreate($character_name, $character_sex, $character_vocation, $character_town, $new_account, $errors);
- if (!$character_created) {
- error('There was an error creating your character. Please create your character later in account management page.');
- }
- }
}
return;
diff --git a/system/pages/account/lost.php b/system/pages/account/lost.php
index 57d2355b..e27b7b5d 100644
--- a/system/pages/account/lost.php
+++ b/system/pages/account/lost.php
@@ -111,7 +111,7 @@ elseif($action == 'sendcode')
else
{
$account->setCustomField('email_next', (time() + 60));
- echo '
An error occorred while sending email! Try again later or contact with admin. For Admin: More info can be found in system/logs/mailer-error.log
';
+ echo '
An error occurred while sending email! Try again later or contact with admin. For Admin: More info can be found in system/logs/mailer-error.log
';
}
}
else
@@ -330,7 +330,7 @@ elseif($action == 'step3')
}
else
{
- echo '
An error occorred while sending email! You will not receive e-mail with this informations. For Admin: More info can be found in system/logs/mailer-error.log
';
+ echo '
An error occurred while sending email! You will not receive e-mail with this informations. For Admin: More info can be found in system/logs/mailer-error.log
';
}
}
else
@@ -513,7 +513,7 @@ elseif($action == 'setnewpassword')
}
else
{
- echo '
New password work! An error occorred while sending email! You will not receive e-mail with new password. For Admin: More info can be found in system/logs/mailer-error.log';
+ echo '
New password work! An error occurred while sending email! You will not receive e-mail with new password. For Admin: More info can be found in system/logs/mailer-error.log';
}
echo '
diff --git a/system/pages/account/register.php b/system/pages/account/register.php
index feb808a4..fc0c7ff9 100644
--- a/system/pages/account/register.php
+++ b/system/pages/account/register.php
@@ -29,6 +29,7 @@ if(isset($_POST['registeraccountsave']) && $_POST['registeraccountsave'] == "1")
$account_logged->setCustomField("key", $new_rec_key);
$account_logged->logAction('Generated recovery key.');
+ $message = '';
if($config['mail_enabled'] && $config['send_mail_when_generate_reckey'])
{
@@ -61,5 +62,3 @@ if($show_form) {
//show form
$twig->display('account.generate_recovery_key.html.twig');
}
-
-?>
diff --git a/system/pages/account/register_new.php b/system/pages/account/register_new.php
index f647ffbf..4bda4c15 100644
--- a/system/pages/account/register_new.php
+++ b/system/pages/account/register_new.php
@@ -47,7 +47,7 @@ else
$message = '
Your recovery key were send on email address '.$account_logged->getEMail().' for '.$config['generate_new_reckey_price'].' premium points.';
}
else
- $message = '
An error occorred while sending email ( '.$account_logged->getEMail().' ) with recovery key! Recovery key not changed. Try again later. For Admin: More info can be found in system/logs/mailer-error.log
';
+ $message = '
An error occurred while sending email ( '.$account_logged->getEMail().' ) with recovery key! Recovery key not changed. Try again later. For Admin: More info can be found in system/logs/mailer-error.log
';
$twig->display('success.html.twig', array(
'title' => 'Account Registered',
diff --git a/system/pages/accountmanagement.php b/system/pages/accountmanagement.php
new file mode 100644
index 00000000..e69de29b
diff --git a/system/pages/characters.php b/system/pages/characters.php
index 5fa44c7f..84c5fd63 100644
--- a/system/pages/characters.php
+++ b/system/pages/characters.php
@@ -47,7 +47,7 @@ if(isset($_REQUEST['name']))
if(empty($name))
{
$tmp_link = getPlayerLink($name);
- echo 'Here you can get detailed information about a certain player on ' . $config['lua']['serverName'] . '.
';
+ echo 'Here you can get detailed information about a certain player on ' . $config['lua']['serverName'] . '.
';
echo generate_search_form(true);
return;
}
@@ -82,8 +82,9 @@ if($player->isLoaded() && !$player->isDeleted())
$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();
$flag = '';
- if($config['account_country'])
+ if($config['account_country']) {
$flag = getFlagImage($account->getCountry());
+ }
$player_sex = 'Unknown';
if(isset($config['genders'][$player->getSex()]))
@@ -147,9 +148,10 @@ if($player->isLoaded() && !$player->isDeleted())
if($config['characters']['skills'])
{
if($db->hasColumn('players', 'skill_fist')) {// tfs 1.0+
- $skills_db = $db->query('SELECT `skill_fist`, `skill_club`, `skill_sword`, `skill_axe`, `skill_dist`, `skill_shielding`, `skill_fishing` FROM `players` WHERE `id` = ' . $player->getId())->fetch();
+ $skills_db = $db->query('SELECT `maglevel`, `skill_fist`, `skill_club`, `skill_sword`, `skill_axe`, `skill_dist`, `skill_shielding`, `skill_fishing` FROM `players` WHERE `id` = ' . $player->getId())->fetch();
$skill_ids = array(
+ POT::SKILL_MAGIC => 'maglevel',
POT::SKILL_FIST => 'skill_fist',
POT::SKILL_CLUB => 'skill_club',
POT::SKILL_SWORD => 'skill_sword',
@@ -175,8 +177,7 @@ if($player->isLoaded() && !$player->isDeleted())
}
$quests_enabled = $config['characters']['quests'] && !empty($config['quests']);
- if($quests_enabled)
- {
+ if($quests_enabled) {
$quests = $config['quests'];
$sql_query_in = '';
$i = 0;
@@ -197,10 +198,10 @@ if($player->isLoaded() && !$player->isDeleted())
foreach($quests as &$storage) {
$storage = isset($player_storage[$storage]) && $player_storage[$storage] > 0;
}
+ unset($storage);
}
- if($config['characters']['equipment'])
- {
+ if($config['characters']['equipment']) {
global $db;
$eq_sql = $db->query('SELECT `pid`, `itemtype` FROM player_items WHERE player_id = '.$player->getId().' AND (`pid` >= 1 and `pid` <= 10)');
$equipment = array();
@@ -284,8 +285,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
$deaths[] = array('time' => $death['date'], 'description' => $description . '.');
}
}
- }
- else {
+ } else {
$mostdamage = '';
if($db->hasColumn('player_deaths', 'mostdamage_by'))
$mostdamage = ', `mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`';
@@ -294,8 +294,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
FROM `player_deaths`
WHERE `player_id` = ' . $player->getId() . ' ORDER BY `time` DESC LIMIT 10;')->fetchAll();
- if(count($deaths_db))
- {
+ if(count($deaths_db)) {
$number_of_rows = 0;
foreach($deaths_db as $death)
{
@@ -326,14 +325,12 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
$frags = array();
$frag_add_content = '';
- if($config['characters']['frags'] && $db->hasTable('killers'))
- {
+ if($config['characters']['frags'] && $db->hasTable('killers')) {
//frags list by Xampy
$i = 0;
$frags_limit = 10; // frags limit to show? // default: 10
$player_frags = $db->query('SELECT `player_deaths`.*, `players`.`name`, `killers`.`unjustified` FROM `player_deaths` LEFT JOIN `killers` ON `killers`.`death_id` = `player_deaths`.`id` LEFT JOIN `player_killers` ON `player_killers`.`kill_id` = `killers`.`id` LEFT JOIN `players` ON `players`.`id` = `player_deaths`.`player_id` WHERE `player_killers`.`player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,'.$frags_limit.';')->fetchAll();
- if(count($player_frags))
- {
+ if(count($player_frags)) {
$row_count = 0;
foreach($player_frags as $frag)
{
@@ -416,9 +413,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
'search_form' => generate_search_form(),
'canEdit' => hasFlag(FLAG_CONTENT_PLAYERS) || superAdmin()
));
-}
-else
-{
+} else {
$search_errors[] = 'Character ' . $name . ' does not exist or has been deleted.';
$twig->display('error_box.html.twig', array('errors' => $search_errors));
$search_errors = array();
@@ -432,8 +427,7 @@ else
$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') . ';');
- if($query->rowCount() > 0)
- {
+ if($query->rowCount() > 0) {
echo 'Did you mean:';
foreach($query as $player) {
if(isset($player['promotion'])) {
diff --git a/system/pages/forum/show_board.php b/system/pages/forum/show_board.php
index bf55ce52..36251d8e 100644
--- a/system/pages/forum/show_board.php
+++ b/system/pages/forum/show_board.php
@@ -59,8 +59,7 @@ if(isset($last_threads[0]))
foreach($last_threads as $thread)
{
echo '';
- if(Forum::isModerator())
- {
+ if(Forum::isModerator()) {
echo '[MOVE]';
echo '[REMOVE] ';
}
diff --git a/system/pages/guilds/accept_invite.php b/system/pages/guilds/accept_invite.php
index 576091d8..7b013a2c 100644
--- a/system/pages/guilds/accept_invite.php
+++ b/system/pages/guilds/accept_invite.php
@@ -62,6 +62,7 @@ if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') {
}
}
}
+
if(!$is_invited) {
$errors[] = 'Character '.$player->getName() .' isn\'t invited to guild '.$guild->getName().'.';
}
@@ -121,5 +122,3 @@ else {
));
}
}
-
-?>
diff --git a/system/pages/online.php b/system/pages/online.php
index a7d505f5..02863858 100644
--- a/system/pages/online.php
+++ b/system/pages/online.php
@@ -47,8 +47,9 @@ if($config['online_outfit']) {
if($config['online_vocations']) {
$vocs = array();
- foreach($config['vocations'] as $id => $name)
+ foreach($config['vocations'] as $id => $name) {
$vocs[$id] = 0;
+ }
}
if($db->hasTable('players_online')) // tfs 1.0
@@ -59,8 +60,7 @@ else
$players_data = array();
$players = 0;
$data = '';
-foreach($playersOnline as $player)
-{
+foreach($playersOnline as $player) {
$skull = '';
if($config['online_skulls'])
{
@@ -89,15 +89,14 @@ foreach($playersOnline as $player)
'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
);
- if($config['online_vocations'])
+ if($config['online_vocations']) {
$vocs[($player['vocation'] > $config['vocations_amount'] ? $player['vocation'] - $config['vocations_amount'] : $player['vocation'])]++;
+ }
}
$record = '';
-if($players > 0)
-{
- if($config['online_record'])
- {
+if($players > 0) {
+ if($config['online_record']) {
$timestamp = false;
if($db->hasTable('server_record')) {
$query =
@@ -105,15 +104,13 @@ if($players > 0)
'SELECT `record`, `timestamp` FROM `server_record` WHERE `world_id` = ' . (int)$config['lua']['worldId'] .
' ORDER BY `record` DESC LIMIT 1');
$timestamp = true;
- }
- else if($db->hasTable('server_config')) { // tfs 1.0
+ } else if($db->hasTable('server_config')) { // tfs 1.0
$query = $db->query('SELECT `value` as `record` FROM `server_config` WHERE `config` = ' . $db->quote('players_record'));
- }
- else
+ } else {
$query = NULL;
+ }
- if(isset($query) && $query->rowCount() > 0)
- {
+ if(isset($query) && $query->rowCount() > 0) {
$result = $query->fetch();
$record = 'The maximum on this game world was ' . $result['record'] . ' players' . ($timestamp ? ' on ' . date("M d Y, H:i:s", $result['timestamp']) . '.' : '.');
}
diff --git a/system/templates/account.change_mail.html.twig b/system/templates/account.change_mail.html.twig
index 1965f7a0..1c0d1c12 100644
--- a/system/templates/account.change_mail.html.twig
+++ b/system/templates/account.change_mail.html.twig
@@ -1,4 +1,4 @@
-Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. For security reasons, the actual change will be finalised after a waiting period of {{ config.account_mail_change }} days.
+Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. For security reasons, the actual change will be finalised after a waiting period of {{ config.account_mail_change }} days.
|