Skip to content

Commit e9545af

Browse files
author
Peng Hu
committed
修复编译错误
1 parent 70e17ea commit e9545af

File tree

94 files changed

+12508
-13510
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+12508
-13510
lines changed

src/main/java/info/xiaomo/gengine/ai/btree/branch/Selector.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
/*******************************************************************************
2-
* Copyright 2014 See AUTHORS file.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
******************************************************************************/
16-
171
package info.xiaomo.gengine.ai.btree.branch;
182

193
import java.util.Arrays;
@@ -45,6 +29,7 @@ public Selector() {
4529
*
4630
* @param tasks the children of this task
4731
*/
32+
@SafeVarargs
4833
public Selector(Task<E>... tasks) {
4934
super(Arrays.asList(tasks));
5035
}

src/main/java/info/xiaomo/gengine/common/bean/Config.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class Config {
3535
public static long getId() {
3636
synchronized (obj) {
3737
id += 1;
38-
return (((long) SERVER_ID) & 0xFFFF) << 48 | (System.currentTimeMillis() / 1000L & 0xFFFFFFFF) << 16
38+
return (((long) SERVER_ID) & 0xFFFF) << 48 | (System.currentTimeMillis() / 1000L) << 16
3939
| id & 0xFFFF;
4040
}
4141
}

src/main/java/info/xiaomo/gengine/common/bean/NetPort.java

Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,53 @@
22

33
/**
44
* 网络端口常量
5-
*
6-
*
7-
* 2017年6月30日 下午2:57:34
5+
* <p>
6+
* <p>
7+
* 2017年6月30日 下午2:57:34
88
*/
99
public final class NetPort {
1010

11-
/** 集群Tcp端口 */
12-
public static int CLUSTER_PORT = 8000;
13-
/** 集群http端口 */
14-
public static int CLUSTER_HTTP_PORT = 8001;
11+
/**
12+
* 集群Tcp端口
13+
*/
14+
public static int CLUSTER_PORT = 8000;
15+
/**
16+
* 集群http端口
17+
*/
18+
public static int CLUSTER_HTTP_PORT = 8001;
1519

16-
/** 网关用户Tcp端口 */
17-
public static int GATE_USER_PORT = 8002;
18-
/** 网关游戏 tcp端口 (固定死) */
19-
public static final int GATE_GAME_PORT = 8003;
20-
/** 网关用户UPD端口 */
21-
public static int GATE_USER_UDP_PORT = 8004;
22-
/** 网关用户HTTP端口 */
23-
public static int GATE_HTTP_PORT = 8006;
24-
/** 网关用户WebSocket端口 */
25-
public static int GATE_USER_WEBSOCKET_PORT = 8007;
26-
27-
28-
29-
30-
// ======游戏服端口9000开始=======
20+
/**
21+
* 网关用户Tcp端口
22+
*/
23+
public static int GATE_USER_PORT = 8002;
24+
/**
25+
* 网关游戏 tcp端口 (固定死)
26+
*/
27+
public static final int GATE_GAME_PORT = 8003;
28+
/**
29+
* 网关用户UPD端口
30+
*/
31+
public static int GATE_USER_UDP_PORT = 8004;
32+
/**
33+
* 网关用户HTTP端口
34+
*/
35+
public static int GATE_HTTP_PORT = 8006;
36+
/**
37+
* 网关用户WebSocket端口
38+
*/
39+
public static int GATE_USER_WEBSOCKET_PORT = 8007;
3140

32-
/** 捕鱼达人 */
33-
public static int GAME_BYDR_PORT = 9001;
34-
/**捕鱼达人世界服*/
35-
public static int GAME_BYDR_WORLD_HTTP_PORT = 9992;
41+
42+
// ======游戏服端口9000开始=======
43+
44+
/**
45+
* 捕鱼达人
46+
*/
47+
public static int GAME_BYDR_PORT = 9001;
48+
/**
49+
* 捕鱼达人世界服
50+
*/
51+
public static int GAME_BYDR_WORLD_HTTP_PORT = 9992;
3652

3753
private NetPort() {
3854
}

src/main/java/info/xiaomo/gengine/common/bean/Reason.java

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,37 @@
33
/**
44
* 全局原因、类型区别
55
*
6-
*
7-
* <p>2017年7月26日 下午4:43:39
6+
*
7+
* <p>2017年7月26日 下午4:43:39
88
*/
99
public enum Reason {
10-
SessionIdle("会话空闲"),
11-
SessionClosed("会话关闭"),
10+
SessionIdle("会话空闲"),
11+
SessionClosed("会话关闭"),
1212

13-
UserQuit("用户退出"),
14-
UserLogin("用户登录"),
15-
UserReconnect("用户登录"),
13+
UserQuit("用户退出"),
14+
UserLogin("用户登录"),
15+
UserReconnect("用户登录"),
1616

17-
CrossServer("跨服"),
17+
CrossServer("跨服"),
1818

19-
RoleUseItem("使用物品"),
20-
RoleFire("开炮"),
21-
RoleSync("角色同步"),
19+
RoleUseItem("使用物品"),
20+
RoleFire("开炮"),
21+
RoleSync("角色同步"),
2222

23-
GmTickRole("gm踢角色下线"),
23+
GmTickRole("gm踢角色下线"),
2424

25-
HallGoldChange("大厅金币改变"),
25+
HallGoldChange("大厅金币改变"),
2626

27-
ServerClose("服务器关闭"),
28-
;
27+
ServerClose("服务器关闭"),
28+
;
2929

30-
private final String reason;
30+
private final String reason;
3131

32-
Reason(String reason) {
33-
this.reason = reason;
34-
}
32+
Reason(String reason) {
33+
this.reason = reason;
34+
}
3535

36-
public String getReason() {
37-
return reason;
38-
}
36+
public String getReason() {
37+
return reason;
38+
}
3939
}

src/main/java/info/xiaomo/gengine/common/bean/Result.java

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -5,62 +5,62 @@
55
@Data
66
public class Result<T> {
77

8-
private int resultCode = 200;
8+
private int resultCode = 200;
99

10-
private String message = "SUCCESS";
10+
private String message = "SUCCESS";
1111

12-
private T data;
12+
private T data;
1313

14-
/**
15-
* 只返回错误码
16-
*
17-
* @param resultCode resultCode
18-
*/
19-
public Result(int resultCode) {
20-
this.resultCode = resultCode;
21-
}
14+
/**
15+
* 只返回错误码
16+
*
17+
* @param resultCode resultCode
18+
*/
19+
public Result(int resultCode) {
20+
this.resultCode = resultCode;
21+
}
2222

23-
/**
24-
* 只有返回数据的(验证成功)
25-
*
26-
* @param data data
27-
*/
28-
public Result(T data) {
29-
this.data = data;
30-
}
23+
/**
24+
* 只有返回数据的(验证成功)
25+
*
26+
* @param data data
27+
*/
28+
public Result(T data) {
29+
this.data = data;
30+
}
3131

32-
/**
33-
* 只有错误码和错误信息的
34-
*
35-
* @param resultCode resultCode
36-
* @param message message
37-
*/
38-
public Result(int resultCode, String message) {
39-
this.resultCode = resultCode;
40-
this.message = message;
41-
}
32+
/**
33+
* 只有错误码和错误信息的
34+
*
35+
* @param resultCode resultCode
36+
* @param message message
37+
*/
38+
public Result(int resultCode, String message) {
39+
this.resultCode = resultCode;
40+
this.message = message;
41+
}
4242

43-
/**
44-
* 只有错误码和错误信息的
45-
*
46-
* @param resultCode resultCode
47-
*/
48-
public Result(int resultCode, T data) {
49-
this.resultCode = resultCode;
50-
this.data = data;
51-
}
43+
/**
44+
* 只有错误码和错误信息的
45+
*
46+
* @param resultCode resultCode
47+
*/
48+
public Result(int resultCode, T data) {
49+
this.resultCode = resultCode;
50+
this.data = data;
51+
}
5252

5353

54-
/**
55-
* 全部参数
56-
*
57-
* @param resultCode resultCode
58-
* @param message message
59-
* @param data data
60-
*/
61-
public Result(int resultCode, String message, T data) {
62-
this.resultCode = resultCode;
63-
this.message = message;
64-
this.data = data;
65-
}
54+
/**
55+
* 全部参数
56+
*
57+
* @param resultCode resultCode
58+
* @param message message
59+
* @param data data
60+
*/
61+
public Result(int resultCode, String message, T data) {
62+
this.resultCode = resultCode;
63+
this.message = message;
64+
this.data = data;
65+
}
6666
}

0 commit comments

Comments
 (0)