Rewrite parts of ClientState (#2065)

- Completely relies on hooks now, instead of the Framework.Update loop
- Support for Logout codes
This commit is contained in:
Haselnussbomber 2024-11-11 17:28:40 +01:00 committed by GitHub
parent c88e008672
commit c7facaf072
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 120 additions and 67 deletions

View file

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
@ -89,7 +89,7 @@ internal class AutoUpdateManager : IServiceType
t =>
{
t.Result.Login += this.OnLogin;
t.Result.Logout += this.OnLogout;
t.Result.Logout += (int type, int code) => this.OnLogout();
});
Service<Framework>.GetAsync().ContinueWith(t => { t.Result.Update += this.OnUpdate; });