Ejemplo n.º 1
0
        internal override async void Process()
        {
            Alliance a = ObjectManager.GetAlliance(this.Device.Player.Avatar.AllianceId);

            if (a != null)
            {
                AllianceMemberEntry _AllianceMemberEntry = a.m_vAllianceMembers[this.Device.Player.Avatar.UserId];
                _AllianceMemberEntry.ToggleStatus();
                PlayerWarStatusMessage _PlayerWarStatusMessage = new PlayerWarStatusMessage(this.Device)
                {
                    Status = _AllianceMemberEntry.WarOptInStatus
                };
                _PlayerWarStatusMessage.Send();
            }
        }
Ejemplo n.º 2
0
        public override async void Execute(Level level)
        {
            try
            {
                Alliance a = await ObjectManager.GetAlliance(level.GetPlayerAvatar().GetAllianceId());

                if (a != null)
                {
                    AllianceMemberEntry _AllianceMemberEntry = a.GetAllianceMember(level.GetPlayerAvatar().GetId());
                    _AllianceMemberEntry.ToggleStatus();
                    PlayerWarStatusMessage _PlayerWarStatusMessage = new PlayerWarStatusMessage(level.GetClient());
                    _PlayerWarStatusMessage.SetStatus(_AllianceMemberEntry.GetStatus());
                    PacketProcessor.Send(_PlayerWarStatusMessage);
                }
            }
            catch (Exception)
            {
            }
        }