feat(analytics): track cron count

This commit is contained in:
Tyler Renelle
2015-03-26 11:15:23 -06:00
parent 10ce0a622b
commit e7ca2ab9f3
4 changed files with 16 additions and 3 deletions
+8 -1
View File
@@ -7049,7 +7049,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 = {};
}
@@ -7222,6 +7222,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, {