Beispiel #1
0
        private void ImpeachmentCallback()
        {
            float num = (float)((double)this._acceptedMembers.Count / (double)(this.MemberCount - 2) * 100.0);

            this.SendSystemMsg(string.Format("{0}% members accepted new leader.", (object)num));
            if ((double)num > 70.0)
            {
                this.Leader.Asda2RankId = (byte)3;
                Asda2GuildHandler.SendGuildNotificationResponse(this, GuildNotificationType.RankChanged, this.Leader);
                this.Leader             = this._newLeader;
                this.Leader.Asda2RankId = (byte)4;
                Asda2GuildHandler.SendGuildNotificationResponse(this, GuildNotificationType.ApointedAsNewGuildLeader,
                                                                this.Leader);
                Asda2GuildHandler.SendImpeachmentResultResponse(this, Asda2GuildHandler.ImpeachmentResult.Success);
                Asda2GuildHandler.SendUpdateGuildInfoResponse(this, GuildInfoMode.Silent, (Character)null);
                this.AddHistoryMessage(Asda2GuildHistoryType.ApointedAsGuildLeaderThorowVote, 0, this.Leader.Name,
                                       DateTime.Now.ToLongTimeString());
            }
            else
            {
                Asda2GuildHandler.SendImpeachmentResultResponse(this, Asda2GuildHandler.ImpeachmentResult.Failed);
            }

            this._acceptedMembers.Clear();
            this._newLeader            = (GuildMember)null;
            this._impeachmentStartTime = DateTime.MinValue;
        }
Beispiel #2
0
        private void ImpeachmentCallback()
        {
            float num = (float)(_acceptedMembers.Count / (double)(MemberCount - 2) * 100.0);

            SendSystemMsg(string.Format("{0}% members accepted new leader.", num));
            if (num > 70.0)
            {
                Leader.Asda2RankId = 3;
                Asda2GuildHandler.SendGuildNotificationResponse(this, GuildNotificationType.RankChanged, Leader);
                Leader             = _newLeader;
                Leader.Asda2RankId = 4;
                Asda2GuildHandler.SendGuildNotificationResponse(this, GuildNotificationType.ApointedAsNewGuildLeader,
                                                                Leader);
                Asda2GuildHandler.SendImpeachmentResultResponse(this, Asda2GuildHandler.ImpeachmentResult.Success);
                Asda2GuildHandler.SendUpdateGuildInfoResponse(this, GuildInfoMode.Silent, null);
                AddHistoryMessage(Asda2GuildHistoryType.ApointedAsGuildLeaderThorowVote, 0, Leader.Name,
                                  DateTime.Now.ToLongTimeString());
            }
            else
            {
                Asda2GuildHandler.SendImpeachmentResultResponse(this, Asda2GuildHandler.ImpeachmentResult.Failed);
            }

            _acceptedMembers.Clear();
            _newLeader            = null;
            _impeachmentStartTime = DateTime.MinValue;
        }