示例#1
0
文件: draft.php 项目: 4otaku/draft
 public function get_action()
 {
     $action = parent::get_action();
     if (!empty($action['type']) && $action['type'] == 'pick') {
         $pick = $action['data'];
         $set = ceil($pick / 15);
         $shift = ($pick - 1) % 15;
         $action['picked'] = Database::join('game_booster', 'gb.id_game_set = gs.id')->join('game_booster_card', 'gbc.id_game_booster = gb.id')->get_table('game_set', 'gbc.id_user', 'gs.id_game = ? and gs.order = ? and gbc.pick = ? and gbc.id_user > 0', array($this->get_id(), $set, $shift + ($set - 1) * 15));
     }
     return $action;
 }