33 lines
726 B
PHP
33 lines
726 B
PHP
<?php
|
|
|
|
namespace mt;
|
|
|
|
use phpcommon;
|
|
|
|
class QualityUpMapRule {
|
|
const MAX_QUALITY = 6;
|
|
|
|
public static function getByQuality($heroId,$quality)
|
|
{
|
|
foreach (self::getMetaList() as $meta){
|
|
if ($meta['targetItem'] == $heroId && $quality == $meta['quality']){
|
|
return $meta;
|
|
}
|
|
}
|
|
return array();
|
|
}
|
|
|
|
protected static function getMetaList()
|
|
{
|
|
if (!self::$metaList) {
|
|
self::$metaList = getMetaTable('qualityUpMapRule@qualityUpMapRule.php');
|
|
}
|
|
return self::$metaList;
|
|
}
|
|
|
|
protected static $metaList;
|
|
protected static $qualityHash;
|
|
protected static $coefficientHash;
|
|
|
|
}
|