mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
feat(analytics): track cron count
This commit is contained in:
committed by
Kevin Gisi
parent
e9baafcbc8
commit
e46789c303
9
common/dist/scripts/habitrpg-shared.js
vendored
9
common/dist/scripts/habitrpg-shared.js
vendored
@@ -7074,7 +7074,7 @@ api.wrap = function(user, main) {
|
||||
{user}
|
||||
*/
|
||||
cron: function(options) {
|
||||
var clearBuffs, daysMissed, expTally, lvl, lvlDiv2, now, perfect, plan, progress, todoTally, _base, _base1, _base2, _base3, _progress, _ref, _ref1, _ref2;
|
||||
var clearBuffs, daysMissed, expTally, lvl, lvlDiv2, now, perfect, plan, progress, todoTally, _base, _base1, _base2, _base3, _base4, _progress, _ref, _ref1, _ref2, _ref3;
|
||||
if (options == null) {
|
||||
options = {};
|
||||
}
|
||||
@@ -7247,6 +7247,13 @@ api.wrap = function(user, main) {
|
||||
if (user.stats.mp > user._statsComputed.maxMP) {
|
||||
user.stats.mp = user._statsComputed.maxMP;
|
||||
}
|
||||
if ((_base4 = user.flags).cronCount == null) {
|
||||
_base4.cronCount = 0;
|
||||
}
|
||||
user.flags.cronCount++;
|
||||
if ((_ref3 = options.ga) != null) {
|
||||
_ref3.event('cron', user.flags.cronCount).send();
|
||||
}
|
||||
progress = user.party.quest.progress;
|
||||
_progress = _.cloneDeep(progress);
|
||||
_.merge(progress, {
|
||||
|
||||
Reference in New Issue
Block a user