From c8d874d28ad7409cc120c54fa3d5f16a6e7081ff Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Fri, 31 Aug 2018 16:02:14 -0500 Subject: [PATCH] Revert "Show accurate XP gain in notification on level up (#10590)" This reverts commit 1f7dd421d4f108c0e9c78767288062d23ee12f8b. --- website/client/components/notifications.vue | 8 +------- website/client/libs/notifications.js | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/website/client/components/notifications.vue b/website/client/components/notifications.vue index d05667cfed..1ef1d89e6b 100644 --- a/website/client/components/notifications.vue +++ b/website/client/components/notifications.vue @@ -88,7 +88,6 @@ import axios from 'axios'; import moment from 'moment'; import throttle from 'lodash/throttle'; -import { toNextLevel } from '../../common/script/statHelpers'; import { shouldDo } from '../../common/script/cron'; import { mapState } from 'client/libs/store'; import notifications from 'client/mixins/notifications'; @@ -223,12 +222,7 @@ export default { userExp (after, before) { if (after === before) return; if (this.user.stats.lvl === 0) return; - - let exp = after - before; - if (exp < -50) { // recalculate exp if user level up - exp = toNextLevel(this.user.stats.lvl - 1) - before + after; - } - this.exp(exp); + this.exp(after - before); }, userGp (after, before) { if (after === before) return; diff --git a/website/client/libs/notifications.js b/website/client/libs/notifications.js index 656b6dcae9..b39c4bff21 100644 --- a/website/client/libs/notifications.js +++ b/website/client/libs/notifications.js @@ -47,6 +47,6 @@ export function round (number, nDigits) { } export function getXPMessage (val) { - if (val < -50) return; // don't show when they multi-level up (resetting their exp) + if (val < -50) return; // don't show when they level up (resetting their exp) return `${getSign(val)} ${round(val)}`; } \ No newline at end of file