feat(analytics): track cron count

This commit is contained in:
Tyler Renelle
2015-03-26 11:15:23 -06:00
committed by Kevin Gisi
parent e9baafcbc8
commit e46789c303
4 changed files with 16 additions and 3 deletions

View File

@@ -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, {