コード例 #1
0
ファイル: TaskRandom.php プロジェクト: bluefan/phpsource
 public function get_award($level, $quality, $task_id)
 {
     $award_config = Cache_TaskRandomAward::getInstance()->get_task_random_award($task_id);
     if ($award_config) {
         $award = '';
         foreach ($award_config as $val) {
             if ($level >= $val['lvl_min'] && $level <= $val['lvl_max']) {
                 $award = $val['task_award'];
                 break;
             }
         }
         if (!empty($award)) {
             $addition_config = Cache_TaskRandomAwardAdd::getInstance()->get_task_random_award_add($quality);
             $award = Com_FmtData::format_table_prop($award);
             foreach ($award as $key => $val) {
                 $val['num'] = $val['num'] * $addition_config['quality_add'];
                 $award[$key] = $val;
             }
             return $award;
         }
     }
     return array();
 }
コード例 #2
0
ファイル: PlatformBag.php プロジェクト: bluefan/phpsource
 /**
  * @Purpose:
  * 平台礼包领取
  * @Param $player_id 玩家ID
  * @Param $type 礼包类型(1:360加速球2:360游戏大厅)
  */
 public function receive_platform_bag($player_id, $type)
 {
     $player_id = intval($player_id);
     $type = intval($type);
     $operator_id = OPERATOR_ID;
     #获取玩家微端礼包信息;
     $data = $this->get_data('PlayerDetail')->get_player_detail($player_id, 'platform_bag_info');
     if (empty($data) || !isset($data[$operator_id][$type]) || $data[$operator_id][$type] != 2) {
         #获取平台礼包配置表
         $platformbag_table = Cache_PlatformBag::getInstance()->get_platform_bag_info(array('platform' => $operator_id, 'type' => $type));
         if (empty($platformbag_table)) {
             $this->throw_error('10109');
             #配置表读取错误
         }
         #领奖时间验证
         $start_time = Com_FmtData::format_table_time($platformbag_table['start_time']);
         $over_time = Com_FmtData::format_table_time($platformbag_table['over_time']);
         if (time() < $start_time || $over_time <= time()) {
             $this->throw_error('21001');
             #非领奖时间
         }
         if ($data[$operator_id][$type] == 2) {
             $this->throw_error('6010063');
             #奖励领取过
         }
         if ($platformbag_table['is_activate'] == 1 && $data[$operator_id][$type] != 1) {
             $this->throw_error('21002');
             #礼包未激活
         }
         $prop_list = Com_FmtData::format_table_prop($platformbag_table['prop_info']);
         $prop_info = Com_FmtData::format_send_prop($prop_list);
         $data[$operator_id][$type] = 2;
         $this->start_trans();
         $update_res = $this->get_data('PlayerDetail')->update_player_detail($player_id, array('platform_bag_info' => $data));
         if (!$update_res) {
             $this->throw_error('10104');
         }
         #道具发送
         if (Com_Array::is_good_arr($prop_info)) {
             $result = $this->get_game('Reward')->send_reward($player_id, $prop_info, array('cmd_id' => '2105', 'bind_flag' => 0), 1);
             if ($result !== true) {
                 $this->throw_error('10104');
             }
         }
         $this->commit();
         $this->get_game('Reward')->add_reward_log();
         $fun_id = 0;
         if ($type == 1) {
             $fun_id = 91101;
         } else {
             if ($type == 2) {
                 $fun_id = 91102;
             }
         }
         if ($fun_id > 0) {
             #礼包全部领完后,通知前端隐藏ICON
             $func_data = array();
             $func_data[0][$fun_id] = array('operate' => 2, 'func_id' => $fun_id, 'open' => 0, 'guide' => 0, 'cd' => 0, 'tip' => array());
             Protocol::input($player_id, 8, 7, 741, $func_data);
         }
         return array(intval($data[$operator_id][$type]), $type);
     }
 }
コード例 #3
0
ファイル: TaskChain.php プロジェクト: bluefan/phpsource
 public function get_reward($level, $finish_num)
 {
     $finish_num = $finish_num <= 0 ? 1 : $finish_num;
     $task_reward = Cache_TaskChainAwardBase::getInstance()->get_task_chain_award_base();
     $reward = array();
     $reward_addition = Cache_TaskChain::getInstance()->get_task_chain_info($finish_num);
     foreach ($task_reward as $val) {
         if ($level >= $val['min_lvl'] && $level <= $val['max_lvl']) {
             if (!empty($val['task_award'])) {
                 $reward = Com_FmtData::format_table_prop($val['task_award']);
                 foreach ($reward as $key => $val) {
                     $val['num'] = $val['num'] * ($reward_addition['award_add'] / 100);
                     $reward[$key] = $val;
                 }
                 if (!empty($reward_addition['award_extra'])) {
                     $reward1 = Com_FmtData::format_table_prop($reward_addition['award_extra']);
                     if ($reward1) {
                         $reward = array_merge($reward, $reward1);
                     }
                 }
             }
             break;
         }
     }
     return $reward;
 }
コード例 #4
0
ファイル: EverydayDo.php プロジェクト: bluefan/phpsource
 public function get_everyday_do($player_id, $type, $player_info_all = null, $player_detail_all = null, $player_used_time = null)
 {
     $everyday_config = Cache_EverydayDo::getInstance()->get_everyday_do_info($type);
     if (empty($everyday_config)) {
         $this->throw_error('10107');
     }
     $out = array();
     if (is_null($player_detail_all)) {
         $func_open = $this->get_data('PlayerDetail')->get_player_detail($player_id, 'func_open');
     } else {
         $func_open = $player_detail_all['func_open'];
     }
     if (is_null($player_info_all)) {
         $player_info = $this->get_data('Player')->get_player_info($player_id, array('level', 'career_type'));
     } else {
         $player_info = $player_info_all;
     }
     if (is_null($player_used_time)) {
         $player_used_time = $this->get_data('PlayerDailyTime')->get_player_used_time($player_id);
     }
     $arr_times = $this->get_daily_time($player_id, null, $player_used_time);
     $finish = array();
     $out[0] = array();
     $i = 0;
     //        $func_configs = Cache_FuncConfig::getInstance()->get_func_config_info();
     foreach ($everyday_config as $val) {
         if (!isset($func_open[$val['func_id']])) {
             #判断功能是否开启
             continue;
         }
         $arr_reward = array();
         if (!empty($val['reward_1'])) {
             $rewards1 = Com_FmtData::format_table_prop2($val['reward_1']);
             if ($rewards1) {
                 foreach ($rewards1 as $item) {
                     if ($item['career_type'] != $player_info['career_type']) {
                         continue;
                     }
                     $data = Cache_Prop::getInstance()->get_prop_info($item['id']);
                     $data['item_num'] = $item['num'];
                     $arr_reward[] = Struct_Prop::get_prop_struct($data);
                 }
             }
         }
         if (!empty($val['reward_2'])) {
             $rewards2 = Com_FmtData::format_table_prop($val['reward_2']);
             foreach ($rewards2 as $item) {
                 $data = array('prop_id' => $item['id'], 'item_num' => $item['num']);
                 $arr_reward[] = Struct_Prop::get_prop_struct($data);
             }
         }
         if (in_array($val['func_id'], $this->_can_add_times)) {
             $show_add_times = 1;
         } else {
             $show_add_times = 0;
         }
         if ($arr_times[$val['func_id']]['cur_num'] < $arr_times[$val['func_id']]['max_num']) {
             if ($i < 2 && $type > 0) {
                 $recommend = 1;
             } else {
                 $recommend = 0;
             }
             $out[0][] = array('type' => $type, 'icon_id' => $val['func_id'], 'reward' => $arr_reward, 'max_num' => intval($arr_times[$val['func_id']]['max_num']), 'cur_num' => intval($arr_times[$val['func_id']]['cur_num']), 'jump_id' => $val['jump_id'], 'recommend' => $recommend, 'show_add_times' => $show_add_times, 'star' => $val['star']);
         } else {
             $finish[] = array('type' => $type, 'icon_id' => $val['func_id'], 'reward' => $arr_reward, 'max_num' => intval($arr_times[$val['func_id']]['max_num']), 'cur_num' => intval($arr_times[$val['func_id']]['cur_num']), 'jump_id' => $val['jump_id'], 'recommend' => 0, 'show_add_times' => $show_add_times, 'star' => $val['star']);
         }
         ++$i;
     }
     if (!empty($finish)) {
         $out[0] = array_merge($out[0], $finish);
     }
     return $out;
 }
コード例 #5
0
ファイル: PlayerFunc.php プロジェクト: bluefan/phpsource
 /**
  * 小红点提示
  * @param $player_id
  * @param $type
  * @param $condition
  */
 public function red_icon($player_id, $player_info = null, $player_detail = null)
 {
     if (is_null($player_info)) {
         $player_info = $this->get_data('Player')->get_player_info($player_id, array('silver', 'crystal', 'level', 'fame_level', 'career_type', 'gold', 'online_time'));
     }
     if (is_null($player_detail)) {
         $player_detail = $this->get_data('PlayerDetail')->get_player_detail($player_id, array('func_open', 'equip_wing', 'wing_info', 'skill_info', 'skill_rune_info', 'skill_rune_cote_info', 'dower_info', 'train_info'));
     }
     $prop_list = $this->get_data('PlayerProp')->get_player_prop_by_item_position($player_id);
     //重包裹里去除道具
     $arr_prop_num = array();
     $arr_prop_type = array();
     $func_open = $player_detail['func_open'];
     if ($prop_list) {
         foreach ($prop_list as $prop) {
             $arr_prop_num[$prop['prop_id']] += $prop['item_num'];
             $arr_prop_type[$prop['type']][$prop['sub_type']][] = $prop;
         }
     }
     ##################[翅膀进阶检查]####################
     $wing_id = $player_detail['equip_wing'];
     $out = array();
     if (!empty($wing_id)) {
         if (isset($func_open[111])) {
             $wing_table = Cache_PlayerWing::getInstance()->get_player_wing_info(array('id' => $wing_id, 'level' => $player_detail[$wing_id]['lvl'] + 1));
             if ($wing_table) {
                 $tip = false;
                 if ($wing_table[0]['condition']) {
                     list($type, $condition) = explode("|", $wing_table[0]['condition']);
                     if ($type == 5) {
                         if ($player_info['fame_level'] >= $condition) {
                             $tip = true;
                         }
                     }
                 }
                 if ($tip) {
                     $material_prop = Com_FmtData::format_table_prop($wing_table[0]['condition']);
                     if (Com_Array::is_good_arr($material_prop)) {
                         foreach ($material_prop as $id => $num) {
                             if ($arr_prop_num[$id] >= intval($num)) {
                                 $tip = true;
                             }
                         }
                     }
                 }
                 if ($tip) {
                     $out[] = array('func_id' => 1, 'status' => intval($tip), 'param' => '');
                 }
             }
         }
     }
     ##################[翅膀进阶检查]####################
     ###################[翅膀激活]#######################
     if (isset($func_open[110]) && $player_detail['wing_info']) {
         $tip = false;
         $data = $player_detail['wing_info'];
         foreach ($data as $key => $val) {
             if ($val['activation'] == 0) {
                 #在线时间检测
                 if ($val['condition'][0] == 3) {
                     $data[$key]['condition'][2] = $this->get_game('DailyBoon')->daily_online_time($player_id);
                     if ($data[$key]['condition'][2] >= $data[$key]['condition'][1][0]) {
                         $tip = true;
                     } else {
                         if ($player_info['online_time'] >= $data[$key]['condition'][1][0]) {
                             $tip = true;
                         }
                     }
                 } else {
                     if ($val['condition'][0] == 7) {
                         $data[$key]['condition'][2] = $player_info['level'];
                         if ($data[$key]['condition'][2] >= $data[$key]['condition'][1][0]) {
                             $tip = true;
                         }
                     } else {
                         if ($val['condition'][0] == 6) {
                             #获取翅膀配置表
                             $wing_table_task = $this->get_game('PlayerWing')->get_cache_table_data('player_wing_table', array('id' => $val['id'], 'level' => $val['lvl']));
                             if ($wing_table_task) {
                                 list($type, $task_id) = explode("|", $wing_table_task[0]['condition']);
                                 $task_res = $this->get_game('TaskMain')->task_is_finish($player_id, $task_id);
                                 if ($task_res) {
                                     $tip = true;
                                 }
                             }
                         }
                     }
                 }
                 if ($val['condition'][0] == 4) {
                     #获取翅膀配置表
                     $wing_table = $this->get_game('PlayerWing')->get_cache_table_data('player_wing_table', array('id' => $val['id'], 'level' => 1));
                     if (Com_Array::is_good_arr($wing_table)) {
                         foreach ($wing_table as $wing) {
                             list($type, $value) = explode("|", $wing['condition']);
                             if ($type == 4) {
                                 if ($data[$val['id']]['activation'] != 0) {
                                     continue;
                                 }
                                 $is_activate = true;
                                 $wing_list = explode(":", $value);
                                 if (is_array($wing_list)) {
                                     #检测是否有被激活的翅膀
                                     foreach ($wing_list as $wid) {
                                         if ($data[$wid]['activation'] != 2) {
                                             $is_activate = false;
                                             break;
                                         }
                                     }
                                 } else {
                                     if ($data[$wing_list]['activation'] != 2) {
                                         $is_activate = false;
                                     }
                                 }
                                 #改变隐藏翅膀激活状态
                                 if ($is_activate) {
                                     $tip = true;
                                 }
                             }
                         }
                     }
                 }
                 if ($val['condition'][0] == 2 || $val['condition'][0] == 1) {
                     if ($data[$id]['condition'][2] >= $wing['condition'][1][0]) {
                         $tip = true;
                     }
                 }
             }
             if ($tip == true) {
                 break;
             }
         }
         if ($tip) {
             $out[] = array('func_id' => 15, 'status' => intval($tip), 'param' => '');
         }
     }
     ###################[翅膀激活]#######################
     ###################[翅膀羽炼]#######################
     //        if (isset($func_open[112])) {
     $start = strtotime(SERVER_FIRST_START_TIME);
     list($login_series_max, $login_acc) = $this->get_game('EventCondFunc')->_cal_login_refer($player_id, $start, $this->current_time);
     $deal_log_hash = $this->get_data('Wing')->get_deal_log_by_player_id($player_id);
     $tip = false;
     for ($i = 7; $i <= 8; $i++) {
         $item_list = Cache_PlayerWing::getInstance()->get_wing_equip_gift_info_list($i);
         if ($item_list) {
             foreach ($item_list as $item_info) {
                 $gain_status = 0;
                 # 领取状态:0可领,1条件未达成不可领,2已领取不可领[NOTE:可领只有一种情况,不可领有多种情况,所以这样表示]
                 # 判断达成条件
                 if ($login_acc < $item_info['login_acc'] && empty($deal_log_hash[$item_info['item_id']])) {
                     $tip = true;
                     break 2;
                 }
             }
         }
     }
     if ($tip) {
         $out[] = array('func_id' => 17, 'status' => intval($tip), 'param' => '');
     }
     //        }
     ###################[翅膀羽炼]#######################
     ##################[翅膀装备检查]###################
     $wing_info = $player_detail['wing_info'][$wing_id];
     if (isset($func_open[110]) && $wing_info) {
         $tip = false;
         if ($wing_id == 7 && $wing_id == 8) {
             if (!empty($wing_info['equipment']) && Com_Array::is_good_arr($wing_info['equipment'])) {
                 for ($i = 1; $i <= 7; $i++) {
                     if (!isset($wing_info['equipment'][$i])) {
                         if (isset($arr_prop_type[6][$i]) && count($arr_prop_type[6][$i] > 0)) {
                             foreach ($arr_prop_type[6][$i] as $arr_prop_detail) {
                                 if ($wing_info['lvl'] < $arr_prop_detail['level']) {
                                     $tip = true;
                                     break 2;
                                 }
                             }
                         }
                     }
                 }
             }
         }
         if ($tip) {
             $out[] = array('func_id' => 2, 'status' => intval($tip), 'param' => '');
         }
     }
     ##################[翅膀装备检查]###################
     ##################[英雄]##############################
     if (isset($func_open[20])) {
         $tip = false;
         $hero_list = $this->get_data('PlayerHero')->get_fight_hero($player_id);
         if (!empty($hero_list)) {
             foreach ($hero_list as $hero_id => $hero_code) {
                 $obj_player_hero_data = $this->get_data('PlayerHero');
                 $hero_data = $obj_player_hero_data->get_player_hero_info($player_id, $hero_id);
                 if ($hero_data) {
                     ###################[成长值]#########################################
                     if (isset($func_open[29])) {
                         $hero_conf = Cache_HeroAttr::getInstance()->get_hero_attr_info($hero_data['hero_code']);
                         if ($hero_data['grow_rate'] <= $hero_conf['grow_limit']) {
                             $obj_hero_grow = $this->get_data('PlayerHeroGrow');
                             $hero_grow_id = $obj_hero_grow->get_player_hero_grow_data($hero_id);
                             $hero_grow_conf = array();
                             $findFlag = false;
                             if (!$hero_grow_id) {
                                 $findFlag = true;
                             } else {
                                 $hero_grow_conf = Cache_HeroGrow::getInstance()->get_config_info($hero_grow_id);
                                 if (empty($hero_grow_conf)) {
                                     $findFlag = true;
                                 } else {
                                     if ($hero_data['grow_rate'] < $hero_grow_conf['grow_left'] || $hero_data['grow_rate'] >= $hero_grow_conf['grow_right']) {
                                         #区间错误
                                         $findFlag = true;
                                     }
                                 }
                             }
                             if ($findFlag) {
                                 #启动自动纠错
                                 $hero_grow_id = $this->get_game('Hero')->find_hero_grow_id($hero_data['grow_rate'], $hero_grow_conf);
                             }
                             if ($hero_grow_id) {
                                 $last_props[$hero_grow_conf['item_id']] = intval($arr_prop_num[$hero_grow_conf['item_id']]);
                                 if ($last_props[$hero_grow_conf['item_id']] >= $hero_grow_conf['item_nums']) {
                                     $tip = true;
                                 }
                             }
                             if ($tip) {
                                 $out[] = array('func_id' => 3, 'status' => intval($tip), 'param' => $hero_id);
                             }
                         }
                     }
                     ###################[成长值]#########################################
                     ##################[英雄等级]###############################
                     if (isset($func_open[22])) {
                         $tip = false;
                         $is_culture = $this->get_game('Hero')->is_culture_hero($player_id, $hero_id, $hero_data['hero_code']);
                         if ($is_culture) {
                             if ($hero_data['level'] < $player_info['level']) {
                                 //英雄是否满级
                                 $full_level_res = $this->get_game('Hero')->is_full_level($hero_data['hero_code'], $hero_data['level']);
                                 if (!$full_level_res) {
                                     //是否有同类型已培养的英雄
                                     $upgrade_prop_list = $this->get_game('Hero')->upgrade_prop_list;
                                     foreach ($upgrade_prop_list as $prop_id) {
                                         if (isset($arr_prop_num[$prop_id])) {
                                             $tip = true;
                                             break;
                                         }
                                     }
                                 }
                             }
                         }
                         if ($tip) {
                             $out[] = array('func_id' => 4, 'status' => intval($tip), 'param' => $hero_id);
                         }
                     }
                     ##################[英雄等级]###############################
                     ##################[英雄潜能]###############################
                     if (isset($func_open[23])) {
                         $tip = false;
                         //是否有同类型已培养的英雄
                         if ($is_culture) {
                             for ($i = 1; $i <= 3; $i++) {
                                 $hero_potential_base_table = $this->get_game('Hero')->get_hero_potential_base_table($i, $hero_data['potential_level']);
                                 if ($player_info['silver'] >= $hero_potential_base_table['coin_num']) {
                                     if (!empty($hero_potential_base_table) && $hero_potential_base_table['prop_id'] && $hero_potential_base_table['prop_num']) {
                                         //获取玩家背包中的升级道具数量
                                         $player_prop_num = $arr_prop_num[$hero_potential_base_table['prop_id']];
                                         if ($player_prop_num >= $hero_potential_base_table['prop_num']) {
                                             $attr_max = $this->get_game('Hero')->get_potential_attr_max($hero_data['potential_level'], $i);
                                             if ($hero_data['potential_' . $i] < $attr_max) {
                                                 $tip = true;
                                                 break;
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                         if ($tip) {
                             $out[] = array('func_id' => 5, 'status' => intval($tip), 'param' => $hero_id);
                         }
                     }
                     ##################[英雄潜能]###############################
                     ##################[英雄合体]###############################
                     if (isset($func_open[24])) {
                         $tip = false;
                         if ($is_culture) {
                             $full_stairs_res = $this->get_game('Hero')->is_full_stairs($hero_data['hero_code'], $hero_data['fit']);
                             if (!$full_stairs_res) {
                                 $hero_attr_base = $this->get_game('Hero')->get_hero_attr_table($hero_data['hero_code']);
                                 $fit_table = $this->get_game('Hero')->get_hero_fit_table($hero_attr_base['fit_expend_type'], $hero_data['fit'] + 1);
                                 $player_prop_num = $arr_prop_num[$fit_table['prop_id']];
                                 if ($player_prop_num >= $fit_table['prop_num']) {
                                     $hero_info = $this->get_game('Hero')->get_fit_hero_num($player_id, $hero_id, $hero_data['fit_type'], $hero_data['hero_code'], $hero_data['quality'], $hero_data['quality']);
                                     //英雄是否足够
                                     $is_full_hero_res = $this->get_game('Hero')->is_full_hero($hero_attr_base['fit_expend_type'], $hero_data['fit'] + 1, $hero_info['num']);
                                     if ($is_full_hero_res) {
                                         $tip = true;
                                     }
                                 }
                             }
                         }
                         if ($tip) {
                             $out[] = array('func_id' => 6, 'status' => intval($tip), 'param' => $hero_id);
                         }
                     }
                     ##################[英雄合体]###############################
                     ##################[英雄星级]###############################
                     if (isset($func_open[25])) {
                         $tip = false;
                         if ($is_culture) {
                             $full_level_res = $this->get_game('Hero')->is_full_star($hero_data['hero_code'], $hero_data['star']);
                             if (!$full_level_res) {
                                 $star_table = $this->get_game('Hero')->get_hero_star_table($hero_data['star'] + 1);
                                 if ($star_table && $star_table['prop_id1']) {
                                     $prop_id = $star_table['prop_id1'];
                                     $deduct_coin_num = $star_table['prop_id2'];
                                     $player_prop_num = $arr_prop_num[$prop_id];
                                     if ($player_prop_num >= $star_table['prop_num1']) {
                                         if ($player_info['silver'] >= $deduct_coin_num) {
                                             $tip = true;
                                         }
                                     }
                                 }
                             }
                         }
                         if ($tip) {
                             $out[] = array('func_id' => 7, 'status' => intval($tip), 'param' => $hero_id);
                         }
                     }
                     ##################[英雄星级]###############################
                 }
             }
         }
     }
     ##################[英雄]##################################################
     ##################[女神]#################################################
     if (isset($func_open[30])) {
         $obj_player_fairy_data = $this->get_data('Fairy');
         $fairy_list = $obj_player_fairy_data->get_player_fairy_list($player_id);
         $fairy_id = '';
         if ($fairy_list) {
             foreach ($fairy_list as $val) {
                 $fairy_id = $val['fairy_id'];
                 if (!empty($fairy_id)) {
                     $fairy_info = $this->get_data('Fairy')->get_player_fairy_info($fairy_id);
                     if ($fairy_info) {
                         ##################[女神强化]############################################
                         if ($fairy_info['type'] == 1) {
                             $func_id = 35;
                         } else {
                             $func_id = 36;
                         }
                         if (isset($func_open[$func_id])) {
                             $tip = false;
                             $max_train_lv = Cache_FairyTrain::getInstance()->get_max_train_lv();
                             if (!empty($max_train_lv)) {
                                 $max_train_lv = 100;
                             }
                             if ($fairy_info['train_level'] < $max_train_lv) {
                                 $trainConfigs = $this->get_game('Fairy')->get_cache_table_data('fairy_train_table', array("lvl" => $fairy_info['train_level']));
                                 if ($trainConfigs[0] || !empty($trainConfigs[0]['expend'])) {
                                     $train_config = $trainConfigs[0];
                                     // 消耗需求
                                     $cost_material = explode("|", $train_config['expend']);
                                     //升级下一级消耗
                                     $costItemInfo = explode(':', $cost_material[0]);
                                     //道具消耗
                                     $costGoldInfo = !empty($cost_material[1]) ? explode(':', $cost_material[1]) : 0;
                                     //金币消耗
                                     if ($fairy_info['level'] >= $train_config['fairy_lvl']) {
                                         $cost_item_id = $costItemInfo[0];
                                         $cost_item_num = intval($costItemInfo[1]);
                                         $player_prop_num = $arr_prop_num[$cost_item_id];
                                         $cost_silver_num = is_array($costGoldInfo) ? intval($costGoldInfo[1]) : 0;
                                         if ($player_info['silver'] >= $cost_silver_num) {
                                             if ($player_prop_num >= $cost_item_num) {
                                                 $tip = true;
                                             }
                                         }
                                     }
                                 }
                             }
                             if ($tip) {
                                 $out[] = array('func_id' => 8, 'status' => intval($tip), 'param' => $fairy_id);
                             }
                         }
                         ##################[女神强化]############################################
                         ##################[女神培养]############################################
                         if (isset($func_open[31])) {
                             $tip = false;
                             $fairy_level_table = $this->get_game('Fairy')->get_fairy_lvl_tabel_data($fairy_info['fairy_code'], $fairy_info['star']);
                             if ($fairy_level_table) {
                                 if ($player_info['fame_level'] >= $fairy_level_table['fame']) {
                                     $item_data = array();
                                     $get_item_res = $this->get_game('Fairy')->get_item_data($fairy_info['fairy_code'], $fairy_info['star'], $item_data);
                                     if ($get_item_res == true) {
                                         $prop_id = $item_data['item'];
                                         $prop_num = $item_data['count'];
                                         $coin = $item_data['coin'];
                                         if ($item_data['fame'] > 0) {
                                             $coin = 0;
                                         }
                                         if ($prop_id && $prop_num) {
                                             if ($arr_prop_num[$prop_id] >= $prop_num) {
                                                 if ($player_info['silver'] >= $coin) {
                                                     $tip = true;
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                             if ($tip) {
                                 $out[] = array('func_id' => 9, 'status' => intval($tip), 'param' => $fairy_id);
                             }
                         }
                         ##################[女神培养]############################################
                         ##################[女神符文位置]############################################
                         if (isset($func_open[31])) {
                             $tip = false;
                             if (Com_Array::is_good_arr($fairy_info['combination_list'])) {
                                 foreach ($fairy_info['combination_list'] as $value) {
                                     if ($value['state'] == 1) {
                                         $tip = true;
                                     }
                                 }
                             }
                             if ($tip) {
                                 $out[] = array('func_id' => 16, 'status' => intval($tip), 'param' => $fairy_id);
                             }
                         }
                         ##################[女神符文位置]############################################
                     }
                 }
             }
         }
     }
     ##################[女神]#################################################
     ########################[技能]##########################################
     $skill_list_all = Cache_Skill::getInstance()->get_skill_list($player_info['career_type']);
     $skill_list_distinct = Cache_Skill::getInstance()->get_distinct_skill_list($player_info['career_type'], 1);
     $skill_hash_all = $this->get_game('PlayerSkill')->convert_skill_list_to_hash($skill_list_all);
     $tip = false;
     foreach ($skill_list_distinct as $val) {
         if ($val['display'] == 0) {
             continue;
         }
         $skill_id = $val['sid'];
         $data['skill_status'] = 0;
         if (isset($player_detail['skill_info'][$skill_id]['level'])) {
             //已激活
             $data['skill_status'] = 1;
             $data['skill_level'] = $player_detail['skill_info'][$skill_id]['level'];
         }
         if ($data['skill_status'] > 0) {
             if ($data['skill_level'] < $skill_hash_all[$skill_id][$data['skill_level']]['max_level'] && $player_info['level'] >= $skill_hash_all[$skill_id][$data['skill_level'] + 1]['unlock'] && $player_info['silver'] >= $skill_hash_all[$skill_id][$data['skill_level'] + 1]['levelup_cost_silver'] && $player_info['crystal'] >= $skill_hash_all[$skill_id][$data['skill_level'] + 1]['levelup_cost_skill_point']) {
                 $tip = true;
                 break;
             }
         }
     }
     if ($tip) {
         $out[] = array('func_id' => 10, 'status' => intval($tip), 'param' => '');
     }
     ########################[技能]##########################################
     ########################[天赋]##########################################
     $tip = false;
     $active_dower_list = $this->get_data('PlayerDower')->get_player_dower($player_id);
     $dower_list_all = Cache_Dower::getInstance()->get_dower_list($player_info['career_type']);
     $dower_list_distinct = Cache_Dower::getInstance()->get_distinct_dower_list($player_info['career_type'], 0);
     //        $dower_hash_all = $this->get_game('PlayerSkill')->convert_dower_list_to_hash($dower_list_all);
     if (!empty($dower_list_distinct)) {
         foreach ($dower_list_distinct as $val) {
             $dower_id = $val['sid'];
             if (isset($active_dower_list[$dower_id])) {
                 $active_dower_list[$dower_id]['dower_lv'] += 1;
             } else {
                 $active_dower_list[$dower_id] = array('dower_id' => $dower_id, 'dower_lv' => 1, 'player_id' => $player_id);
             }
             # 获取天赋配置信息
             $dower_info = Cache_Dower::getInstance()->get_dower_info($dower_id, $active_dower_list[$dower_id]['dower_lv'], 0);
             if ($player_info['level'] > $dower_info['unlock']) {
                 if ($player_info['crystal'] >= $dower_info['cost_crystal']) {
                     if (!empty($dower_info['item_id']) && !empty($dower_info['item_num'])) {
                         $player_prop_num = $arr_prop_num[$dower_info['item_id']];
                         if ($player_prop_num >= $dower_info['item_num']) {
                             $tip = true;
                             break;
                         }
                     }
                 }
             }
         }
         if ($tip) {
             $out[] = array('func_id' => 11, 'status' => intval($tip), 'param' => '');
         }
     }
     ########################[圣器]##########################################
     $trains = $player_detail['train_info'];
     if ($trains) {
         foreach ($trains as $train_type => $train) {
             $train_rank = $train['train_rank'];
             foreach ($train['train_detail'] as $train_attr_seq => $train_detail) {
                 $train_step = $train_detail[$train_attr_seq]['train_step'] + 1;
                 $train_detail = Cache_Train::getInstance()->get_train_detail($train_type, $train_rank, $train_attr_seq, $train_step);
                 if ($train_detail) {
                     if (!empty($train_detail['require_player_level']) && $player_info['level'] >= $train_detail['require_player_level']) {
                         $cost_currency_value = Formula_Train::get_strengthen_train_cost();
                         $cost_currency_key = Cache_Currency::getInstance()->get_key($this->get_game('Train')->get_strengthen_train_cost_cur_type());
                         if ($player_info[$cost_currency_key] >= $cost_currency_value) {
                             if ($player_info['silver'] >= $train_detail['consume_silver']) {
                                 if (!empty($train_detail['consume_item_id'])) {
                                     if ($arr_prop_num[$train_detail['consume_item_id']] >= $train_detail['consume_item_num']) {
                                         if ($train_type == 1) {
                                             $out[] = array('func_id' => 12, 'status' => intval($tip), 'param' => '');
                                         }
                                         if ($train_type == 2) {
                                             $out[] = array('func_id' => 13, 'status' => intval($tip), 'param' => '');
                                         }
                                         if ($train_type == 3) {
                                             $out[] = array('func_id' => 14, 'status' => intval($tip), 'param' => '');
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     ########################[圣器]#########################################
     return $out;
 }