// Pour la premiere évolution if ($iEvolution->getPalierInferieur() == '0') { // Table _iconepersonnage_personnage (liaison) $PersonnageManager->insert_iconePersonnage_personnage($personnageId, $iEvolution->getIconePersonnageId()); } } } /*************************** * FIN ENREGISTREMENT BDD ***************************/ $_SESSION['messageInsertPersonnage'] = true; } } } //Liste des joueurs $joueurGetAll = $JoueurManager->getAll(); $listeJoueur = array(); if (count($joueurGetAll) > 0) { foreach ($joueurGetAll as $joueur) { // Instance de chaque joueur $listeJoueur[] = new Joueur($joueur); } } //Liste des personnages type $personnageTypeGetAll = $PersonnageTypeManager->getAll(); $listePersonnageType = array(); if (count($personnageTypeGetAll) > 0) { foreach ($personnageTypeGetAll as $personnageType) { // Instance de chaque personnage type $listePersonnageType[] = new PersonnageType($personnageType); }
if (count($evolutionGetBy) > 0) { foreach ($evolutionGetBy as $evolution) { // Instance de chaque evolution $iEvolution = new Evolution($evolution); // Si l'expérience du personnage est comprise dans la tranche d'evolution if ($iEvolution->getPalierInferieur() <= $Personnage->getExperience() && $iEvolution->getPalierSuperieur() > $Personnage->getExperience()) { $iconePersonnageId = $iEvolution->getIconePersonnageId(); $Personnage->setIconePersonnageId($iconePersonnageId); $PersonnageManager->update_iconepersonnage_personnage($Personnage); //On met à jour le personnage $Personnage = new Personnage($PersonnageManager->get($Personnage->getId())); } } } // Liste des joueurs $listeJoueur = $JoueurManager->getAll(); // Contruction d'une variable selectJoueurs au format d'un optiongroup $selectJoueurs = array(); if (count($listeJoueur) > 0) { foreach ($listeJoueur as $key => $item) { if (!isset($selectJoueurs[$item['roleNom']])) { $selectJoueurs[$item['roleNom']] = array(); } array_push($selectJoueurs[$item['roleNom']], new Joueur($item)); } } $smarty->assign('carte', $Carte); $smarty->assign('direction', $direction); $smarty->assign('personnage', $Personnage); $smarty->assign('personnages', $Personnages); $smarty->assign('adversaires', $Adversaires);