public void OnOutUserRequestBadge(DataInterceptedEventArgs e) { int userId = e.Packet.ReadInteger(); if (users.TryGetValue(userId, out var entity)) { selectedIndex = entity.Index; SelectUserLabel.Invoke((MethodInvoker) delegate { SelectUserLabel.Text = entity.Name; }); } }
public override void Out_RequestWearingBadges(DataInterceptedEventArgs e) { int userId = e.Packet.ReadInt32(); var entity = HentityUtils.FindEntityByUserID(userId); if (entity != null) { selectedIndex = entity.Index; SelectUserLabel.Invoke((MethodInvoker) delegate { SelectUserLabel.Text = entity.Name; }); } }