forked from halo-battle/game
Version 1.12
This commit is contained in:
parent
2a066a7498
commit
de31cd3e9a
1373 changed files with 156282 additions and 45238 deletions
|
|
@ -34,9 +34,9 @@ class Rapport{
|
|||
}
|
||||
|
||||
function send(){
|
||||
if ($this->type == '1') $this->sendCombat();
|
||||
elseif ($this->type == '2') $this->sendTransport();
|
||||
elseif ($this->type == '3') $this->sendColonisation();
|
||||
if ($this->type == '3') $this->sendCombat();
|
||||
elseif ($this->type == '1') $this->sendTransport();
|
||||
elseif ($this->type == '2') $this->sendColonisation();
|
||||
elseif ($this->type == '4') $this->sendRecyclage();
|
||||
elseif ($this->type == '5') $this->sendEspionnage();
|
||||
elseif ($this->type == '6') $this->sendAlliance();
|
||||
|
|
@ -112,15 +112,15 @@ class Rapport{
|
|||
function sendTransport(){
|
||||
global $config;
|
||||
include_once(_FCORE."../game/function.php");
|
||||
$titre = 'Transport vers '.$this->var[0]['nom_planete'].' ['.$this->var[0]['galaxie'].':'.$this->var[0]['ss'].':'.$this->var[0]['position'].']';
|
||||
$titre = 'Transport vers '.$this->var[0][0].' ['.$this->var[0][1].':'.$this->var[0][2].':'.$this->var[0][3].']';
|
||||
|
||||
$race = trouvInfo($this->utilA, 'race');
|
||||
$race = trouvInfo($this->utilA, 'race'); //TODO A optimiser
|
||||
include(_FCORE."../game/noms.php");
|
||||
$rapportA = 'Vos vaisseaux ont déposé '.$this->var[1][0].' de '.$ressourc[0].', '.$this->var[1][1].' de '.$ressourc[1].' et '.$this->var[1][2].' d\''.$ressourc[2].' sur '.$this->var[0]['nom_planete'].'['.$this->var[0]['galaxie'].':'.$this->var[0]['ss'].':'.$this->var[0]['position'].']</b><br /><br />';
|
||||
$rapportA = 'Vos vaisseaux ont déposé '.$this->var[1][0].' de '.$ressourc[0].', '.$this->var[1][1].' de '.$ressourc[1].' et '.$this->var[1][2].' d\''.$ressourc[2].' sur '.$this->var[0][0].'['.$this->var[0][1].':'.$this->var[0][2].':'.$this->var[0][3].']</b><br /><br />';
|
||||
|
||||
$race = trouvInfo($this->utilB, 'race');
|
||||
$race = trouvInfo($this->utilB, 'race'); //TODO A optimiser
|
||||
include(_FCORE."../game/noms.php");
|
||||
$rapportB = 'Les vaisseaux de '.trouvNom($this->utilA).' ont déposé '.$this->var[1][0].' de '.$ressourc[0].', '.$this->var[1][1].' de '.$ressourc[1].' et '.$this->var[1][2].' d\''.$ressourc[2].' sur '.$this->var[0]['nom_planete'].'['.$this->var[0]['galaxie'].':'.$this->var[0]['ss'].':'.$this->var[0]['position'].']</b><br /><br />';
|
||||
$rapportB = 'Les vaisseaux de '.trouvNom($this->utilA).' ont déposé '.$this->var[1][0].' de '.$ressourc[0].', '.$this->var[1][1].' de '.$ressourc[1].' et '.$this->var[1][2].' d\''.$ressourc[2].' sur '.$this->var[0][0].'['.$this->var[0][1].':'.$this->var[0][2].':'.$this->var[0][3].']</b><br /><br />';
|
||||
|
||||
$temps = $this->timestamp;
|
||||
$db = new bdd();
|
||||
|
|
@ -129,8 +129,8 @@ class Rapport{
|
|||
$db->escape($rapportA);
|
||||
$db->escape($rapportB);
|
||||
|
||||
$db->query("INSERT INTO ".$this->table." (destinataire, sujet, contenu, temps) VALUES(".$this->utilA.", '$titre', '$rapportA', '$temps')");
|
||||
if ($this->utilA != $this->utilB) $db->query("INSERT INTO ".$this->table." (destinataire, sujet, contenu, temps) VALUES(".$this->utilB.", '$titre', '$rapportB', '$temps')");
|
||||
$db->query("INSERT INTO ".$this->table." (destinataire, sujet, contenu, temps) VALUES(".$this->utilA.", '$titre', '$rapportA', '$temps');");
|
||||
if ($this->utilA != $this->utilB) $db->query("INSERT INTO ".$this->table." (destinataire, sujet, contenu, temps) VALUES(".$this->utilB.", '$titre', '$rapportB', '$temps');");
|
||||
$db->deconnexion();
|
||||
}
|
||||
|
||||
|
|
@ -150,9 +150,10 @@ class Rapport{
|
|||
}
|
||||
|
||||
function sendRecyclage(){
|
||||
include_once(_FCORE."../game/function.php");
|
||||
$titre = 'Recyclage de '.$this->var[0]['nom_planete'].' ['.$this->var[0]['galaxie'].':'.$this->var[0]['ss'].':'.$this->var[0]['position'].']';
|
||||
$rapport = 'Vos vaisseaux récoltent '.$this->var[1][0].' de '.$ressourc[0].' et '.$this->var[1][1].' de '.$ressourc[1].' sur '.$this->var[0]['nom_planete'].'['.$this->var[0]['galaxie'].':'.$this->var[0]['ss'].':'.$this->var[0]['position'].']</b><br /><br />';
|
||||
global $ressourc;
|
||||
|
||||
$titre = 'Recyclage de '.$this->var[0]->nom_planete.' ['.$this->var[0]->galaxie.':'.$this->var[0]->ss.':'.$this->var[0]->position.']';
|
||||
$rapport = 'Vos vaisseaux récoltent '.$this->var[1][0].' de '.$ressourc[0].' et '.$this->var[1][1].' de '.$ressourc[1].' sur '.$this->var[0]->nom_planete.'['.$this->var[0]->galaxie.':'.$this->var[0]->ss.':'.$this->var[0]->position.']</b><br /><br />';
|
||||
|
||||
$temps = $this->timestamp;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue