|
@@ 446-458 (lines=13) @@
|
| 443 |
|
* @return bool |
| 444 |
|
* fonction qui permet à un joueur de rejoindre une faction |
| 445 |
|
*/ |
| 446 |
|
public function setAccepterInvitationPlayer($id_faction) { |
| 447 |
|
$dbc = App::getDb(); |
| 448 |
|
|
| 449 |
|
$dbc->update("ID_faction", $id_faction) |
| 450 |
|
->update("rang_faction", "")->from("_bataille_infos_player")->where("ID_identite", "=", Bataille::getIdIdentite())->set(); |
| 451 |
|
|
| 452 |
|
$this->setSupprimerInvitationPlayer($id_faction); |
| 453 |
|
|
| 454 |
|
Points::setRejoindreQuitterFaction(); |
| 455 |
|
|
| 456 |
|
FlashMessage::setFlash("Vous avez rejoint une faction", "success"); |
| 457 |
|
return true; |
| 458 |
|
} |
| 459 |
|
|
| 460 |
|
/** |
| 461 |
|
* @param $id_faction |
|
@@ 465-473 (lines=9) @@
|
| 462 |
|
* @return bool |
| 463 |
|
* permet à un joueur de supprimer une invitation qu'il a reçu |
| 464 |
|
*/ |
| 465 |
|
public function setSupprimerInvitationPlayer($id_faction) { |
| 466 |
|
$dbc = App::getDb(); |
| 467 |
|
|
| 468 |
|
$dbc->delete()->from("_bataille_faction_invitation")->where("ID_faction", "=", $id_faction, "AND") |
| 469 |
|
->where("ID_identite", "=", Bataille::getIdIdentite())->del(); |
| 470 |
|
|
| 471 |
|
FlashMessage::setFlash("L'invitation a bien été supprimée", "success"); |
| 472 |
|
return true; |
| 473 |
|
} |
| 474 |
|
|
| 475 |
|
/** |
| 476 |
|
* @param $id_identite |