function __construct(&$arr) { parent::__construct($arr); $this->frequence = $arr['inv_notel']; $this->clef = $arr['inv_nip']; $this->silenceCapable = $arr['db_afficheur']; $this->cryptCapable = $arr['db_anonyme']; }
function __construct(&$arr) { parent::__construct($arr); $this->nom = $this->nom . ' - ' . $arr['inv_param']; $this->notemj = $arr['inv_notemj']; $this->titre = $arr['inv_param']; $this->contenu = $arr['inv_memoiretext']; }
function __construct(&$arr) { parent::__construct($arr); $this->code = $arr['inv_memoiretext']; if (!empty($arr['inv_param'])) { $this->nom .= '- ' . $arr['inv_param']; } $this->notemj = $arr['inv_notemj']; }
public function getDescription() { $desc = parent::getDescription(); $desc .= '<br /><br />Carte #:'; $desc .= $this->getNoBanque() . '-'; $desc .= $this->getNoCompte() . '-'; $desc .= $this->getNoCarte(); return $desc; }
function __construct(&$arr) { parent::__construct($arr); $this->force = $arr['db_force']; $this->fiabilite = $arr['db_fiabilite']; $this->portee = $arr['db_portee']; $this->precision = $arr['db_precision']; $this->pa = $arr['db_shock_pa']; }
function __construct(&$arr) { parent::__construct($arr); $this->memory = stripslashes($arr['inv_memoiretext']); $this->memorySize = $arr['db_capacite']; $this->key = $arr['inv_nip']; $this->mcWrite = $arr['db_mcwrite']; $this->invParam = $arr['inv_param']; $this->permMemory = stripslashes($arr['db_param']); }
function __construct(&$arr) { $arr['inv_notemj'] = isset($arr['inv_notemj']) ? $arr['inv_notemj'] : null; $arr['inv_qte'] = isset($arr['inv_qte']) ? $arr['inv_qte'] : null; $arr['inv_id'] = isset($arr['inv_id']) ? $arr['inv_id'] : null; $arr['inv_persoid'] = isset($arr['inv_persoid']) ? $arr['inv_persoid'] : null; $arr['inv_lieutech'] = isset($arr['inv_lieutech']) ? $arr['inv_lieutech'] : null; $arr['inv_boutiquelieutech'] = isset($arr['inv_boutiquelieutech']) ? $arr['inv_boutiquelieutech'] : null; $arr['inv_boutiquePrixVente'] = isset($arr['inv_boutiquePrixVente']) ? $arr['inv_boutiquePrixVente'] : null; $arr['inv_boutiquePrixAchat'] = isset($arr['inv_boutiquePrixAchat']) ? $arr['inv_boutiquePrixAchat'] : null; parent::__construct($arr); $this->titre = stripslashes($arr['db_nom']); $this->auteur = stripslashes($arr['db_pass']); $this->contenu = stripslashes($arr['db_param']); }
function __construct(&$arr) { parent::__construct($arr); $this->nobanque = $arr['inv_nobanque']; $this->nocompte = $arr['inv_nocompte']; $this->nip = $arr['inv_nip']; $this->typeAffichage = $arr['db_afficheur']; $this->anonymeCapable = $arr['db_anonyme'] == '1' ? true : false; $this->prixAppel = $arr['db_param']; $this->memory = $arr['inv_memoiretext']; $this->memorySize = $arr['db_memoire']; // Pour éviter les doublons de numéro if ($this->qte == 1) { if (empty($arr['inv_notel'])) { $this->genNoTel(); } else { $this->notel = $arr['inv_notel']; } } }
public static function generatePage(&$tpl, &$session, &$account, &$perso) { $dbMgr = DbManager::getInstance(); //Instancier le gestionnaire $db = $dbMgr->getConn('game'); //Demander la connexion existante $actionPa = 2; if (!isset($_POST['id']) || isset($_POST['id']) && !is_numeric($_POST['id'])) { die('00|' . rawurlencode('Vous devez sélectionner un item pour effectuer cette action.')); } //V�rifier l'�tat du perso if (!$perso->isConscient()) { die($_POST['id'] . '|' . rawurlencode('Votre n\'êtes pas en �tat d\'effectuer cette action.')); } if ($perso->getPa() <= $actionPa) { die($_POST['id'] . '|' . rawurlencode('Vous n\'avez pas assez de PA pour effectuer cette action.')); } //Trouver en inventaire l'item que l'on souhaite �quiper $i = 0; $item = null; while ($tmp = $perso->getInventaire($i++)) { if ($tmp->getInvId() == $_POST['id']) { $item = $tmp; break; } } if (empty($item)) { die($_POST['id'] . '|' . rawurlencode('Cet item ne vous appartiend pas. (cheat)')); } //Si l'item est une nourriture, le supprimer et ajouter les PN if ($item instanceof Member_ItemNourriture) { //Trouver combien de PN le perso pourrait consommer $pnNeeded = $perso->getPnMax() - $perso->getPn(); //echo "pnNeeded:". $pnNeeded ."<br/>"; /////////////////// if ($perso->getPn() >= $perso->getPnMax()) { die($_POST['id'] . '|' . rawurlencode('Vous n\'avez pas faim... vraiment pas faim. Une bouché de plus et vous pourriez bien exploser. (et non, ca ne vous permettera pas de faire un attentat kamikaze)')); } //Trouver combien de PN on va consommer $usePn = $item->getPn() >= $pnNeeded ? $pnNeeded : $item->getPn(); //echo "usePN:". $usePN ."<br/>"; /////////////////// if ($item->getPn() - $usePn == 0) { if ($item->getQte() == 1) { $query = 'DELETE FROM ' . DB_PREFIX . 'item_inv' . ' WHERE inv_id=:itemId' . ' LIMIT 1;'; } else { $query = 'UPDATE ' . DB_PREFIX . 'item_inv' . ' SET inv_qte = inv_qte - 1' . ' WHERE inv_id=:itemId' . ' LIMIT 1;'; } //echo $query ."<br/>"; /////////////////// $prep = $db->prepare($query); $prep->bindValue(':itemId', $_POST['id'], PDO::PARAM_INT); $prep->executePlus($db, __FILE__, __LINE__); $prep->closeCursor(); $prep = NULL; } else { //echo "nb de PN de l'item chang�<br/>"; /////////////////// $item->changePn('-', $usePn); $item->setPn(); } $perso->changePn('+', $usePn); $perso->setPn(); //Si l'item est une drogue, } elseif ($item instanceof Member_ItemDrogueDrogue) { //Copier une instance de la drogue � consommer. $newId = Member_Item::duplicateItem($item->getInvId(), 1, $perso->getId()); //�quiper (consommer) la drogue, et appliquer la dur�e $remiseleft = rand($item->getDuree() - 1, $item->getDuree() + 1); //Dur�e un peu al�atoire $query = 'UPDATE ' . DB_PREFIX . 'item_inv' . ' SET inv_remiseleft =:remiseLeft,' . ' inv_equip="1"' . ' WHERE inv_persoid=:persoId' . ' AND inv_id=:itemId' . ' LIMIT 1;'; $prep = $db->prepare($query); $prep->bindValue(':remiseLeft', $remiseleft, PDO::PARAM_INT); $prep->bindValue(':persoId', $perso->getId(), PDO::PARAM_INT); $prep->bindValue(':itemId', $newId, PDO::PARAM_INT); $prep->executePlus($db, __FILE__, __LINE__); $prep->closeCursor(); $prep = NULL; $perso->boostPa('+', $item->getBoostPa()); $perso->boostPv('+', $item->getBoostPv()); $perso->setPv($perso, 'Consommation drogue'); //R�duire la quantit� du lot restat, ou le supprimer selon le cas if ($item->getQte() == 1) { $query = 'DELETE FROM ' . DB_PREFIX . 'item_inv' . ' WHERE inv_persoid=:persoId' . ' AND inv_id=:itemId' . ' LIMIT 1;'; } else { $query = 'UPDATE ' . DB_PREFIX . 'item_inv' . ' SET inv_qte = inv_qte -1' . ' WHERE inv_persoid=:persoId' . ' AND inv_id=:itemId' . ' LIMIT 1;'; } $prep = $db->prepare($query); $prep->bindValue(':persoId', $perso->getId(), PDO::PARAM_INT); $prep->bindValue(':itemId', $item->getInvId(), PDO::PARAM_INT); $prep->executePlus($db, __FILE__, __LINE__); $prep->closeCursor(); $prep = NULL; } else { die($_POST['id'] . '|' . rawurlencode('Vous ne pouvez pas consommer ce type d\'item.')); } $perso->refreshInventaire(); //Recalculer l'inventaire (les PR) $perso->changePa('-', $actionPa); $perso->setPa(); Member_He::add('System', $perso->getId(), 'conso', "Vous consommez votre [i]" . $item->getNom() . '[/i]'); //Faire la liste de tout les personnages du lieu $i = 0; $e = 0; $arrFrom = array(); while ($tmp = $perso->getLieu()->getPerso($perso, $i++)) { if ($tmp->getId() != $perso->getId()) { $arrFrom[$e++] = $tmp->getId(); } } Member_He::add($perso->getId(), $arrFrom, 'conso', "Vous voyez une personne consommer : [i]" . $item->getNom() . '[/i]', HE_AUCUN, HE_UNIQUEMENT_MOI); die($_POST['id'] . '|OK|' . $perso->getPa() . '|' . $perso->getPr() . '|' . $perso->getPn()); //Tout est OK }
function __construct(&$arr) { parent::__construct($arr); $this->pn = $arr['inv_pn']; }
function __construct(&$arr) { parent::__construct($arr); }
function __construct($arr) { parent::__construct($arr); $this->sens = $arr['db_internet']; $this->mediaType = $arr['db_pass']; }
function __construct(&$arr) { parent::__construct($arr); $this->sousType = $arr['db_soustype']; }
function __construct(&$arr) { parent::__construct($arr); $this->resistanceSeuil = $arr['db_seuilresistance']; }
function __construct(&$arr) { parent::__construct($arr); $this->capaciteMax = $arr['db_capacite']; }