1
This commit is contained in:
parent
adbb0ea437
commit
1b828d3502
@ -257,9 +257,24 @@ class Chip extends BaseModel
|
|||||||
$attribute = \mt\EconomyAttribute::getAttribute($chipAttrMeta['economyAttribute'],$quality);
|
$attribute = \mt\EconomyAttribute::getAttribute($chipAttrMeta['economyAttribute'],$quality);
|
||||||
{
|
{
|
||||||
$randAttr = array();
|
$randAttr = array();
|
||||||
$randMeta = mt\BattleRandAttribute::getByWeight($chipAttrMeta['battleAttribute'],$quality);
|
// $randMeta = mt\BattleRandAttribute::getByWeight($chipAttrMeta['battleAttribute'],$quality);
|
||||||
if ($randMeta){
|
// if ($randMeta){
|
||||||
$randAttr = mt\BattleRandAttribute::getRandAttr($randMeta);
|
// $randAttr = mt\BattleRandAttribute::getRandAttr($randMeta);
|
||||||
|
// }
|
||||||
|
for ($i=1;$i<=$quality;$i++){
|
||||||
|
$randMeta = mt\BattleRandAttribute::getByWeight($chipAttrMeta['battleAttribute'],$i);
|
||||||
|
if ($randMeta) {
|
||||||
|
$result = mt\BattleRandAttribute::getRandAttr($randMeta);
|
||||||
|
if ($result){
|
||||||
|
foreach ($result as $value){
|
||||||
|
if (isset($randAttr[$value['attr_id']])){
|
||||||
|
$randAttr[$value['attr_id']]['val'] += $value['val'];
|
||||||
|
}else{
|
||||||
|
$randAttr[$value['attr_id']] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$fieldsKv = array(
|
$fieldsKv = array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user