game2006api/webapp/mt/CircuitReward.php
hujiabin c47af32a59 1
2024-09-19 15:56:26 +08:00

30 lines
598 B
PHP

<?php
namespace mt;
use phpcommon;
class CircuitReward {
public static function getRewardWeight($ranking){
$rewardWeight = 0;
foreach (self::getMetaList() as $meta){
if ($ranking >= $meta['rankMin']){
$rewardWeight = $meta['rewardWeight'];
}
}
return $rewardWeight;
}
protected static function getMetaList()
{
if (!self::$metaList) {
self::$metaList = getMetaTable('circuitReward@circuitReward.php');
}
return self::$metaList;
}
protected static $metaList;
}