30 lines
598 B
PHP
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;
|
|
|
|
}
|