完成getSeasonPoint改造
This commit is contained in:
parent
7dc6645b6a
commit
57282adc92
@ -2,7 +2,10 @@
|
||||
|
||||
require 'classes/Quest.php';
|
||||
require 'classes/AddReward.php';
|
||||
|
||||
require_once 'metatable/parameter.php';
|
||||
require_once('mt/SeasonPoint.php');
|
||||
|
||||
class FriendController extends BaseAuthedController {
|
||||
|
||||
|
||||
@ -23,19 +26,6 @@ class FriendController extends BaseAuthedController {
|
||||
return $conns;
|
||||
}
|
||||
|
||||
protected function getSeasonPoint($seaPoint_id)
|
||||
{
|
||||
$seaPoint_meta_table = require('../res/seasomPoint@seasomPoint.php');
|
||||
$seaPoint_meta = getSeasonPointConfig($seaPoint_meta_table, $seaPoint_id);
|
||||
$seaPoint = array(
|
||||
'id' => $seaPoint_meta['id'],
|
||||
'min' => $seaPoint_meta['min_point'],
|
||||
'max' => $seaPoint_meta['max_point'],
|
||||
'des' => $seaPoint_meta['des'],
|
||||
);
|
||||
return $seaPoint;
|
||||
}
|
||||
|
||||
public function selectUserInfo()
|
||||
{
|
||||
$target_id = $_REQUEST['target_id'];
|
||||
|
@ -7,6 +7,7 @@ require_once 'metatable/drop.php';
|
||||
require 'classes/AddReward.php';
|
||||
|
||||
require_once('mt/Parameter.php');
|
||||
require_once('mt/SeasonPoint.php');
|
||||
|
||||
class HangController extends BaseAuthedController {
|
||||
|
||||
@ -25,21 +26,6 @@ class HangController extends BaseAuthedController {
|
||||
|
||||
}
|
||||
|
||||
protected function getSeasonPoint($seaPoint_id)
|
||||
{
|
||||
$seaPoint_meta_table = require('../res/seasomPoint@seasomPoint.php');
|
||||
$seaPoint_meta = getSeasonPointConfig($seaPoint_meta_table, $seaPoint_id);
|
||||
$seaPoint = array(
|
||||
'id' => $seaPoint_meta['id'],
|
||||
'min' => $seaPoint_meta['min_point'],
|
||||
'max' => $seaPoint_meta['max_point'],
|
||||
'des' => $seaPoint_meta['des'],
|
||||
//'reward' => $seaPoint_meta['season_reward'],
|
||||
//'weekreward' => $seaPoint_meta['week_reward'],
|
||||
);
|
||||
return $seaPoint;
|
||||
}
|
||||
|
||||
public function getTime()
|
||||
{
|
||||
$account_id = $_REQUEST['account_id'];
|
||||
|
@ -7,6 +7,7 @@ require_once 'metatable/season.php';
|
||||
require_once 'metatable/seasoncard.php';
|
||||
|
||||
require_once('mt/Season.php');
|
||||
require_once('mt/SeasonPoint.php');
|
||||
|
||||
class PassController extends BaseAuthedController {
|
||||
|
||||
@ -24,21 +25,6 @@ class PassController extends BaseAuthedController {
|
||||
return $arr;
|
||||
}
|
||||
|
||||
protected function getSeasonPoint($seaPoint_id)
|
||||
{
|
||||
$seaPoint_meta_table = require('../res/seasomPoint@seasomPoint.php');
|
||||
$seaPoint_meta = getSeasonPointConfig($seaPoint_meta_table, $seaPoint_id);
|
||||
$seaPoint = array(
|
||||
'id' => $seaPoint_meta['id'],
|
||||
'min' => $seaPoint_meta['min_point'],
|
||||
'max' => $seaPoint_meta['max_point'],
|
||||
'des' => $seaPoint_meta['des'],
|
||||
//'reward' => $seaPoint_meta['season_reward'],
|
||||
//'weekreward' => $seaPoint_meta['week_reward'],
|
||||
);
|
||||
return $seaPoint;
|
||||
}
|
||||
|
||||
public function getPassInfo()
|
||||
{
|
||||
$account_id = $_REQUEST['account_id'];
|
||||
|
@ -1,23 +1,11 @@
|
||||
<?php
|
||||
|
||||
require 'classes/AddReward.php';
|
||||
|
||||
require_once('mt/SeasonPoint.php');
|
||||
|
||||
class RankController extends BaseAuthedController {
|
||||
|
||||
|
||||
|
||||
protected function getSeasonPoint($seaPoint_id)
|
||||
{
|
||||
$seaPoint_meta_table = require('../res/seasomPoint@seasomPoint.php');
|
||||
$seaPoint_meta = getSeasonPointConfig($seaPoint_meta_table, $seaPoint_id);
|
||||
$seaPoint = array(
|
||||
'id' => $seaPoint_meta['id'],
|
||||
'min' => $seaPoint_meta['min_point'],
|
||||
'max' => $seaPoint_meta['max_point'],
|
||||
'des' => $seaPoint_meta['des'],
|
||||
);
|
||||
return $seaPoint;
|
||||
}
|
||||
|
||||
|
||||
public function rankInfo()
|
||||
{
|
||||
$account_id = $_REQUEST['account_id'];
|
||||
|
@ -8,6 +8,7 @@ require_once('mt/Parameter.php');
|
||||
require_once('mt/Drop.php');
|
||||
require_once('mt/EquipUpgrade.php');
|
||||
require_once('mt/Season.php');
|
||||
require_once('mt/SeasonPoint.php');
|
||||
|
||||
class RoleController extends BaseAuthedController {
|
||||
|
||||
@ -24,21 +25,6 @@ class RoleController extends BaseAuthedController {
|
||||
return $arr;
|
||||
}
|
||||
|
||||
protected function getSeasonPoint($seaPoint_id)
|
||||
{
|
||||
$seaPoint_meta_table = require('../res/seasomPoint@seasomPoint.php');
|
||||
$seaPoint_meta = getSeasonPointConfig($seaPoint_meta_table, $seaPoint_id);
|
||||
$seaPoint = array(
|
||||
'id' => $seaPoint_meta['id'],
|
||||
'min' => $seaPoint_meta['min_point'],
|
||||
'max' => $seaPoint_meta['max_point'],
|
||||
'des' => $seaPoint_meta['des'],
|
||||
'topoint' => $seaPoint_meta['topoint'],
|
||||
'is_protect' => $seaPoint_meta['is_protect'],
|
||||
);
|
||||
return $seaPoint;
|
||||
}
|
||||
|
||||
protected function getRankReward($rank)
|
||||
{
|
||||
$rank_meta_table = require('../res/rankReward@rankReward.php');
|
||||
|
@ -5,6 +5,7 @@ require 'classes/AddReward.php';
|
||||
|
||||
require_once('mt/Parameter.php');
|
||||
require_once('mt/Season.php');
|
||||
require_once('mt/SeasonPoint.php');
|
||||
|
||||
class SignController extends BaseAuthedController {
|
||||
|
||||
@ -64,21 +65,6 @@ class SignController extends BaseAuthedController {
|
||||
return $sh;
|
||||
}
|
||||
|
||||
protected function getSeasonPoint($seaPoint_id)
|
||||
{
|
||||
$seaPoint_meta_table = require('../res/seasomPoint@seasomPoint.php');
|
||||
$seaPoint_meta = getSeasonPointConfig($seaPoint_meta_table, $seaPoint_id);
|
||||
$seaPoint = array(
|
||||
'id' => $seaPoint_meta['id'],
|
||||
'min' => $seaPoint_meta['min_point'],
|
||||
'max' => $seaPoint_meta['max_point'],
|
||||
'des' => $seaPoint_meta['des'],
|
||||
'topoint' => $seaPoint_meta['topoint'],
|
||||
//'weekreward' => $seaPoint_meta['week_reward'],
|
||||
);
|
||||
return $seaPoint;
|
||||
}
|
||||
|
||||
protected function insertSign($account_id, $sign_days)
|
||||
{
|
||||
$conn = $this->getMysql($account_id);
|
||||
|
37
webapp/mt/SeasonPoint.php
Normal file
37
webapp/mt/SeasonPoint.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace mt;
|
||||
|
||||
use phpcommon;
|
||||
|
||||
class SeasonPoint {
|
||||
|
||||
public static function get($id)
|
||||
{
|
||||
return array_key_exists($id, self::getMetaList()) ? self::getMetaList()[$id] : null;
|
||||
}
|
||||
|
||||
public static function getOldSeasonPoint($id)
|
||||
{
|
||||
$meta = self::get($id);
|
||||
return array(
|
||||
'id' => $meta['id'],
|
||||
'min' => $meta['min_point'],
|
||||
'max' => $meta['max_point'],
|
||||
'des' => $meta['des'],
|
||||
'topoint' => $meta['topoint'],
|
||||
'is_protect' => $meta['is_protect'],
|
||||
);
|
||||
}
|
||||
|
||||
protected static function getMetaList()
|
||||
{
|
||||
if (!self::$metaList) {
|
||||
self::$metaList = getMetaTable('seasomPoint@seasomPoint.php');
|
||||
}
|
||||
return self::$metaList;
|
||||
}
|
||||
|
||||
protected static $metaList;
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user