This commit is contained in:
aozhiwei 2022-05-25 21:50:44 +08:00
parent 01c00b12af
commit 5cf43a7e50
2 changed files with 33 additions and 2 deletions

24
webapp/mt/FormulaPvp.php Normal file
View File

@ -0,0 +1,24 @@
<?php
namespace mt;
use phpcommon;
class FormulaPvp {
public static function get($id)
{
return array_key_exists($id, self::getMetaList()) ? self::getMetaList()[$id] : null;
}
protected static function getMetaList()
{
if (!self::$metaList) {
self::$metaList = getMetaTable('pvp@formula.php');
}
return self::$metaList;
}
protected static $metaList;
}

View File

@ -14,12 +14,19 @@ class FormulaService extends BaseService {
return 0;
}
public static function calcHeroPvpCeg($heroDb)
public static function calcHeroPvpCeg($heroDb, $params)
{
//PVP角色NFT每日获得极限*(50%*[每局排名TopX%对应比例]+25%*[每局PK人数排名TopX%对应比例]+15%*[每局英雄属性排名TopX%对应比例]+5%*[每局武器属性排名TopX%对应比例]+5%*[每局存活时间排名TopX%对应比例])
$upLimit = getXVal($params, 'uplimit');
$ranked = getXVal($params, 'ranked');
$killsRanked = getXVal($params, 'kills_ranked');
$heroRanked = getXVal($params, 'hero_ranked');
$weaponRanked = getXVal($params, 'weapon_ranked');
$aliveRanked = getXVal($params, 'alive_ranked');
return 0;
}
public static function calcHeroPveCeg($heroDb)
public static function calcHeroPveCeg($heroDb, $uplimit)
{
return 0;
}