BUGFIX: Engine does not send all faction invitations (#1277)

This commit is contained in:
catloversg 2024-05-23 15:40:23 +07:00 committed by GitHub
parent cfa941ce58
commit 81a707123e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -162,9 +162,8 @@ const Engine: {
checkCounters: function () {
if (Engine.Counters.checkFactionInvitations <= 0) {
const invitedFactions = Player.checkForFactionInvitations();
if (invitedFactions.length > 0) {
const randFaction = invitedFactions[Math.floor(Math.random() * invitedFactions.length)];
inviteToFaction(randFaction);
for (const invitedFaction of invitedFactions) {
inviteToFaction(invitedFaction);
}
Engine.Counters.checkFactionInvitations = 100;
}