@opfr/services 0.29.10 → 0.29.12
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
|
@@ -8641,7 +8641,7 @@ ft.index({ user: 1 });
|
|
|
8641
8641
|
ft.index({ "xp.amount": -1 });
|
|
8642
8642
|
ft.index({ berry: -1 });
|
|
8643
8643
|
ft.post("findOneAndUpdate", async function(t) {
|
|
8644
|
-
await Qm(t), await Pm(t), await wr(t.user._id), t.hp <= 0 && await Kn(t.user._id);
|
|
8644
|
+
await Qm(t), await Pm(t), t.berry === 0 && await wr(t.user._id), t.hp <= 0 && await Kn(t.user._id);
|
|
8645
8645
|
});
|
|
8646
8646
|
var As;
|
|
8647
8647
|
const Ee = ((As = T) == null ? void 0 : As.UserMeta) || F("UserMeta", ft), br = async (t) => await Ee.create({
|
|
@@ -8663,9 +8663,9 @@ const Ee = ((As = T) == null ? void 0 : As.UserMeta) || F("UserMeta", ft), br =
|
|
|
8663
8663
|
}, xh = (t) => {
|
|
8664
8664
|
const a = t.trim().length, s = 2;
|
|
8665
8665
|
return a < 10 ? 10 * s : a > 300 ? 300 * s : a * s;
|
|
8666
|
-
}, Uh = (t, a, s) => (a *= 1 + ts(t), Math.ceil(a * s)), Sh = (t, a) => {
|
|
8667
|
-
const
|
|
8668
|
-
return a <= 0 ? a : Math.ceil(a * (
|
|
8666
|
+
}, Uh = (t, a, s) => (a *= 1 + ts(t), Math.ceil(a * s)), Sh = (t, a, s) => {
|
|
8667
|
+
const n = s ? 1 : vr(t);
|
|
8668
|
+
return a <= 0 ? a : Math.ceil(a * (n || 1));
|
|
8669
8669
|
}, Dh = (t) => t.buffs.cooldown.work.reduce(
|
|
8670
8670
|
(a, { expireAt: s, startAt: n, multiplier: r }) => a + (/* @__PURE__ */ new Date() >= (n ?? /* @__PURE__ */ new Date()) && (!s || !Fe(s)) ? r : 0),
|
|
8671
8671
|
1
|