@@ -81,6 +81,7 @@ static NetworkHandler()
8181 handlers . Add ( 131 , new HandleGeneratorUnlock ( ) ) ;
8282 handlers . Add ( 180 , new EventHandler ( ) ) ;
8383 handlers . Add ( 181 , new EventHandler ( ) ) ;
84+ handlers . Add ( 182 , new HandlePlayerContain106GetScp106s ( ) ) ;
8485 }
8586 public static void handleJsmod2 ( int id , String json , Dictionary < string , string > mapper , TcpClient client )
8687 {
@@ -198,6 +199,24 @@ public interface Handler
198199 JsonSetting [ ] handle ( object api , Dictionary < string , string > mapper ) ;
199200}
200201
202+ public class HandlePlayerContain106GetScp106s : Handler
203+ {
204+ public JsonSetting [ ] handle ( object api , Dictionary < string , string > mapper )
205+ {
206+ PlayerContain106Event e = api as PlayerContain106Event ;
207+ Player [ ] players = e . SCP106s ;
208+ JsonSetting [ ] settings = new JsonSetting [ players . Length ] ;
209+ for ( int i = 0 ; i < settings . Length ; i ++ )
210+ {
211+ settings [ i ] = new JsonSetting ( Lib . getInt ( mapper [ "id" ] ) , null ,
212+ new IdMapping ( ) . appendId ( Lib . ID , Guid . NewGuid ( ) . ToString ( ) , players [ i ] ) . appendId ( Lib . PLAYER_SCPDATA_ID , Guid . NewGuid ( ) . ToString ( ) , players [ i ] . Scp079Data ) . appendId ( Lib . PLAYER_TEAM_ROLE_ID , Guid . NewGuid ( ) . ToString ( ) , players [ i ] . TeamRole )
213+ ) ;
214+ }
215+
216+ return settings ;
217+ }
218+ }
219+
201220public class EventHandler : Handler
202221{
203222 public JsonSetting [ ] handle ( object api , Dictionary < string , string > mapper )
@@ -217,17 +236,6 @@ public JsonSetting[] handle(object api, Dictionary<string, string> mapper)
217236 {
218237 return Utils . getOne ( mapper [ "id" ] , obj , null ) ;
219238 }
220- if ( returnType == typeof ( List < Vector > ) )
221- {
222- List < Vector > vectors = ( List < Vector > ) obj ;
223- JsonSetting [ ] settings = new JsonSetting [ vectors . Count ] ;
224- for ( int i = 0 ; i < settings . Length ; i ++ )
225- {
226- settings [ i ] = new JsonSetting ( Lib . getInt ( mapper [ "id" ] ) , vectors [ i ] , null ) ;
227- }
228-
229- return settings ;
230- }
231239 return null ;
232240 }
233241
0 commit comments