diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/dao/User.java b/LaunchServer/src/main/java/pro/gravit/launchserver/dao/User.java index 6dedae53..5c53dfde 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/dao/User.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/dao/User.java @@ -39,12 +39,6 @@ public class User { public String serverID; private String password_salt; public long permissions; - //TODO: заменить EAGER на LASY и придумать способ сохранить сессию - // [ERROR] org.hibernate.LazyInitializationException: - // failed to lazily initialize a collection of role: pro.gravit.launchserver.dao.User.hwids, could not initialize proxy - no Session - @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) - @JoinColumn(name = "user_id") - public Collection hwids; public void setPassword(String password) { password_salt = SecurityHelper.randomStringAESKey(); diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncher.java b/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncher.java index 75458e4c..0c49f46e 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncher.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncher.java @@ -34,6 +34,7 @@ import pro.gravit.launcher.LauncherEngine; import pro.gravit.launcher.api.AuthService; import pro.gravit.launcher.api.ClientService; +import pro.gravit.launcher.client.events.ClientLaunchPhase; import pro.gravit.launcher.client.events.ClientLauncherInitPhase; import pro.gravit.launcher.guard.LauncherGuardManager; import pro.gravit.launcher.gui.JSRuntimeProvider; @@ -543,6 +544,7 @@ public static void main(String... args) throws Throwable { CommonHelper.newThread("Client Directory Watcher", true, clientWatcher).start(); verifyHDir(params.assetDir, assetHDir, assetMatcher, digest); verifyHDir(params.clientDir, clientHDir, clientMatcher, digest); + LauncherEngine.modulesManager.invokeEvent(new ClientLaunchPhase(params)); launch(profile, params); } } diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/events/ClientLaunchPhase.java b/Launcher/src/main/java/pro/gravit/launcher/client/events/ClientLaunchPhase.java new file mode 100644 index 00000000..a7429d53 --- /dev/null +++ b/Launcher/src/main/java/pro/gravit/launcher/client/events/ClientLaunchPhase.java @@ -0,0 +1,12 @@ +package pro.gravit.launcher.client.events; + +import pro.gravit.launcher.client.ClientLauncher; +import pro.gravit.launcher.modules.LauncherModule; + +public class ClientLaunchPhase extends LauncherModule.Event { + public final ClientLauncher.Params params; + + public ClientLaunchPhase(ClientLauncher.Params params) { + this.params = params; + } +}