Froze the gold tick
This commit is contained in:
@@ -479,6 +479,8 @@ const runGoldTick = (connection) => {
|
||||
|
||||
//determine the correct tick rate based on the current gold average
|
||||
let tickRate = (() => {
|
||||
//TMP: freeze the tick rate
|
||||
return null;
|
||||
if (results[0].goldAverage < 120) return 5;
|
||||
if (results[0].goldAverage < 130) return 15;
|
||||
if (results[0].goldAverage < 140) return 30;
|
||||
@@ -489,6 +491,13 @@ const runGoldTick = (connection) => {
|
||||
if (oldTickRate !== tickRate) {
|
||||
if (goldTickJob) goldTickJob.stop();
|
||||
|
||||
//TMP: freeze the tickRate
|
||||
if (tickRate === null) {
|
||||
log('Tick rate frozen');
|
||||
oldTickRate = tickRate;
|
||||
return;
|
||||
}
|
||||
|
||||
goldTickJob = new CronJob(`0 */${tickRate} * * * *`, () => {
|
||||
let query = 'UPDATE profiles SET gold = gold + recruits;';
|
||||
connection.query(query, (err) => {
|
||||
|
||||
Reference in New Issue
Block a user