bnstooltips 1.21.3 → 1.22.1
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/MultiSkillTooltip/MultiSkillTooltip.types.d.ts +1 -0
- package/build/Utilities/Helpers.d.ts +2 -1
- package/build/Utilities/ISkill.d.ts +13 -1
- package/build/index.es.js +66 -6
- package/build/index.es.js.map +1 -1
- package/build/index.js +66 -6
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -159,7 +159,7 @@ function BuildIconPath(iconPath, iconIndex) {
|
|
|
159
159
|
iconPath = iconPath.substring(1);
|
|
160
160
|
}
|
|
161
161
|
if (iconPath.startsWith("/Game/")) {
|
|
162
|
-
var split = iconPath.split(
|
|
162
|
+
var split = iconPath.split("/");
|
|
163
163
|
var last = split[split.length - 1];
|
|
164
164
|
var penultimate = split[split.length - 2];
|
|
165
165
|
if (last === penultimate) {
|
|
@@ -288,7 +288,7 @@ function getMoneyObj(money) {
|
|
|
288
288
|
var copper = 0;
|
|
289
289
|
if (money === 0)
|
|
290
290
|
return null;
|
|
291
|
-
var digits = money.toString().split(
|
|
291
|
+
var digits = money.toString().split("");
|
|
292
292
|
var realDigits = digits.map(Number);
|
|
293
293
|
var i = 0;
|
|
294
294
|
var subCurrencyIndex = [0, 0, 0];
|
|
@@ -322,13 +322,29 @@ function getMoneyObj(money) {
|
|
|
322
322
|
return {
|
|
323
323
|
Copper: copper,
|
|
324
324
|
Gold: gold,
|
|
325
|
-
Silver: silver
|
|
325
|
+
Silver: silver,
|
|
326
326
|
};
|
|
327
327
|
}
|
|
328
328
|
function GetSkillMasteryValue(points, arcaneInfo) {
|
|
329
329
|
if (points <= 0 || arcaneInfo == null)
|
|
330
330
|
return 0;
|
|
331
|
-
return arcaneInfo.IsCooldown
|
|
331
|
+
return arcaneInfo.IsCooldown
|
|
332
|
+
? GetSkillMasteryCdValueForPoints(points, arcaneInfo.CooldownBreakpoints)
|
|
333
|
+
: GetSkillMasteryValueForPoints(points, arcaneInfo.DamageSections);
|
|
334
|
+
}
|
|
335
|
+
function GetSkillMasteryValue2(points, arcaneInfo) {
|
|
336
|
+
if (points <= 0 || arcaneInfo == undefined || arcaneInfo == null)
|
|
337
|
+
return 0;
|
|
338
|
+
if (arcaneInfo.Type === 0)
|
|
339
|
+
return 0; // No modification
|
|
340
|
+
if (arcaneInfo.Type === 1) {
|
|
341
|
+
// Damage modification
|
|
342
|
+
return GetSkillMasteryValueForPoints(points, arcaneInfo.Breakpoints);
|
|
343
|
+
}
|
|
344
|
+
if (arcaneInfo.Type === 2) {
|
|
345
|
+
// Cooldown modification
|
|
346
|
+
return GetSkillMasteryCdValueForPoints(points, arcaneInfo.Breakpoints);
|
|
347
|
+
}
|
|
332
348
|
}
|
|
333
349
|
/**
|
|
334
350
|
* Calculates the cooldown reduction value based on skill mastery points and defined breakpoints.
|
|
@@ -8904,6 +8920,13 @@ function SkillConditions(_a) {
|
|
|
8904
8920
|
React__default["default"].createElement("div", { key: i, dangerouslySetInnerHTML: { __html: sub.Text } }))); })));
|
|
8905
8921
|
}
|
|
8906
8922
|
|
|
8923
|
+
var ArcaneModifyType;
|
|
8924
|
+
(function (ArcaneModifyType) {
|
|
8925
|
+
ArcaneModifyType[ArcaneModifyType["None"] = 0] = "None";
|
|
8926
|
+
ArcaneModifyType[ArcaneModifyType["Damage"] = 1] = "Damage";
|
|
8927
|
+
ArcaneModifyType[ArcaneModifyType["Cooldown"] = 2] = "Cooldown";
|
|
8928
|
+
})(ArcaneModifyType || (ArcaneModifyType = {}));
|
|
8929
|
+
|
|
8907
8930
|
function SkillTooltip(_a) {
|
|
8908
8931
|
var data = _a.data, _b = _a.debug, debug = _b === void 0 ? false : _b, _c = _a.masteryPoints, masteryPoints = _c === void 0 ? 0 : _c, _d = _a.showZeroMastery, showZeroMastery = _d === void 0 ? false : _d, _e = _a.multi, multi = _e === void 0 ? false : _e;
|
|
8909
8932
|
var skill = data;
|
|
@@ -8927,6 +8950,7 @@ function SkillTooltip(_a) {
|
|
|
8927
8950
|
AddSubTexts(tooltipBaseProps.subInfoGroups, skill);
|
|
8928
8951
|
AddBreakValue(tooltipBaseProps.subInfoGroups, skill);
|
|
8929
8952
|
AddSkillMastery(tooltipBaseProps.subInfoGroups, masteryPoints, skill.ArcaneInfo, showZeroMastery);
|
|
8953
|
+
AddSkillMastery2(tooltipBaseProps.subInfoGroups, masteryPoints, skill.ArcaneInfo2, showZeroMastery);
|
|
8930
8954
|
AddPvpModifiers(tooltipBaseProps.subInfoGroups, skill);
|
|
8931
8955
|
AddBoundaries(tooltipBaseProps.subInfoGroups, skill);
|
|
8932
8956
|
AddConditions(tooltipBaseProps.subInfoGroups, skill);
|
|
@@ -8979,9 +9003,45 @@ function AddBreakValue(subInfoGroups, skill) {
|
|
|
8979
9003
|
});
|
|
8980
9004
|
}
|
|
8981
9005
|
}
|
|
9006
|
+
function AddSkillMastery2(subInfoGroups, masteryPoints, arcaneInfo2, showZeroMastery) {
|
|
9007
|
+
var _a;
|
|
9008
|
+
if (showZeroMastery === void 0) { showZeroMastery = false; }
|
|
9009
|
+
if (arcaneInfo2 == undefined ||
|
|
9010
|
+
masteryPoints == null ||
|
|
9011
|
+
(masteryPoints == 0 && !showZeroMastery) ||
|
|
9012
|
+
arcaneInfo2 == null)
|
|
9013
|
+
return;
|
|
9014
|
+
var masteryValue = GetSkillMasteryValue2(masteryPoints, arcaneInfo2);
|
|
9015
|
+
if (masteryValue == null)
|
|
9016
|
+
return;
|
|
9017
|
+
var formattedMasteryValue = Number.isInteger(masteryValue)
|
|
9018
|
+
? masteryValue.toString()
|
|
9019
|
+
: masteryValue.toFixed(2).replace(",", ".");
|
|
9020
|
+
var masteryTypeMap = (_a = {},
|
|
9021
|
+
_a[ArcaneModifyType.Damage] = { label: "Damage increase", unit: "%" },
|
|
9022
|
+
_a[ArcaneModifyType.Cooldown] = { label: "Cooldown reduction", unit: " sec." },
|
|
9023
|
+
_a);
|
|
9024
|
+
subInfoGroups.push({
|
|
9025
|
+
title: "",
|
|
9026
|
+
texts: [
|
|
9027
|
+
React__default["default"].createElement("div", null,
|
|
9028
|
+
React__default["default"].createElement("div", { style: { display: "flex", alignItems: "center" } },
|
|
9029
|
+
React__default["default"].createElement("span", { className: "tooltipArg", style: { fontSize: "14px" } }, "Skill Grandmaster"),
|
|
9030
|
+
React__default["default"].createElement("div", { className: "arcanemark" }),
|
|
9031
|
+
React__default["default"].createElement("span", { className: "tooltipArg", style: { fontSize: "14px" } }, masteryPoints)),
|
|
9032
|
+
masteryTypeMap[arcaneInfo2.Type] && (React__default["default"].createElement("div", null,
|
|
9033
|
+
masteryTypeMap[arcaneInfo2.Type].label,
|
|
9034
|
+
":\u00A0",
|
|
9035
|
+
React__default["default"].createElement("span", { className: "tooltipArg" },
|
|
9036
|
+
formattedMasteryValue,
|
|
9037
|
+
masteryTypeMap[arcaneInfo2.Type].unit)))),
|
|
9038
|
+
],
|
|
9039
|
+
});
|
|
9040
|
+
}
|
|
8982
9041
|
function AddSkillMastery(subInfoGroups, masteryPoints, arcaneInfo, showZeroMastery) {
|
|
8983
9042
|
if (showZeroMastery === void 0) { showZeroMastery = false; }
|
|
8984
|
-
if (
|
|
9043
|
+
if (arcaneInfo == undefined ||
|
|
9044
|
+
masteryPoints == null ||
|
|
8985
9045
|
(masteryPoints == 0 && !showZeroMastery) ||
|
|
8986
9046
|
arcaneInfo == null)
|
|
8987
9047
|
return;
|
|
@@ -9638,7 +9698,7 @@ styleInject(css_248z$1);
|
|
|
9638
9698
|
|
|
9639
9699
|
function MultiSkillTooltip(_a) {
|
|
9640
9700
|
var skills = _a.skills, _b = _a.debug, debug = _b === void 0 ? false : _b, _c = _a.fullheight, fullheight = _c === void 0 ? false : _c;
|
|
9641
|
-
return (React__default["default"].createElement("div", { className: "MultiSkillTooltip_container", "data-testid": "MultiSkillTooltip" }, skills.map(function (skill, index) { return (React__default["default"].createElement(SkillTooltip, { data: skill.data, masteryPoints: skill.masteryPoints, key: index, debug: debug, multi: fullheight })); })));
|
|
9701
|
+
return (React__default["default"].createElement("div", { className: "MultiSkillTooltip_container", "data-testid": "MultiSkillTooltip" }, skills.map(function (skill, index) { return (React__default["default"].createElement(SkillTooltip, { data: skill.data, masteryPoints: skill.masteryPoints, key: index, debug: debug, multi: fullheight, showZeroMastery: skill.showZeroMastery })); })));
|
|
9642
9702
|
}
|
|
9643
9703
|
|
|
9644
9704
|
var css_248z = ".TooltipBase_bns_upgradeRed_color {\n color: #FF2818;\n}\n\n.TooltipBase_bns_downgradeBlue_color {\n color: #28A9F0;\n}\n\n.tippy-box {\n max-width: none !important;\n background-color: transparent !important;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;\n transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;\n}\n.tippy-box:hover {\n box-shadow: rgba(0, 0, 0, 0.8) 0px 20px 60px 0px !important;\n}\n\n.tippy-content {\n padding: 0 !important;\n}\n\n.tippy-box[data-theme~=grade1][data-placement^=bottom] .tippy-arrow::before {\n border-bottom-color: #9B9B9B !important;\n}\n\n.tippy-box[data-theme~=grade1][data-placement^=top] .tippy-arrow::before {\n border-top-color: #9B9B9B !important;\n}\n\n.tippy-box[data-theme~=grade1][data-placement^=left] .tippy-arrow::before {\n border-left-color: #9B9B9B !important;\n}\n\n.tippy-box[data-theme~=grade1][data-placement^=right] .tippy-arrow::before {\n border-right-color: #9B9B9B !important;\n}\n\n.tippy-box[data-theme~=grade2][data-placement^=bottom] .tippy-arrow::before {\n border-bottom-color: #ffffff !important;\n}\n\n.tippy-box[data-theme~=grade2][data-placement^=top] .tippy-arrow::before {\n border-top-color: #ffffff !important;\n}\n\n.tippy-box[data-theme~=grade2][data-placement^=left] .tippy-arrow::before {\n border-left-color: #ffffff !important;\n}\n\n.tippy-box[data-theme~=grade2][data-placement^=right] .tippy-arrow::before {\n border-right-color: #ffffff !important;\n}\n\n.tippy-box[data-theme~=grade3][data-placement^=bottom] .tippy-arrow::before {\n border-bottom-color: #57FF78 !important;\n}\n\n.tippy-box[data-theme~=grade3][data-placement^=top] .tippy-arrow::before {\n border-top-color: #57FF78 !important;\n}\n\n.tippy-box[data-theme~=grade3][data-placement^=left] .tippy-arrow::before {\n border-left-color: #57FF78 !important;\n}\n\n.tippy-box[data-theme~=grade3][data-placement^=right] .tippy-arrow::before {\n border-right-color: #57FF78 !important;\n}\n\n.tippy-box[data-theme~=grade4][data-placement^=bottom] .tippy-arrow::before {\n border-bottom-color: #00D9FF !important;\n}\n\n.tippy-box[data-theme~=grade4][data-placement^=top] .tippy-arrow::before {\n border-top-color: #00D9FF !important;\n}\n\n.tippy-box[data-theme~=grade4][data-placement^=left] .tippy-arrow::before {\n border-left-color: #00D9FF !important;\n}\n\n.tippy-box[data-theme~=grade4][data-placement^=right] .tippy-arrow::before {\n border-right-color: #00D9FF !important;\n}\n\n.tippy-box[data-theme~=grade5][data-placement^=bottom] .tippy-arrow::before {\n border-bottom-color: #D836FF !important;\n}\n\n.tippy-box[data-theme~=grade5][data-placement^=top] .tippy-arrow::before {\n border-top-color: #D836FF !important;\n}\n\n.tippy-box[data-theme~=grade5][data-placement^=left] .tippy-arrow::before {\n border-left-color: #D836FF !important;\n}\n\n.tippy-box[data-theme~=grade5][data-placement^=right] .tippy-arrow::before {\n border-right-color: #D836FF !important;\n}\n\n.tippy-box[data-theme~=grade6][data-placement^=bottom] .tippy-arrow::before {\n border-bottom-color: #FF9700 !important;\n}\n\n.tippy-box[data-theme~=grade6][data-placement^=top] .tippy-arrow::before {\n border-top-color: #FF9700 !important;\n}\n\n.tippy-box[data-theme~=grade6][data-placement^=left] .tippy-arrow::before {\n border-left-color: #FF9700 !important;\n}\n\n.tippy-box[data-theme~=grade6][data-placement^=right] .tippy-arrow::before {\n border-right-color: #FF9700 !important;\n}\n\n.tippy-box[data-theme~=grade7][data-placement^=bottom] .tippy-arrow::before {\n border-bottom-color: #FF7802 !important;\n}\n\n.tippy-box[data-theme~=grade7][data-placement^=top] .tippy-arrow::before {\n border-top-color: #FF7802 !important;\n}\n\n.tippy-box[data-theme~=grade7][data-placement^=left] .tippy-arrow::before {\n border-left-color: #FF7802 !important;\n}\n\n.tippy-box[data-theme~=grade7][data-placement^=right] .tippy-arrow::before {\n border-right-color: #FF7802 !important;\n}\n\n.tippy-box[data-theme~=grade8][data-placement^=bottom] .tippy-arrow::before {\n border-bottom-color: #FF0085 !important;\n}\n\n.tippy-box[data-theme~=grade8][data-placement^=top] .tippy-arrow::before {\n border-top-color: #FF0085 !important;\n}\n\n.tippy-box[data-theme~=grade8][data-placement^=left] .tippy-arrow::before {\n border-left-color: #FF0085 !important;\n}\n\n.tippy-box[data-theme~=grade8][data-placement^=right] .tippy-arrow::before {\n border-right-color: #FF0085 !important;\n}\n\n.tippy-box[data-theme~=grade9][data-placement^=bottom] .tippy-arrow::before {\n border-bottom-color: #FFED23 !important;\n}\n\n.tippy-box[data-theme~=grade9][data-placement^=top] .tippy-arrow::before {\n border-top-color: #FFED23 !important;\n}\n\n.tippy-box[data-theme~=grade9][data-placement^=left] .tippy-arrow::before {\n border-left-color: #FFED23 !important;\n}\n\n.tippy-box[data-theme~=grade9][data-placement^=right] .tippy-arrow::before {\n border-right-color: #FFED23 !important;\n}";
|