bnstooltips 1.18.3 → 1.18.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.es.js +22 -18
- package/build/index.es.js.map +1 -1
- package/build/index.js +22 -18
- package/build/index.js.map +1 -1
- package/build/itemapiclient/ItemApiClient.d.ts +2 -0
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -2038,6 +2038,7 @@ var ItemImproveEffectOptionDto = /** @class */ (function () {
|
|
|
2038
2038
|
this.isEffect = _data["isEffect"];
|
|
2039
2039
|
this.effectDescription = _data["effectDescription"];
|
|
2040
2040
|
this.icon = _data["icon"] ? ItemIconDto.fromJS(_data["icon"]) : undefined;
|
|
2041
|
+
this.isPercentage = _data["isPercentage"];
|
|
2041
2042
|
}
|
|
2042
2043
|
};
|
|
2043
2044
|
ItemImproveEffectOptionDto.fromJS = function (data) {
|
|
@@ -2053,6 +2054,7 @@ var ItemImproveEffectOptionDto = /** @class */ (function () {
|
|
|
2053
2054
|
data["isEffect"] = this.isEffect;
|
|
2054
2055
|
data["effectDescription"] = this.effectDescription;
|
|
2055
2056
|
data["icon"] = this.icon ? this.icon.toJSON() : undefined;
|
|
2057
|
+
data["isPercentage"] = this.isPercentage;
|
|
2056
2058
|
return data;
|
|
2057
2059
|
};
|
|
2058
2060
|
return ItemImproveEffectOptionDto;
|
|
@@ -7225,10 +7227,18 @@ function ItemImproveEffectsTooltip(_a) {
|
|
|
7225
7227
|
subGroupTexts.push(React__default["default"].createElement("div", { className: "ItemImproveEffectsTooltip_entry", dangerouslySetInnerHTML: { __html: effect.effectDescription } }));
|
|
7226
7228
|
}
|
|
7227
7229
|
else {
|
|
7230
|
+
if (effect.statName.includes("-min"))
|
|
7231
|
+
return;
|
|
7232
|
+
var statValue = effect.statValue;
|
|
7233
|
+
//minmax
|
|
7234
|
+
if (effect.statName.includes("-max")) {
|
|
7235
|
+
var minVal = itemName.effects.find(function (x) { return x.statName === effect.statName.replace("-max", "-min"); }).statValue;
|
|
7236
|
+
statValue = (effect.statValue + minVal) / 2;
|
|
7237
|
+
}
|
|
7228
7238
|
subGroupTexts.push(React__default["default"].createElement("div", { className: "ItemImproveEffectsTooltip_entry 00008130.UI.Label_Green03_12" },
|
|
7229
|
-
React__default["default"].createElement("span", null, effect.
|
|
7239
|
+
React__default["default"].createElement("span", null, GetStatDisplayValue(statValue, effect.isPercentage)),
|
|
7230
7240
|
"\u00A0",
|
|
7231
|
-
React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: effect.statName } })));
|
|
7241
|
+
React__default["default"].createElement("span", { dangerouslySetInnerHTML: { __html: ReplaceBossAndPvpAp(effect.statName).replace("Max.", "").trim() } })));
|
|
7232
7242
|
}
|
|
7233
7243
|
});
|
|
7234
7244
|
var subGroup = {
|
|
@@ -8012,32 +8022,23 @@ function FilterStones(stones) {
|
|
|
8012
8022
|
}
|
|
8013
8023
|
|
|
8014
8024
|
function ItemUpgradeEffects(props) {
|
|
8015
|
-
var _this = this;
|
|
8016
8025
|
var _a = React.useState(undefined), effectData = _a[0], setEffectData = _a[1];
|
|
8017
8026
|
var _b = React.useState(false), loading = _b[0], setLoading = _b[1];
|
|
8018
8027
|
var _c = React.useState(true), fresh = _c[0], setFresh = _c[1];
|
|
8019
|
-
React.useEffect(function () {
|
|
8020
|
-
if (props.client)
|
|
8021
|
-
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
8022
|
-
return __generator(this, function (_a) {
|
|
8023
|
-
return [2 /*return*/];
|
|
8024
|
-
});
|
|
8025
|
-
}); })();
|
|
8026
|
-
}, [props, props.id, props.level, props.client]);
|
|
8027
8028
|
function LoadEffectOptions() {
|
|
8028
8029
|
return __awaiter(this, void 0, void 0, function () {
|
|
8029
8030
|
var result, itemImproveEffectsForName_1;
|
|
8030
|
-
return __generator(this, function (
|
|
8031
|
-
switch (
|
|
8031
|
+
return __generator(this, function (_b) {
|
|
8032
|
+
switch (_b.label) {
|
|
8032
8033
|
case 0:
|
|
8033
8034
|
setLoading(true);
|
|
8034
8035
|
setFresh(false);
|
|
8035
|
-
|
|
8036
|
+
_b.label = 1;
|
|
8036
8037
|
case 1:
|
|
8037
|
-
|
|
8038
|
+
_b.trys.push([1, 3, 4, 5]);
|
|
8038
8039
|
return [4 /*yield*/, props.client.GetAllItemImproveEffectOptionsForItem(props.id, props.level)];
|
|
8039
8040
|
case 2:
|
|
8040
|
-
result =
|
|
8041
|
+
result = _b.sent();
|
|
8041
8042
|
if (result && result.itemImproveEffectOptions && result.itemImproveEffectOptions.length > 0) {
|
|
8042
8043
|
itemImproveEffectsForName_1 = [];
|
|
8043
8044
|
result.itemImproveEffectOptions.sort(function (a, b) { return a.index - b.index; }).forEach(function (effectOption) {
|
|
@@ -8051,11 +8052,14 @@ function ItemUpgradeEffects(props) {
|
|
|
8051
8052
|
else {
|
|
8052
8053
|
setEffectData(undefined);
|
|
8053
8054
|
}
|
|
8054
|
-
return [3 /*break*/,
|
|
8055
|
+
return [3 /*break*/, 5];
|
|
8055
8056
|
case 3:
|
|
8057
|
+
_b.sent();
|
|
8058
|
+
return [3 /*break*/, 5];
|
|
8059
|
+
case 4:
|
|
8056
8060
|
setLoading(false);
|
|
8057
8061
|
return [7 /*endfinally*/];
|
|
8058
|
-
case
|
|
8062
|
+
case 5: return [2 /*return*/];
|
|
8059
8063
|
}
|
|
8060
8064
|
});
|
|
8061
8065
|
});
|