コード例 #1
0
ファイル: MissionMapper.php プロジェクト: Toxicat/dolumar
 public static function remove(Dolumar_Underworld_Models_Mission $mission)
 {
     Dolumar_Underworld_Mappers_ArmyMapper::removeFromMission($mission);
     Dolumar_Underworld_Mappers_CheckpointMapper::removeFromMission($mission);
     Dolumar_Underworld_Mappers_ExploredMapper::removeFromMission($mission);
     Dolumar_Underworld_Mappers_ScoreMapper::removeFromMission($mission);
     $db = Neuron_DB_Database::getInstance();
     $db->query("\n\t\t\tDELETE FROM\n\t\t\t\tunderworld_missions_clans\n\t\t\tWHERE\n\t\t\t\tum_id = {$mission->getId()}\n\t\t");
     $db->query("\n\t\t\tDELETE FROM\n\t\t\t\tunderworld_missions\n\t\t\tWHERE\n\t\t\t\tum_id = {$mission->getId()}\n\t\t");
 }
コード例 #2
0
ファイル: Objectives.php プロジェクト: Toxicat/dolumar
 public function setCheckpointSide(Neuron_GameServer_Map_Location $location, Dolumar_Underworld_Models_Side $side)
 {
     $currentside = $this->getCheckpointSide($location);
     $time = 0;
     if (isset($currentside)) {
         // Only change if side is different
         if (!$currentside->equals($side)) {
             $time = $this->getTimeSinceLastCheckpointSide($location);
             Dolumar_Underworld_Mappers_CheckpointMapper::set($this->getMission(), $location, $side);
             $this->onChangeCheckpointSide($location, $currentside, $side, $time);
         }
     } else {
         Dolumar_Underworld_Mappers_CheckpointMapper::set($this->getMission(), $location, $side);
         $this->onChangeCheckpointSide($location, null, $side, $time);
     }
 }