mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 01:34:55 +02:00
* added faq management - add/edit/move/hide/delete from website
* moved install pages to twig * load monsters and spells on installation of the AAC
This commit is contained in:
@@ -13,8 +13,6 @@ $title = 'Plugin manager';
|
||||
|
||||
require(SYSTEM . 'hooks.php');
|
||||
|
||||
echo $twig->render('admin.plugins.form.html.twig');
|
||||
|
||||
function deleteDirectory($dir) {
|
||||
if(!file_exists($dir)) {
|
||||
return true;
|
||||
@@ -37,6 +35,8 @@ function deleteDirectory($dir) {
|
||||
return rmdir($dir);
|
||||
}
|
||||
|
||||
echo $twig->render('admin.plugins.form.html.twig');
|
||||
|
||||
if(isset($_REQUEST['uninstall'])){
|
||||
$uninstall = $_REQUEST['uninstall'];
|
||||
|
||||
@@ -112,13 +112,11 @@ else if(isset($_FILES["plugin"]["name"]))
|
||||
if($filetype == 'zip') // check if it is zipped/compressed file
|
||||
{
|
||||
$tmp_filename = pathinfo($filename, PATHINFO_FILENAME);
|
||||
$targetdir = BASE;
|
||||
$targetzip = BASE . 'plugins/' . $tmp_filename;
|
||||
$targetzip = BASE . 'plugins/' . $tmp_filename . '.zip';
|
||||
|
||||
if(move_uploaded_file($tmp_name, $targetzip)) { // move uploaded file
|
||||
$zip = new ZipArchive();
|
||||
$x = $zip->open($targetzip); // open the zip file to extract
|
||||
if ($x === true) {
|
||||
if ($zip->open($targetzip)) {
|
||||
for ($i = 0; $i < $zip->numFiles; $i++) {
|
||||
$tmp = $zip->getNameIndex($i);
|
||||
if(pathinfo($tmp, PATHINFO_DIRNAME) == 'plugins' && pathinfo($tmp, PATHINFO_EXTENSION) == 'json')
|
||||
@@ -128,7 +126,7 @@ else if(isset($_FILES["plugin"]["name"]))
|
||||
if(!isset($json_file)) {
|
||||
error('Cannot find plugin info .json file. Installation is discontinued.');
|
||||
}
|
||||
else if($zip->extractTo($targetdir)) { // place in the directory with same name
|
||||
else if($zip->extractTo(BASE)) { // place in the directory with same name
|
||||
$file_name = BASE . $json_file;
|
||||
if(!file_exists($file_name))
|
||||
warning("Cannot load " . $file_name . ". File doesn't exist.");
|
||||
@@ -224,36 +222,27 @@ else if(isset($_FILES["plugin"]["name"]))
|
||||
}
|
||||
|
||||
$plugins = array();
|
||||
$rows = array();
|
||||
|
||||
$path = PLUGINS;
|
||||
foreach(scandir($path) as $file)
|
||||
foreach(get_plugins() as $plugin)
|
||||
{
|
||||
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||
$file_name = pathinfo($file, PATHINFO_FILENAME);
|
||||
if($file == '.' || $file == '..' || $file == 'disabled' || $file == 'example.json' || is_dir($path . $file) || $file_ext != 'json')
|
||||
continue;
|
||||
|
||||
$file_info = str_replace('.json', '', $file_name);
|
||||
$string = file_get_contents(BASE . 'plugins/' . $file_info . '.json');
|
||||
$string = file_get_contents(BASE . 'plugins/' . $plugin . '.json');
|
||||
$plugin_info = json_decode($string, true);
|
||||
if($plugin_info == false) {
|
||||
warning('Cannot load plugin info ' . $file);
|
||||
warning('Cannot load plugin info ' . $plugin . '.json');
|
||||
}
|
||||
else {
|
||||
$rows[] = array(
|
||||
$plugins[] = array(
|
||||
'name' => $plugin_info['name'],
|
||||
'description' => $plugin_info['description'],
|
||||
'version' => $plugin_info['version'],
|
||||
'author' => $plugin_info['author'],
|
||||
'contact' => $plugin_info['contact'],
|
||||
'file' => $file_info,
|
||||
'file' => $plugin,
|
||||
'uninstall' => isset($plugin_info['uninstall'])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
echo $twig->render('admin.plugins.html.twig', array(
|
||||
'plugins' => $rows
|
||||
'plugins' => $plugins
|
||||
));
|
||||
?>
|
@@ -92,8 +92,7 @@ $last = $commands->rowCount();
|
||||
echo $twig->render('commands.html.twig', array(
|
||||
'commands' => $commands,
|
||||
'last' => $last,
|
||||
'canEdit' => $canEdit,
|
||||
'vdarkborder' => $config['vdarkborder']
|
||||
'canEdit' => $canEdit
|
||||
));
|
||||
|
||||
class Commands
|
||||
|
@@ -64,94 +64,8 @@ function printLoot($level, $itemid, $count, $chance)
|
||||
$canEdit = hasFlag(FLAG_CONTENT_MONSTERS) || admin();
|
||||
if(isset($_POST['reload_monsters']) && $canEdit)
|
||||
{
|
||||
try { $db->query("DELETE FROM myaac_monsters WHERE 1 = 1"); } catch(PDOException $error) {}
|
||||
echo '<h2>Reload monsters.</h2>';
|
||||
echo '<h2>All records deleted from table \'myaac_monsters\' in database.</h2>';
|
||||
$allmonsters = new OTS_MonstersList($config['data_path'].'monster/');
|
||||
//$names_added must be an array
|
||||
$names_added[] = '';
|
||||
//add monsters
|
||||
foreach($allmonsters as $lol) {
|
||||
$monster = $allmonsters->current();
|
||||
if(!$monster->loaded()) {
|
||||
warning('Error while adding monster: ' . $allmonsters->currentFile());
|
||||
continue;
|
||||
}
|
||||
//load monster mana needed to summon/convince
|
||||
$mana = $monster->getManaCost();
|
||||
//load monster experience
|
||||
$exp = $monster->getExperience();
|
||||
//load monster name
|
||||
$name = $monster->getName();
|
||||
//load monster health
|
||||
$health = $monster->getHealth();
|
||||
//load monster speed and calculate "speed level"
|
||||
$speed_ini = $monster->getSpeed();
|
||||
if($speed_ini <= 220) {
|
||||
$speed_lvl = 1;
|
||||
} else {
|
||||
$speed_lvl = ($speed_ini - 220) / 2;
|
||||
}
|
||||
//check "is monster use haste spell"
|
||||
$defenses = $monster->getDefenses();
|
||||
$use_haste = 0;
|
||||
foreach($defenses as $defense) {
|
||||
if($defense == 'speed') {
|
||||
$use_haste = 1;
|
||||
}
|
||||
}
|
||||
//load monster flags
|
||||
$flags = $monster->getFlags();
|
||||
//create string with immunities
|
||||
$immunities = $monster->getImmunities();
|
||||
$imu_nr = 0;
|
||||
$imu_count = count($immunities);
|
||||
$immunities_string = '';
|
||||
foreach($immunities as $immunitie) {
|
||||
$immunities_string .= $immunitie;
|
||||
$imu_nr++;
|
||||
if($imu_count != $imu_nr) {
|
||||
$immunities_string .= ", ";
|
||||
}
|
||||
}
|
||||
|
||||
//create string with voices
|
||||
$voices = $monster->getVoices();
|
||||
$voice_nr = 0;
|
||||
$voice_count = count($voices);
|
||||
$voices_string = '';
|
||||
foreach($voices as $voice) {
|
||||
$voices_string .= '"'.$voice.'"';
|
||||
$voice_nr++;
|
||||
if($voice_count != $voice_nr) {
|
||||
$voices_string .= ", ";
|
||||
}
|
||||
}
|
||||
//load race
|
||||
$race = $monster->getRace();
|
||||
//create monster gfx name
|
||||
//$gfx_name = str_replace(" ", "", trim(mb_strtolower($name))).".gif";
|
||||
$gfx_name = trim(mb_strtolower($name)).".gif";
|
||||
//don't add 2 monsters with same name, like Butterfly
|
||||
|
||||
if(!isset($flags['summonable']))
|
||||
$flags['summonable'] = '0';
|
||||
if(!isset($flags['convinceable']))
|
||||
$flags['convinceable'] = '0';
|
||||
|
||||
if(!in_array($name, $names_added)) {
|
||||
try {
|
||||
$db->query("INSERT INTO `myaac_monsters` (`hide_creature`, `name`, `mana`, `exp`, `health`, `speed_lvl`, `use_haste`, `voices`, `immunities`, `summonable`, `convinceable`, `race`, `gfx_name`, `file_path`) VALUES (0, " . $db->quote($name) . ", " . $db->quote(empty($mana) ? 0 : $mana) . ", " . $db->quote($exp) . ", " . $db->quote($health) . ", " . $db->quote($speed_lvl) . ", " . $db->quote($use_haste) . ", " . $db->quote($voices_string) . ", " . $db->quote($immunities_string) . ", " . $db->quote($flags['summonable'] > 0 ? 1 : 0) . ", " . $db->quote($flags['convinceable'] > 0 ? 1 : 0) . ", ".$db->quote($race).", ".$db->quote($gfx_name).", " . $db->quote($allmonsters->currentFile()) . ")");
|
||||
|
||||
success("Added: ".$name."<br/>");
|
||||
}
|
||||
catch(PDOException $error) {
|
||||
warning('Error while adding monster (' . $name . '): ' . $error->getMessage());
|
||||
}
|
||||
|
||||
$names_added[] = $name;
|
||||
}
|
||||
}
|
||||
require LIBS . 'creatures.php';
|
||||
Creatures::loadFromXML(true);
|
||||
}
|
||||
|
||||
if($canEdit)
|
||||
|
@@ -11,19 +11,179 @@
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
$title = 'Frequently Asked Questions';
|
||||
|
||||
$faqs = $db->query('SELECT ' . $db->fieldName('question') . ', ' . $db->fieldName('answer') .
|
||||
' FROM ' . $db->tableName(TABLE_PREFIX . 'faq') . ' ORDER BY ' . $db->fieldName('ordering'));
|
||||
$canEdit = hasFlag(FLAG_CONTENT_FAQ) || superAdmin();
|
||||
if($canEdit)
|
||||
{
|
||||
if(!empty($action))
|
||||
{
|
||||
if($action == 'delete' || $action == 'edit' || $action == 'hide' || $action == 'moveup' || $action == 'movedown')
|
||||
$id = $_REQUEST['id'];
|
||||
|
||||
if(isset($_REQUEST['question']))
|
||||
$question = $_REQUEST['question'];
|
||||
|
||||
if(isset($_REQUEST['answer']))
|
||||
$answer = stripslashes($_REQUEST['answer']);
|
||||
|
||||
$errors = array();
|
||||
|
||||
if($action == 'add') {
|
||||
if(FAQ::add($question, $answer, $errors))
|
||||
$question = $answer = '';
|
||||
}
|
||||
else if($action == 'delete') {
|
||||
FAQ::delete($id, $errors);
|
||||
}
|
||||
else if($action == 'edit')
|
||||
{
|
||||
if(isset($id) && !isset($question)) {
|
||||
$faq = FAQ::get($id);
|
||||
$question = $faq['question'];
|
||||
$answer = $faq['answer'];
|
||||
}
|
||||
else {
|
||||
FAQ::update($id, $question, $answer);
|
||||
$action = $question = $answer = '';
|
||||
}
|
||||
}
|
||||
else if($action == 'hide') {
|
||||
FAQ::toggleHidden($id, $errors);
|
||||
}
|
||||
else if($action == 'moveup') {
|
||||
FAQ::move($id, -1, $errors);
|
||||
}
|
||||
else if($action == 'movedown') {
|
||||
FAQ::move($id, 1, $errors);
|
||||
}
|
||||
|
||||
if(!empty($errors))
|
||||
echo $twig->render('error_box.html.twig', array('errors' => $errors));
|
||||
}
|
||||
|
||||
echo $twig->render('faq.form.html.twig', array(
|
||||
'link' => getLink('faq/' . ($action == 'edit' ? 'edit' : 'add')),
|
||||
'action' => $action,
|
||||
'id' => isset($id) ? $id : null,
|
||||
'question' => isset($question) ? $question : null,
|
||||
'answer' => isset($answer) ? $answer : null
|
||||
));
|
||||
}
|
||||
|
||||
$faqs =
|
||||
$db->query('SELECT `id`, `question`, `answer`' .
|
||||
($canEdit ? ', `hidden`, `ordering`' : '') .
|
||||
' FROM `' . TABLE_PREFIX . 'faq`' .
|
||||
(!$canEdit ? ' WHERE `hidden` != 1' : '') .
|
||||
' ORDER BY `ordering`;');
|
||||
|
||||
if(!$faqs->rowCount())
|
||||
{
|
||||
?>
|
||||
?>
|
||||
There are no questions added yet.
|
||||
<?php
|
||||
if(admin())
|
||||
echo ' You can add new faq questions in phpmyadmin under <b>' . TABLE_PREFIX . 'faq</b> table.';
|
||||
<?php
|
||||
}
|
||||
|
||||
$last = $faqs->rowCount();
|
||||
echo $twig->render('faq.html.twig', array(
|
||||
'faqs' => $faqs
|
||||
'faqs' => $faqs,
|
||||
'last' => $last,
|
||||
'canEdit' => $canEdit
|
||||
));
|
||||
|
||||
class FAQ
|
||||
{
|
||||
static public function add($question, $answer, &$errors)
|
||||
{
|
||||
global $db;
|
||||
if(isset($question[0]) && isset($answer[0]))
|
||||
{
|
||||
$query = $db->select(TABLE_PREFIX . 'faq', array('question' => $question));
|
||||
|
||||
if($query === false)
|
||||
{
|
||||
$query =
|
||||
$db->query(
|
||||
'SELECT ' . $db->fieldName('ordering') .
|
||||
' FROM ' . $db->tableName(TABLE_PREFIX . 'faq') .
|
||||
' ORDER BY ' . $db->fieldName('ordering') . ' DESC LIMIT 1'
|
||||
);
|
||||
|
||||
$ordering = 0;
|
||||
if($query->rowCount() > 0) {
|
||||
$query = $query->fetch();
|
||||
$ordering = $query['ordering'] + 1;
|
||||
}
|
||||
$db->insert(TABLE_PREFIX . 'faq', array('question' => $question, 'answer' => $answer, 'ordering' => $ordering));
|
||||
}
|
||||
else
|
||||
$errors[] = 'FAQ with this question already exists.';
|
||||
}
|
||||
else
|
||||
$errors[] = 'Please fill all inputs.';
|
||||
|
||||
return !count($errors);
|
||||
}
|
||||
|
||||
static public function get($id) {
|
||||
global $db;
|
||||
return $db->select(TABLE_PREFIX . 'faq', array('id' => $id));
|
||||
}
|
||||
|
||||
static public function update($id, $question, $answer) {
|
||||
global $db;
|
||||
$db->update(TABLE_PREFIX . 'faq', array('question' => $question, 'answer' => $answer), array('id' => $id));
|
||||
}
|
||||
|
||||
static public function delete($id, &$errors)
|
||||
{
|
||||
global $db;
|
||||
if(isset($id))
|
||||
{
|
||||
if(self::get($id) !== false)
|
||||
$db->delete(TABLE_PREFIX . 'faq', array('id' => $id));
|
||||
else
|
||||
$errors[] = 'FAQ with id ' . $id . ' does not exists.';
|
||||
}
|
||||
else
|
||||
$errors[] = 'id not set';
|
||||
|
||||
return !count($errors);
|
||||
}
|
||||
|
||||
static public function toggleHidden($id, &$errors)
|
||||
{
|
||||
global $db;
|
||||
if(isset($id))
|
||||
{
|
||||
$query = self::get($id);
|
||||
if($query !== false)
|
||||
$db->update(TABLE_PREFIX . 'faq', array('hidden' => ($query['hidden'] == 1 ? 0 : 1)), array('id' => $id));
|
||||
else
|
||||
$errors[] = 'FAQ with id ' . $id . ' does not exists.';
|
||||
}
|
||||
else
|
||||
$errors[] = 'id not set';
|
||||
|
||||
return !count($errors);
|
||||
}
|
||||
|
||||
static public function move($id, $i, &$errors)
|
||||
{
|
||||
global $db;
|
||||
$query = self::get($id);
|
||||
if($query !== false)
|
||||
{
|
||||
$ordering = $query['ordering'] + $i;
|
||||
$old_record = $db->select(TABLE_PREFIX . 'faq', array('ordering' => $ordering));
|
||||
if($old_record !== false)
|
||||
$db->update(TABLE_PREFIX . 'faq', array('ordering' => $query['ordering']), array('ordering' => $ordering));
|
||||
|
||||
$db->update(TABLE_PREFIX . 'faq', array('ordering' => $ordering), array('id' => $id));
|
||||
}
|
||||
else
|
||||
$errors[] = 'FAQ with id ' . $id . ' does not exists.';
|
||||
|
||||
return !count($errors);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@@ -12,125 +12,11 @@
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
$title = 'Spells';
|
||||
|
||||
$config_vocations = $config['vocations'];
|
||||
$canEdit = hasFlag(FLAG_CONTENT_SPELLS) || admin();
|
||||
if(isset($_POST['reload_spells']) && $canEdit)
|
||||
{
|
||||
try { $db->query('DELETE FROM ' . TABLE_PREFIX . 'spells WHERE 1 = 1'); } catch(PDOException $error) {}
|
||||
echo '<h2>Reload spells.</h2>';
|
||||
echo '<h2>All records deleted from table <b>' . TABLE_PREFIX . 'spells</b> in database.</h2>';
|
||||
foreach($config_vocations as $voc_id => $voc_name) {
|
||||
$vocations_ids[$voc_name] = $voc_id;
|
||||
}
|
||||
|
||||
$allspells = new OTS_SpellsList($config['data_path'].'spells/spells.xml');
|
||||
//add conjure spells
|
||||
$conjurelist = $allspells->getConjuresList();
|
||||
echo "<h3>Conjure:</h3>";
|
||||
foreach($conjurelist as $spellname) {
|
||||
$spell = $allspells->getConjure($spellname);
|
||||
$lvl = $spell->getLevel();
|
||||
$mlvl = $spell->getMagicLevel();
|
||||
$mana = $spell->getMana();
|
||||
$name = $spell->getName();
|
||||
$soul = $spell->getSoul();
|
||||
$spell_txt = $spell->getWords();
|
||||
$vocations = $spell->getVocations();
|
||||
$nr_of_vocations = count($vocations);
|
||||
$vocations_to_db = "";
|
||||
$voc_nr = 0;
|
||||
foreach($vocations as $vocation_to_add) {
|
||||
if(check_number($vocation_to_add)) {
|
||||
$vocations_to_db .= $vocation_to_add;
|
||||
}
|
||||
else
|
||||
$vocations_to_db .= $vocations_ids[$vocation_to_add];
|
||||
$voc_nr++;
|
||||
|
||||
if($voc_nr != $nr_of_vocations) {
|
||||
$vocations_to_db .= ',';
|
||||
}
|
||||
}
|
||||
|
||||
$enabled = $spell->isEnabled();
|
||||
if($enabled) {
|
||||
$hide_spell = 0;
|
||||
}
|
||||
else {
|
||||
$hide_spell = 1;
|
||||
}
|
||||
$pacc = $spell->isPremium();
|
||||
if($pacc) {
|
||||
$pacc = '1';
|
||||
}
|
||||
else {
|
||||
$pacc = '0';
|
||||
}
|
||||
$type = 2;
|
||||
$count = $spell->getConjureCount();
|
||||
try {
|
||||
$db->query('INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES (' . $db->quote($spell_txt) . ', ' . $db->quote($name) . ', ' . $db->quote($spell_txt) . ', ' . $db->quote($type) . ', ' . $db->quote($mana) . ', ' . $db->quote($lvl) . ', ' . $db->quote($mlvl) . ', ' . $db->quote($soul) . ', ' . $db->quote($pacc) . ', ' . $db->quote($vocations_to_db) . ', ' . $db->quote($count) . ', ' . $db->quote($hide_spell) . ')');
|
||||
success("Added: " . $name . "<br>");
|
||||
}
|
||||
catch(PDOException $error) {
|
||||
warning('Error while adding spell (' . $name . '): ' . $error->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
//add instant spells
|
||||
$instantlist = $allspells->getInstantsList();
|
||||
echo "<h3>Instant:</h3>";
|
||||
foreach($instantlist as $spellname) {
|
||||
$spell = $allspells->getInstant($spellname);
|
||||
$lvl = $spell->getLevel();
|
||||
$mlvl = $spell->getMagicLevel();
|
||||
$mana = $spell->getMana();
|
||||
$name = $spell->getName();
|
||||
$soul = $spell->getSoul();
|
||||
$spell_txt = $spell->getWords();
|
||||
if(strpos($spell_txt, '###') !== false)
|
||||
continue;
|
||||
|
||||
$vocations = $spell->getVocations();
|
||||
$nr_of_vocations = count($vocations);
|
||||
$vocations_to_db = "";
|
||||
$voc_nr = 0;
|
||||
foreach($vocations as $vocation_to_add) {
|
||||
if(check_number($vocation_to_add)) {
|
||||
$vocations_to_db .= $vocation_to_add;
|
||||
}
|
||||
else
|
||||
$vocations_to_db .= $vocations_ids[$vocation_to_add];
|
||||
$voc_nr++;
|
||||
|
||||
if($voc_nr != $nr_of_vocations) {
|
||||
$vocations_to_db .= ',';
|
||||
}
|
||||
}
|
||||
$enabled = $spell->isEnabled();
|
||||
if($enabled) {
|
||||
$hide_spell = 0;
|
||||
}
|
||||
else {
|
||||
$hide_spell = 1;
|
||||
}
|
||||
$pacc = $spell->isPremium();
|
||||
if($pacc) {
|
||||
$pacc = '1';
|
||||
}
|
||||
else {
|
||||
$pacc = '0';
|
||||
}
|
||||
$type = 1;
|
||||
$count = 0;
|
||||
try {
|
||||
$db->query("INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES (".$db->quote($spell_txt).", ".$db->quote($name).", ".$db->quote($spell_txt).", '".$type."', '".$mana."', '".$lvl."', '".$mlvl."', '".$soul."', '".$pacc."', '".$vocations_to_db."', '".$count."', '".$hide_spell."')");
|
||||
success("Added: ".$name."<br/>");
|
||||
}
|
||||
catch(PDOException $error) {
|
||||
warning('Error while adding spell (' . $name . '): ' . $error->getMessage());
|
||||
}
|
||||
}
|
||||
require LIBS . 'spells.php';
|
||||
Spells::loadFromXML(true);
|
||||
}
|
||||
|
||||
if($canEdit)
|
||||
@@ -165,7 +51,7 @@ if(!in_array($order, array('spell', 'words', 'type', 'mana', 'level', 'maglevel'
|
||||
|
||||
echo '>All';
|
||||
|
||||
foreach($config_vocations as $id => $vocation)
|
||||
foreach($config['vocations'] as $id => $vocation)
|
||||
{
|
||||
echo '<option value="' . $id . '" ';
|
||||
if($id == $vocation_id && $vocation_id != "All" && $vocation_id != '')
|
||||
@@ -228,7 +114,7 @@ if(isset($vocation_id) && $vocation_id != 'All' && $vocation_id != '')
|
||||
else
|
||||
echo '<TD>Instant</TD>';
|
||||
|
||||
echo '<TD>' . $spell['mana'] . '</TD><TD>' . $spell['level'] . '</TD><TD>' . $spell['maglevel'] . '</TD><TD>' . $spell['soul'] . '</TD><TD>' . ($spell ['premium'] == 1 ? 'yes' : 'no') . '</TD><TD>' . $config_vocations[$vocation_id] . '</TD></TR>';
|
||||
echo '<TD>' . $spell['mana'] . '</TD><TD>' . $spell['level'] . '</TD><TD>' . $spell['maglevel'] . '</TD><TD>' . $spell['soul'] . '</TD><TD>' . ($spell ['premium'] == 1 ? 'yes' : 'no') . '</TD><TD>' . $config['vocations'][$vocation_id] . '</TD></TR>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -249,8 +135,8 @@ else
|
||||
$showed_vocations = 0;
|
||||
foreach($spell_vocations as $spell_vocation)
|
||||
{
|
||||
if(isset($config_vocations[$spell_vocation])) {
|
||||
echo $config_vocations[$spell_vocation];
|
||||
if(isset($config['vocations'][$spell_vocation])) {
|
||||
echo $config['vocations'][$spell_vocation];
|
||||
$showed_vocations++;
|
||||
}
|
||||
if($showed_vocations != count($spell_vocations))
|
||||
|
Reference in New Issue
Block a user