/** * 注册同步队列 * * @param unknown_type $player_id 玩家id或者数组array(玩家id,附加数据例如道具id) * @param unknown_type $class 注册类标识 * @param unknown_type $reptime 同步时间 设置会记录最后数据修改的时间 * @param unknown_type $reptype 同步方式 set, add, del 对应更新 插入 删除三种原子操作 */ protected function register_repaction($player_id, $class, $reptime = 0, $reptype = 'set') { if ($this->is_trans()) { return $this->set_redis_pre_action((is_array($player_id) ? implode('_', $player_id) : $player_id) . '_' . $class . '_' . $reptype, array('Com_Replication', 'push_queue'), array($player_id, $class, $reptime, $reptype)); } else { return Com_Replication::push_queue($player_id, $class, $reptime, $reptype); } }