classes: replenish 10MP on cron
This commit is contained in:
Vendored
+4
@@ -11838,6 +11838,10 @@ var process=require("__browserify_process");(function() {
|
||||
if (user.items.lastDrop.count > 0) {
|
||||
user.items.lastDrop.count = 0;
|
||||
}
|
||||
user.stats.mp += 10;
|
||||
if (user.stats.mp > user._statsComputed.maxMP) {
|
||||
user.stats.mp = user._statsComputed.maxMP;
|
||||
}
|
||||
if (user.preferences.sleep === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -981,6 +981,9 @@ api.wrap = (user) ->
|
||||
if user.items.lastDrop.count > 0
|
||||
user.items.lastDrop.count = 0
|
||||
|
||||
user.stats.mp += 10
|
||||
user.stats.mp = user._statsComputed.maxMP if user.stats.mp > user._statsComputed.maxMP
|
||||
|
||||
# User is resting at the inn. Used to be we un-checked each daily without performing calculation (see commits before fb29e35)
|
||||
# but to prevent abusing the inn (http://goo.gl/GDb9x) we now do *not* calculate dailies, and simply set lastCron to today
|
||||
return if user.preferences.sleep is true
|
||||
|
||||
Reference in New Issue
Block a user