public void StartVote(Character issuer, string name, string topic, int participation, int consensusRate) { if (!CanStartVote(issuer)) { throw new PerpetuumException(ErrorCodes.InsufficientPrivileges); } var maxNofVote = CEO.GetExtensionBonusWithPrerequiredExtensions(ExtensionNames.ALLIANCE_VOTING); var corpCurrentVotes = _voteHandler.VoteCount(Eid); if (maxNofVote < corpCurrentVotes) { throw new PerpetuumException(ErrorCodes.MaxNumberOfVotesReached); } var vote = new Vote { ConsensusRate = consensusRate, groupEID = Eid, participation = participation, startDate = DateTime.Now, startedBy = issuer, voteName = name, voteType = VoteType.Freeform, voteTopic = topic, }; _voteHandler.InsertVote(vote); Transaction.Current.OnCommited(() => Message.Builder .SetCommand(Commands.CorporationVoteStart) .WithData(new Dictionary <string, object> { { k.vote, vote.ToDictionary() } }) .ToCharacters(GetCharacterMembers()) .Send()); }