admin 發表於 2016-11-14 10:52:56

RE: 对新版探险改革的满意度调查

case 1:
                                $eventSize                = mt_rand(0, 100);
                $factor                        = 0;
                                if(10 < $eventSize)
                                {
                                        $Message        = $LNG['sys_expe_found_ress_1_'.mt_rand(1,4)];
                                        $factor                = mt_rand(10, 50);
                                }
                                elseif(0 < $eventSize && 10 >= $eventSize)
                                {
                                        $Message        = $LNG['sys_expe_found_ress_2_'.mt_rand(1,3)];
                                        $factor                = mt_rand(50, 100);
                                }
                                elseif(0 == $eventSize)
                                {
                                        $Message        = $LNG['sys_expe_found_ress_3_'.mt_rand(1,2)];
                                        $factor                = mt_rand(100, 200);
                                }
                                $chanceToFound        = mt_rand(1, 6);
                                if($chanceToFound > 3)
                                {
                                        $resourceId        = 901;
                                }
                                elseif($chanceToFound > 1)
                                {
                                        $resourceId        = 902;
                                        $factor                = $factor / 2;
                                }
                                else
                                {
                                        $resourceId        = 903;
                                        $factor                = $factor / 3;
                                }
                                $sql                = "SELECT MAX(total_points) as total FROM %%STATPOINTS%%
                                WHERE `stat_type` = :type AND `universe` = :universe;";
                                $topPoints        = Database::get()->selectSingle($sql, array(
                                        ':type'                => 1,
                                        ':universe'        => $this->_fleet['fleet_universe']
                                ), 'total');
                                if($topPoints > 5000000)
                                {
                                        $maxFactor                = 12000;
                                }
                                elseif($topPoints > 1000000)
                                {
                                        $maxFactor                = 9000;
                                }
                                elseif($topPoints > 100000)
                                {
                                        $maxFactor                = 6000;
                                }
                                else
                                {
                                        $maxFactor                = 2400;
                                }
                                $founded                = round(min($maxFactor, max(200, $factor)) * $fleetPoints);
                                $fleetColName        = 'fleet_resource_'.$resource[$resourceId];
                                $this->UpdateFleet($fleetColName, $this->_fleet[$fleetColName] + $founded);
                        break;
頁: 1 [2]
檢視完整版本: 对新版探险改革的满意度调查