Esempio n. 1
0
 /**
  * installs default game roles for custom game
  */
 protected function InstallRoles()
 {
     global $db;
     $umil = new \umil();
     $db->sql_query('DELETE FROM ' . BB_GAMEROLE_TABLE . " WHERE role_id < 3 and game_id = '" . $this->game_id . "'");
     $umil->table_row_insert(BB_GAMEROLE_TABLE, array(array('game_id' => $this->game_id, 'role_id' => 0, 'role_color' => '#FF4455', 'role_icon' => 'dps_icon'), array('game_id' => $this->game_id, 'role_id' => 1, 'role_color' => '#11FF77', 'role_icon' => 'healer_icon'), array('game_id' => $this->game_id, 'role_id' => 2, 'role_color' => '#c3834c', 'role_icon' => 'tank_icon')));
     $db->sql_query('DELETE FROM ' . BB_LANGUAGE . " WHERE attribute_id < 3  and attribute = 'role' and game_id = '" . $this->game_id . "'");
     //english
     $umil->table_row_insert(BB_LANGUAGE, array(array('game_id' => $this->game_id, 'attribute_id' => 0, 'language' => 'en', 'attribute' => 'role', 'name' => 'Damage', 'name_short' => 'DPS'), array('game_id' => $this->game_id, 'attribute_id' => 1, 'language' => 'en', 'attribute' => 'role', 'name' => 'Healer', 'name_short' => 'HPS'), array('game_id' => $this->game_id, 'attribute_id' => 2, 'language' => 'en', 'attribute' => 'role', 'name' => 'Defense', 'name_short' => 'DEF')));
     //french
     $umil->table_row_insert(BB_LANGUAGE, array(array('game_id' => $this->game_id, 'attribute_id' => 0, 'language' => 'fr', 'attribute' => 'role', 'name' => 'Dégats', 'name_short' => 'DPS'), array('game_id' => $this->game_id, 'attribute_id' => 1, 'language' => 'fr', 'attribute' => 'role', 'name' => 'Soigneur', 'name_short' => 'HPS'), array('game_id' => $this->game_id, 'attribute_id' => 2, 'language' => 'fr', 'attribute' => 'role', 'name' => 'Défense', 'name_short' => 'DEF')));
     //german
     $umil->table_row_insert(BB_LANGUAGE, array(array('game_id' => $this->game_id, 'attribute_id' => 0, 'language' => 'de', 'attribute' => 'role', 'name' => 'Kämpfer', 'name_short' => 'Schaden'), array('game_id' => $this->game_id, 'attribute_id' => 1, 'language' => 'de', 'attribute' => 'role', 'name' => 'Heiler', 'name_short' => 'Heil'), array('game_id' => $this->game_id, 'attribute_id' => 2, 'language' => 'de', 'attribute' => 'role', 'name' => 'Verteidigung', 'name_short' => 'Schutz')));
     //Italian
     $umil->table_row_insert(BB_LANGUAGE, array(array('game_id' => $this->game_id, 'attribute_id' => 0, 'language' => 'it', 'attribute' => 'role', 'name' => 'Danni', 'name_short' => 'Danni'), array('game_id' => $this->game_id, 'attribute_id' => 1, 'language' => 'it', 'attribute' => 'role', 'name' => 'Cura', 'name_short' => 'Cura'), array('game_id' => $this->game_id, 'attribute_id' => 2, 'language' => 'it', 'attribute' => 'role', 'name' => 'Difeza', 'name_short' => 'Tank')));
 }