@opfr/services 0.27.0 → 0.27.2

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/dist/index.es.js CHANGED
@@ -3437,6 +3437,7 @@ const Qt = ((Rs = $) == null ? void 0 : Rs.UserGames) || T("UserGames", ar), Wa
3437
3437
  if (n >= a.equipments.length / 2)
3438
3438
  return a.halfBonus;
3439
3439
  }, Va = (t) => {
3440
+ var s;
3440
3441
  let a = {
3441
3442
  vitality: 0,
3442
3443
  strength: 0,
@@ -3445,17 +3446,17 @@ const Qt = ((Rs = $) == null ? void 0 : Rs.UserGames) || T("UserGames", ar), Wa
3445
3446
  intelligence: 0,
3446
3447
  wisdom: 0
3447
3448
  };
3448
- for (const s of ui) {
3449
- const n = t.equippedItems[s];
3450
- n && (a = oa(
3449
+ for (const n of ui) {
3450
+ const r = (s = t.equippedItems) == null ? void 0 : s[n];
3451
+ r && (a = oa(
3451
3452
  a,
3452
- Hs(n).characteristics,
3453
- (r, i) => r + i
3453
+ Hs(r).characteristics,
3454
+ (i, d) => i + d
3454
3455
  ));
3455
3456
  }
3456
- for (const s of Gs) {
3457
- const n = Uu(t, s);
3458
- n && !("target" in n) && (a = oa(a, n, (r, i) => r + i));
3457
+ for (const n of Gs) {
3458
+ const r = Uu(t, n);
3459
+ r && !("target" in r) && (a = oa(a, r, (i, d) => i + d));
3459
3460
  }
3460
3461
  return a;
3461
3462
  }, Su = (t, a) => {
@@ -7381,7 +7382,7 @@ const jg = async (t, a, s, { berry: n, xp: r }) => {
7381
7382
  marine_ring: "<:marine_ring:1308766839823663184>",
7382
7383
  marine_strap: "<:marine_strap:1308766838032957520>",
7383
7384
  pirate_weapon: "<:pirate_weapon:1308766750497705984>",
7384
- pirate_helmet: "<:marine_helmet:1308766843736948756>",
7385
+ pirate_helmet: "<:pirate_helmet:1308766752171102252>",
7385
7386
  pirate_ring: "<:pirate_ring:1308766574081212506>",
7386
7387
  pirate_belt: "<:pirate_belt:1308766575259553792>",
7387
7388
  revolutionary_belt: "<:revolutionary_belt:1308766578967576576>",
@@ -8217,7 +8218,7 @@ const mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8217
8218
  }, Nm = async (t) => {
8218
8219
  var s, n;
8219
8220
  const a = await Pr(t.user._id);
8220
- R(t.xp.amount) >= 50 && !at(a, "training") && (await st(a.user._id, "training"), Dt("raidUnlock", t.user._id, "training")), (((n = (s = a.obtainedRewards.training) == null ? void 0 : s.filter((r) => r.startsWith("end_"))) == null ? void 0 : n.length) ?? 0) >= 4 && !at(a, "resources") && (await st(a.user._id, "resources"), Dt("raidUnlock", t.user._id, "resources"));
8221
+ R(t.xp.amount) >= 30 && !at(a, "training") && (await st(a.user._id, "training"), Dt("raidUnlock", t.user._id, "training")), (((n = (s = a.obtainedRewards.training) == null ? void 0 : s.filter((r) => r.startsWith("end_"))) == null ? void 0 : n.length) ?? 0) >= 4 && !at(a, "resources") && (await st(a.user._id, "resources"), Dt("raidUnlock", t.user._id, "resources"));
8221
8222
  }, Pm = async (t) => {
8222
8223
  const a = await Pr(t.user._id);
8223
8224
  ya(t.equipmentList, (s) => s.id).map((s) => pi(s)).filter((s) => s.panoply === "adventurer").length === 6 && !at(a, "pirate_cave") && (await st(a.user._id, "pirate_cave"), Dt("raidUnlock", t.user._id, "pirate_cave")), (t.itemList.get("map_fragment") ?? 0) >= 5 && !at(a, "mysterious_island") && (await st(a.user._id, "mysterious_island"), await Be(
@@ -8349,10 +8350,10 @@ const Fe = ((Ts = $) == null ? void 0 : Ts.UserMeta) || T("UserMeta", ut), yr =
8349
8350
  (a, { expireAt: s, startAt: n, multiplier: r }) => a + (/* @__PURE__ */ new Date() >= (n ?? /* @__PURE__ */ new Date()) && (!s || !Te(s)) ? r : 0),
8350
8351
  1
8351
8352
  ), Ue = async (t, a, s) => {
8352
- const n = a ?? await Lt(t, { buffs: -1, xp: -1 }), r = s ?? await ts(t, { itemList: -1, equipmentList: -1 });
8353
+ const n = a ?? await Lt(t, { buffs: 0, xp: 0 }), r = s ?? await ts(t, { itemList: 0, equipmentList: 0 });
8353
8354
  return ((Za(n).vitality ?? 0) + Va(r).vitality) * wi + bi;
8354
8355
  }, zm = async (t, a, s, n) => {
8355
- const r = s ?? await Lt(t, { buffs: -1, xp: -1 }), i = n ?? await ts(t, { itemList: -1, equipmentList: -1 }), d = oa(
8356
+ const r = s ?? await Lt(t, { buffs: 0, xp: 0 }), i = n ?? await ts(t, { itemList: 0, equipmentList: 0 }), d = oa(
8356
8357
  Za(r),
8357
8358
  Va(i),
8358
8359
  (c, m) => c + m