Exemple #1
0
 public static function insert(Dolumar_Map_Portal $portal)
 {
     $db = Neuron_DB_Database::getInstance();
     $b1 = $portal->getCasterBuilding();
     $b2 = $portal->getTargetBuilding();
     $v1 = $b1->getVillage();
     $v2 = $b2->getVillage();
     $l1 = $portal->getCasterLocation();
     $l2 = $portal->getTargetLocation();
     $db->query("\n\t\t\tINSERT INTO\n\t\t\t\tmap_portals\n\t\t\tSET\n\t\t\t\tp_caster_v_id = {$v1->getId()},\n\t\t\t\tp_target_v_id = {$v2->getId()},\n\t\t\t\tp_caster_x = {$l1[0]},\n\t\t\t\tp_caster_y = {$l1[1]},\n\t\t\t\tp_target_x = {$l2[0]},\n\t\t\t\tp_target_y = {$l2[1]},\n\t\t\t\tp_caster_b_id = {$b1->getId()},\n\t\t\t\tp_target_b_id = {$b2->getId()},\n\t\t\t\tp_endDate = NULL\n\t\t");
 }