Skip to content

Commit e858464

Browse files
author
magiclu550
committed
[proxy] do packet
1 parent 7f2b072 commit e858464

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

jsmod2/NetworkHandler.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ static NetworkHandler()
8888
handlers.Add(183,new HandlePlayerSetRoleItems());
8989
handlers.Add(184,new HandleTeamRespawnEventGetPlayers());
9090
handlers.Add(185,new HandleTeamRespawnEventSetPlayers());
91+
handlers.Add(190,new HandleDo());
9192
}
9293
public static void handleJsmod2(int id, String json,Dictionary<string,string> mapper,TcpClient client)
9394
{
@@ -200,6 +201,17 @@ public static object getTypeValue(string val)
200201
}
201202
}
202203

204+
public class HandleDo : Handler
205+
{
206+
public JsonSetting[] handle(object api, Dictionary<string, string> mapper)
207+
{
208+
Type type = api.GetType();
209+
MethodInfo info = type.GetMethod(mapper["do"]);
210+
info.Invoke(api,null);
211+
return null;
212+
}
213+
}
214+
203215
public interface Handler
204216
{
205217
JsonSetting[] handle(object api,Dictionary<string,string> mapper);

0 commit comments

Comments
 (0)