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(); } }
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) { } }