mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-19 07:08:33 +02:00
debug payouts
This commit is contained in:
@@ -706,6 +706,7 @@ const SocketHandlers = {
|
||||
},
|
||||
|
||||
onUserCount: function(data) {
|
||||
console.log('👥 User count received:', data);
|
||||
if (!data || typeof data.count !== 'number') return;
|
||||
SocketHandlers._updateUserCountDisplay(data.count);
|
||||
},
|
||||
|
||||
@@ -242,6 +242,11 @@ class GameModeManager {
|
||||
: (multipliers.escape ?? 0);
|
||||
|
||||
const amount = Math.round(base * multiplier);
|
||||
|
||||
console.log(`🧮 calculatePayout: mode=${normalizedMode}, usingCredits=${usingCredits}, treasureFound=${treasureFound}`);
|
||||
console.log(` base=${base}, multipliers=${JSON.stringify(multipliers)}, chosen multiplier=${multiplier}`);
|
||||
console.log(` final amount=${amount} (base * multiplier = ${base} * ${multiplier})`);
|
||||
|
||||
return { amount, multiplier, base };
|
||||
}
|
||||
|
||||
|
||||
@@ -25,11 +25,11 @@ class BroadcastManager {
|
||||
count = this.io.engine.clientsCount || 0;
|
||||
}
|
||||
|
||||
// Only broadcast if count changed to avoid spam
|
||||
if (count !== this._lastUserCount) {
|
||||
this._lastUserCount = count;
|
||||
this.io.emit('user_count', { count });
|
||||
}
|
||||
console.log(`👥 Broadcasting user count: ${count} (last was ${this._lastUserCount})`);
|
||||
|
||||
// Always broadcast to ensure new clients get the count
|
||||
this._lastUserCount = count;
|
||||
this.io.emit('user_count', { count });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user