bnstooltips 1.18.18 → 1.19.0

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
@@ -1573,6 +1573,7 @@ var BnsItemDto = /** @class */ (function () {
1573
1573
  this.slateStones.push(SlateStoneDto.fromJS(item));
1574
1574
  }
1575
1575
  }
1576
+ this.randomEffects = _data["randomEffects"] ? ItemRandomEffectsDto.fromJS(_data["randomEffects"]) : undefined;
1576
1577
  }
1577
1578
  };
1578
1579
  BnsItemDto.fromJS = function (data) {
@@ -1679,6 +1680,7 @@ var BnsItemDto = /** @class */ (function () {
1679
1680
  data["slateStones"].push(item.toJSON());
1680
1681
  }
1681
1682
  }
1683
+ data["randomEffects"] = this.randomEffects ? this.randomEffects.toJSON() : undefined;
1682
1684
  return data;
1683
1685
  };
1684
1686
  return BnsItemDto;
@@ -1956,6 +1958,37 @@ var ItemDescriptionDto = /** @class */ (function () {
1956
1958
  };
1957
1959
  return ItemDescriptionDto;
1958
1960
  }());
1961
+ var ItemEffectDto = /** @class */ (function () {
1962
+ function ItemEffectDto(data) {
1963
+ if (data) {
1964
+ for (var property in data) {
1965
+ if (data.hasOwnProperty(property))
1966
+ this[property] = data[property];
1967
+ }
1968
+ }
1969
+ }
1970
+ ItemEffectDto.prototype.init = function (_data) {
1971
+ if (_data) {
1972
+ this.id = _data["id"];
1973
+ this.text = _data["text"];
1974
+ this.weight = _data["weight"];
1975
+ }
1976
+ };
1977
+ ItemEffectDto.fromJS = function (data) {
1978
+ data = typeof data === 'object' ? data : {};
1979
+ var result = new ItemEffectDto();
1980
+ result.init(data);
1981
+ return result;
1982
+ };
1983
+ ItemEffectDto.prototype.toJSON = function (data) {
1984
+ data = typeof data === 'object' ? data : {};
1985
+ data["id"] = this.id;
1986
+ data["text"] = this.text;
1987
+ data["weight"] = this.weight;
1988
+ return data;
1989
+ };
1990
+ return ItemEffectDto;
1991
+ }());
1959
1992
  var ItemIconDto = /** @class */ (function () {
1960
1993
  function ItemIconDto(data) {
1961
1994
  if (data) {
@@ -2173,6 +2206,53 @@ var ItemImproveEffectOptionWithNameDto = /** @class */ (function () {
2173
2206
  };
2174
2207
  return ItemImproveEffectOptionWithNameDto;
2175
2208
  }());
2209
+ var ItemRandomEffectsDto = /** @class */ (function () {
2210
+ function ItemRandomEffectsDto(data) {
2211
+ if (data) {
2212
+ for (var property in data) {
2213
+ if (data.hasOwnProperty(property))
2214
+ this[property] = data[property];
2215
+ }
2216
+ }
2217
+ }
2218
+ ItemRandomEffectsDto.prototype.init = function (_data) {
2219
+ if (_data) {
2220
+ this.alias = _data["alias"];
2221
+ this.randomEffectCount = _data["randomEffectCount"];
2222
+ this.totalWeight = _data["totalWeight"];
2223
+ this.itemSkillName = _data["itemSkillName"];
2224
+ if (Array.isArray(_data["randomEffects"])) {
2225
+ this.randomEffects = [];
2226
+ for (var _i = 0, _a = _data["randomEffects"]; _i < _a.length; _i++) {
2227
+ var item = _a[_i];
2228
+ this.randomEffects.push(ItemEffectDto.fromJS(item));
2229
+ }
2230
+ }
2231
+ }
2232
+ };
2233
+ ItemRandomEffectsDto.fromJS = function (data) {
2234
+ data = typeof data === 'object' ? data : {};
2235
+ var result = new ItemRandomEffectsDto();
2236
+ result.init(data);
2237
+ return result;
2238
+ };
2239
+ ItemRandomEffectsDto.prototype.toJSON = function (data) {
2240
+ data = typeof data === 'object' ? data : {};
2241
+ data["alias"] = this.alias;
2242
+ data["randomEffectCount"] = this.randomEffectCount;
2243
+ data["totalWeight"] = this.totalWeight;
2244
+ data["itemSkillName"] = this.itemSkillName;
2245
+ if (Array.isArray(this.randomEffects)) {
2246
+ data["randomEffects"] = [];
2247
+ for (var _i = 0, _a = this.randomEffects; _i < _a.length; _i++) {
2248
+ var item = _a[_i];
2249
+ data["randomEffects"].push(item.toJSON());
2250
+ }
2251
+ }
2252
+ return data;
2253
+ };
2254
+ return ItemRandomEffectsDto;
2255
+ }());
2176
2256
  var ItemRandomStatDto = /** @class */ (function () {
2177
2257
  function ItemRandomStatDto(data) {
2178
2258
  if (data) {
@@ -8244,6 +8324,7 @@ function ItemTooltip(_a) {
8244
8324
  AddJobstyleToggles(setHasSkillModifiers, tooltipBaseProps.subInfoGroups, jobstyles, jobstyle, setJobstyle);
8245
8325
  }
8246
8326
  AddTopText(tooltipBaseProps.subInfoGroups, item);
8327
+ AddRandomEffects(tooltipBaseProps.subInfoGroups, item);
8247
8328
  AddSkillDescriptions(tooltipBaseProps.subInfoGroups, item, itemCombats, jobstyle);
8248
8329
  AddSkillModifiers(tooltipBaseProps.subInfoGroups, item, false, jobstyle);
8249
8330
  AddEtchingStones(tooltipBaseProps.subInfoGroups, item);
@@ -8317,6 +8398,18 @@ function AddTopText(subInfoGroups, item) {
8317
8398
  texts: [React.createElement(TopText, __assign({}, item))],
8318
8399
  });
8319
8400
  }
8401
+ function AddRandomEffects(subInfoGroups, item) {
8402
+ if (item.randomEffects == null || item.randomEffects.randomEffectCount == 0 || item.randomEffects.randomEffects == null || item.randomEffects.randomEffects.length == 0)
8403
+ return;
8404
+ subInfoGroups.push({
8405
+ title: "",
8406
+ texts: [
8407
+ React.createElement("div", null,
8408
+ React.createElement("div", { id: item.randomEffects.alias, dangerouslySetInnerHTML: { __html: item.randomEffects.itemSkillName } }),
8409
+ item.randomEffects.randomEffects.map(function (effect) { return (React.createElement("div", { key: item.randomEffects.alias + "_" + effect.id, dangerouslySetInnerHTML: { __html: effect.text } })); }))
8410
+ ]
8411
+ });
8412
+ }
8320
8413
  function AddSkillDescriptions(subInfoGroups, item, itemCombats, jobstyle) {
8321
8414
  if (item.skills == null || item.skills.length == 0)
8322
8415
  return;
@@ -8346,6 +8439,14 @@ function AddRandomSubStatCount(subInfoGroups, item) {
8346
8439
  React.createElement("span", { className: "00008130.UI.Label_Green03_12" }, item.randomSubStatCount),
8347
8440
  "\u00A0random secondary stat(s).")]
8348
8441
  });
8442
+ if (item.randomEffects != null && item.randomEffects.randomEffects.length > 1)
8443
+ subInfoGroups.push({
8444
+ title: "Random effects:",
8445
+ texts: [React.createElement("div", { className: "00008130.UI.Vital_LightBlue" },
8446
+ "This item has\u00A0",
8447
+ React.createElement("span", { className: "00008130.UI.Label_Green03_12" }, item.randomEffects.randomEffectCount),
8448
+ "\u00A0random effect(s).")]
8449
+ });
8349
8450
  }
8350
8451
  function AddSetBonus(subInfoGroups, item, jobstyle) {
8351
8452
  if (item.setBonus == null)