* important fix for servers with promotion column (#36)

* caused player.vocation to be resetted when saving player, for example:
on change name, accept invite to guild, leave guild
* fixed empty success message on leave guild
* (internal) using $player->getVocationName() where possible instead of
older method
* fixed some warning in guild show
This commit is contained in:
slawkens1
2018-01-08 01:00:56 +01:00
parent acf2e2fb4a
commit 4102b44352
8 changed files with 20 additions and 19 deletions

View File

@@ -94,7 +94,7 @@ else
{
if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') {
$player->setRank();
$twig->render('success.html.twig', array(
echo $twig->render('success.html.twig', array(
'title' => 'Leave guild',
'description' => 'Player with name <b>'.$player->getName().'</b> leaved guild <b>'.$guild->getName().'</b>.',
'custom_buttons' => $twig->render('guilds.back_button.html.twig', array(

View File

@@ -10,6 +10,7 @@
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Guilds';
$guild_name = isset($_REQUEST['guild']) ? urldecode($_REQUEST['guild']) : null;
if(!Validator::guildName($guild_name))
$errors[] = Validator::getLastError();
@@ -41,6 +42,7 @@ else
$players_from_account_in_guild = array();
if($logged)
{
$players_from_account_ids = array();
$account_players = $account_logged->getPlayers();
foreach($account_players as $player)
{