some fixes

* set default skills to 10 when creating new character
* fixed displaying of "Create forum thread" in newses
* fixed deleting guild
* fixed displaying vocation amount on online page
* better support for custom vocations, you just need to set in config
vocations_amount to yours.
This commit is contained in:
slawkens1
2017-05-31 23:10:35 +02:00
parent 6f10ee1965
commit e69ff12966
9 changed files with 24 additions and 22 deletions

View File

@@ -217,8 +217,9 @@ class OTS_Player extends OTS_Row_DAO
$this->data['rank_id'] = 0;
if(isset($this->data['promotion'])) {
global $config;
if((int)$this->data['promotion'] > 0)
$this->data['vocation'] + ($this->data['promotion'] * 4);
$this->data['vocation'] += ($this->data['promotion'] * $config['vocations_amount']);
}
// loads skills
if( $this->isLoaded() )
@@ -472,7 +473,6 @@ class OTS_Player extends OTS_Row_DAO
if($id != $i - 1)
$set .= ',';
}
$skills = $this->db->query('UPDATE `players` SET ' . $set . ' WHERE `id` = ' . $this->data['id']);