1
This commit is contained in:
parent
cad0ae2477
commit
3a02badc59
@ -184,9 +184,6 @@ class Hero extends BaseModel {
|
|||||||
}
|
}
|
||||||
$heroLucky = \services\FormulaService::Hero_Advanced_Lucky_Value($row['quality']);
|
$heroLucky = \services\FormulaService::Hero_Advanced_Lucky_Value($row['quality']);
|
||||||
$dto = array(
|
$dto = array(
|
||||||
'rand_attr' => $row['rand_attr'],
|
|
||||||
'attr_pro1' => $attrPro1,
|
|
||||||
'attr_pro2' => $attrPro2,
|
|
||||||
'idx' => $row['idx'],
|
'idx' => $row['idx'],
|
||||||
'token_id' => $row['token_id'],
|
'token_id' => $row['token_id'],
|
||||||
'hero_uniid' => $row['idx'],
|
'hero_uniid' => $row['idx'],
|
||||||
@ -519,9 +516,10 @@ class Hero extends BaseModel {
|
|||||||
private static function getAttrProByLevel($row,$baseAttr,$attr){
|
private static function getAttrProByLevel($row,$baseAttr,$attr){
|
||||||
$attrPro1 = [];
|
$attrPro1 = [];
|
||||||
$coefficient_level = mt\HeroLevelAttr::getCoefficientByLevel($row['hero_lv'],$row['hero_id']);
|
$coefficient_level = mt\HeroLevelAttr::getCoefficientByLevel($row['hero_lv'],$row['hero_id']);
|
||||||
|
|
||||||
foreach ($baseAttr as $val){
|
foreach ($baseAttr as $val){
|
||||||
$coef_level = mt\HeroLevelAttr::getByCoefficient($coefficient_level,$val['attr_id']);
|
|
||||||
foreach ($attr as $v){
|
foreach ($attr as $v){
|
||||||
|
$coef_level = mt\HeroLevelAttr::getByCoefficient($coefficient_level,$val['attr_id']);
|
||||||
// if ($val['attr_id'] == $v['attr_id'] && $val['attr_id'] == kHAT_Atk){ //18 //18.941564456287 //20.847692307692
|
// if ($val['attr_id'] == $v['attr_id'] && $val['attr_id'] == kHAT_Atk){ //18 //18.941564456287 //20.847692307692
|
||||||
// array_push($attrPro1,[
|
// array_push($attrPro1,[
|
||||||
// 'attr_id' => $val['attr_id'],
|
// 'attr_id' => $val['attr_id'],
|
||||||
|
@ -24,8 +24,11 @@ class HeroLevelAttr {
|
|||||||
|
|
||||||
public static function getByCoefficient($data,$index)
|
public static function getByCoefficient($data,$index)
|
||||||
{
|
{
|
||||||
self::mustBeCoefficientHash($data);
|
foreach ($data as $val){
|
||||||
return getXVal(self::$coefficientHash, $index, null);
|
if ($val['attr_id'] == $index){
|
||||||
|
return $val;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getCoefficientByLevel($level,$hero_id){
|
public static function getCoefficientByLevel($level,$hero_id){
|
||||||
|
@ -19,8 +19,13 @@ class HeroQuality {
|
|||||||
|
|
||||||
public static function getByCoefficient($data,$index)
|
public static function getByCoefficient($data,$index)
|
||||||
{
|
{
|
||||||
self::mustBeCoefficientHash($data);
|
foreach ($data as $val){
|
||||||
return getXVal(self::$coefficientHash, $index, null);
|
if ($val['attr_id'] == $index){
|
||||||
|
return $val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// self::mustBeCoefficientHash($data);
|
||||||
|
// return getXVal(self::$coefficientHash, $index, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getCoefficientByQuality($quality,$hero_id){
|
public static function getCoefficientByQuality($quality,$hero_id){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user