|
@@ -1,4 +1,5 @@
|
|
-using System.Collections.Generic;
|
|
+using System;
|
|
|
|
+using System.Collections.Generic;
|
|
using System.Text.Json;
|
|
using System.Text.Json;
|
|
using BattleIce;
|
|
using BattleIce;
|
|
using JsonSerializer = System.Text.Json.JsonSerializer;
|
|
using JsonSerializer = System.Text.Json.JsonSerializer;
|
|
@@ -184,11 +185,20 @@ namespace ET.Server
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
+
|
|
public static void OnLogin(this WNPlayer self)
|
|
public static void OnLogin(this WNPlayer self)
|
|
{
|
|
{
|
|
- self.ReadyFirst = true;
|
|
+ try
|
|
- self.DomainScene().GetComponent<GamePlayerComponent>().Add(self.GetId(), self);
|
|
+ {
|
|
|
|
+
|
|
|
|
+ self.ReadyFirst = true;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ catch (Exception e)
|
|
|
|
+ {
|
|
|
|
+ Log.Debug($"OnLogin 出错:{e}");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|