fix receiving multiple times the same invite

This commit is contained in:
Olivier Gagnon 2021-12-08 18:29:56 -05:00
parent ed821617c0
commit d64ce5271e

@ -20,7 +20,7 @@ import { dialogBoxCreate } from "../ui/React/DialogBox";
import { InvitationEvent } from "./ui/InvitationModal"; import { InvitationEvent } from "./ui/InvitationModal";
export function inviteToFaction(faction: Faction): void { export function inviteToFaction(faction: Faction): void {
Player.factionInvitations.push(faction.name); Player.receiveInvite(faction.name);
faction.alreadyInvited = true; faction.alreadyInvited = true;
if (!Settings.SuppressFactionInvites) { if (!Settings.SuppressFactionInvites) {
InvitationEvent.emit(faction); InvitationEvent.emit(faction);