Skip to content

Commit 374af50

Browse files
author
magiclu550
committed
[proxy] fix a small bug
1 parent d8b2a15 commit 374af50

4 files changed

Lines changed: 24 additions & 16 deletions

File tree

jsmod2/Program.cs

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,7 @@
1212

1313
namespace jsmod2
1414
{
15-
[PluginDetails(
16-
author = "Magiclu550",
17-
name = "ProxyHandler",
18-
description = "用于响应JSMOD2端",
19-
id = "cn.jsmod2.ProxyHandler",
20-
configPrefix = "ep",
21-
langFile = "ProxyHandler",
22-
version = "1.0",
23-
SmodMajor = 3,
24-
SmodMinor = 4,
25-
SmodRevision = 0
26-
)]
15+
2716
/**
2817
* ProxyHandler主端,用于交互Jsmod2协议
2918
* JSON交互采用Socket
@@ -34,9 +23,15 @@ namespace jsmod2
3423

3524
public class RegisterEvents
3625
{
37-
private static HashMap<int,Type> events = new HashMap<int,Type>();
26+
private static HashMap<int,Type> events;
3827

39-
private static HashMap<Type,int> events_Id = new HashMap<Type,int>();
28+
private static HashMap<Type,int> events_Id;
29+
30+
static RegisterEvents()
31+
{
32+
events = new HashMap<int, Type>();
33+
events_Id = new HashMap<Type, int>();
34+
}
4035
public static void registerEvents()
4136
{
4237
events.put(0x01,typeof( AdminQueryEvent));//packet 1
@@ -129,6 +124,19 @@ public static int getId(Type t)
129124
}
130125

131126
}
127+
128+
[PluginDetails(
129+
author = "Magiclu550",
130+
name = "ProxyHandler",
131+
description = "用于响应JSMOD2端",
132+
id = "cn.jsmod2.ProxyHandler",
133+
configPrefix = "ep",
134+
langFile = "ProxyHandler",
135+
version = "1.0",
136+
SmodMajor = 3,
137+
SmodMinor = 4,
138+
SmodRevision = 0
139+
)]
132140
class ProxyHandler : Plugin
133141
{
134142

@@ -153,7 +161,7 @@ public override void Register()
153161
.append("jsmod2.port","19935")
154162
.append("jsmod2.debug","false")
155163
.create(Server.GetAppFolder()+"/jsmod2.conf");
156-
164+
157165
}
158166

159167
public override void OnEnable()

jsmod2/bin/Debug/jsmod2.pdb

3.54 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
eb06bdfef7a7a27ebd2cfe1595a0ae45daeca30d
1+
199cc863759673642775498a15f57236a6f7e1dd

jsmod2/obj/Debug/jsmod2.pdb

3.54 KB
Binary file not shown.

0 commit comments

Comments
 (0)