fix:修正getItemEffectValue
This commit is contained in:
parent
7aee907d5d
commit
234af3319f
@ -46,16 +46,14 @@ items.prototype.getItemEffectValue = function (itemId, ratio) {
|
|||||||
statusName = statusName.slice(0, -2);
|
statusName = statusName.slice(0, -2);
|
||||||
}
|
}
|
||||||
if (core.status.hero.hasOwnProperty(statusName)) {
|
if (core.status.hero.hasOwnProperty(statusName)) {
|
||||||
for (var i = 0; i < itemNum; ++i) {
|
try {
|
||||||
try {
|
statusValue = eval(effect);
|
||||||
statusValue = eval(effect);
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
console.error(e);
|
|
||||||
}
|
|
||||||
if (needRatio) statusValue *= ratio;
|
|
||||||
effectObj[statusName] = statusValue;
|
|
||||||
}
|
}
|
||||||
|
catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
if (needRatio) statusValue *= ratio;
|
||||||
|
effectObj[statusName] = statusValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return effectObj;
|
return effectObj;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user