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 CHANGED
@@ -2030,6 +2030,7 @@ var ItemImproveEffectOptionDto = /** @class */ (function () {
2030
2030
  this.isEffect = _data["isEffect"];
2031
2031
  this.effectDescription = _data["effectDescription"];
2032
2032
  this.icon = _data["icon"] ? ItemIconDto.fromJS(_data["icon"]) : undefined;
2033
+ this.isPercentage = _data["isPercentage"];
2033
2034
  }
2034
2035
  };
2035
2036
  ItemImproveEffectOptionDto.fromJS = function (data) {
@@ -2045,6 +2046,7 @@ var ItemImproveEffectOptionDto = /** @class */ (function () {
2045
2046
  data["isEffect"] = this.isEffect;
2046
2047
  data["effectDescription"] = this.effectDescription;
2047
2048
  data["icon"] = this.icon ? this.icon.toJSON() : undefined;
2049
+ data["isPercentage"] = this.isPercentage;
2048
2050
  return data;
2049
2051
  };
2050
2052
  return ItemImproveEffectOptionDto;
@@ -7217,10 +7219,18 @@ function ItemImproveEffectsTooltip(_a) {
7217
7219
  subGroupTexts.push(React.createElement("div", { className: "ItemImproveEffectsTooltip_entry", dangerouslySetInnerHTML: { __html: effect.effectDescription } }));
7218
7220
  }
7219
7221
  else {
7222
+ if (effect.statName.includes("-min"))
7223
+ return;
7224
+ var statValue = effect.statValue;
7225
+ //minmax
7226
+ if (effect.statName.includes("-max")) {
7227
+ var minVal = itemName.effects.find(function (x) { return x.statName === effect.statName.replace("-max", "-min"); }).statValue;
7228
+ statValue = (effect.statValue + minVal) / 2;
7229
+ }
7220
7230
  subGroupTexts.push(React.createElement("div", { className: "ItemImproveEffectsTooltip_entry 00008130.UI.Label_Green03_12" },
7221
- React.createElement("span", null, effect.statValue),
7231
+ React.createElement("span", null, GetStatDisplayValue(statValue, effect.isPercentage)),
7222
7232
  "\u00A0",
7223
- React.createElement("span", { dangerouslySetInnerHTML: { __html: effect.statName } })));
7233
+ React.createElement("span", { dangerouslySetInnerHTML: { __html: ReplaceBossAndPvpAp(effect.statName).replace("Max.", "").trim() } })));
7224
7234
  }
7225
7235
  });
7226
7236
  var subGroup = {
@@ -8004,32 +8014,23 @@ function FilterStones(stones) {
8004
8014
  }
8005
8015
 
8006
8016
  function ItemUpgradeEffects(props) {
8007
- var _this = this;
8008
8017
  var _a = useState(undefined), effectData = _a[0], setEffectData = _a[1];
8009
8018
  var _b = useState(false), loading = _b[0], setLoading = _b[1];
8010
8019
  var _c = useState(true), fresh = _c[0], setFresh = _c[1];
8011
- useEffect(function () {
8012
- if (props.client)
8013
- (function () { return __awaiter(_this, void 0, void 0, function () {
8014
- return __generator(this, function (_a) {
8015
- return [2 /*return*/];
8016
- });
8017
- }); })();
8018
- }, [props, props.id, props.level, props.client]);
8019
8020
  function LoadEffectOptions() {
8020
8021
  return __awaiter(this, void 0, void 0, function () {
8021
8022
  var result, itemImproveEffectsForName_1;
8022
- return __generator(this, function (_a) {
8023
- switch (_a.label) {
8023
+ return __generator(this, function (_b) {
8024
+ switch (_b.label) {
8024
8025
  case 0:
8025
8026
  setLoading(true);
8026
8027
  setFresh(false);
8027
- _a.label = 1;
8028
+ _b.label = 1;
8028
8029
  case 1:
8029
- _a.trys.push([1, , 3, 4]);
8030
+ _b.trys.push([1, 3, 4, 5]);
8030
8031
  return [4 /*yield*/, props.client.GetAllItemImproveEffectOptionsForItem(props.id, props.level)];
8031
8032
  case 2:
8032
- result = _a.sent();
8033
+ result = _b.sent();
8033
8034
  if (result && result.itemImproveEffectOptions && result.itemImproveEffectOptions.length > 0) {
8034
8035
  itemImproveEffectsForName_1 = [];
8035
8036
  result.itemImproveEffectOptions.sort(function (a, b) { return a.index - b.index; }).forEach(function (effectOption) {
@@ -8043,11 +8044,14 @@ function ItemUpgradeEffects(props) {
8043
8044
  else {
8044
8045
  setEffectData(undefined);
8045
8046
  }
8046
- return [3 /*break*/, 4];
8047
+ return [3 /*break*/, 5];
8047
8048
  case 3:
8049
+ _b.sent();
8050
+ return [3 /*break*/, 5];
8051
+ case 4:
8048
8052
  setLoading(false);
8049
8053
  return [7 /*endfinally*/];
8050
- case 4: return [2 /*return*/];
8054
+ case 5: return [2 /*return*/];
8051
8055
  }
8052
8056
  });
8053
8057
  });