-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPkPlayer.java
More file actions
139 lines (139 loc) · 3.71 KB
/
Copy pathPkPlayer.java
File metadata and controls
139 lines (139 loc) · 3.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
///*
//package SyncFrame;
//
//import org.apache.mina.core.session.IoSession;
//
//import java.util.Set;
//import java.util.TreeSet;
//
//public class PkPlayer {
// private int zoneId = 0;
// private int playerId = 0;
//
// private int lastSyncFrameSeq = 0;// 最近一次同步到的服务器帧序号,帧序号是递增的
// private long connectedTime = 0;// 连接到服务器的时间,大于0表示客户端网络联通了
// private long readyTime = 0;// 准备就绪的时间,大于0表示客户端准备就绪了
// private long changeAiTime = 0;//被转成AI的时间,大于0表示被转成了AI。转成AI之后可能又会转回来变成0
// private long offLineTime = 0;// 玩家掉线时间,大于0表示客户端连接掉线了
// private long endTime = 0;// 玩家上报的战斗结束时间,大于0表示已经上报结束
// private FrameSyncEndData endData;// 玩家上报的战斗结束信息,用于校验战斗结果
// private Set<Integer> receivedClientSeqSet = new TreeSet<Integer>();
// private int receivedClientSeqMax = 0;
//
// private IoSession ioSession = null;
//
// public IoSession getIoSession() {
// return ioSession;
// }
//
// public void setIoSession(IoSession ioSession) {
// this.ioSession = ioSession;
// }
//
// public long getOffLineTime() {
// return offLineTime;
// }
//
// public void setOffLineTime(long offLineTime) {
// this.offLineTime = offLineTime;
// }
//
// public int getZoneId() {
// return zoneId;
// }
//
// public void setZoneId(int zoneId) {
// this.zoneId = zoneId;
// }
//
// public int getPlayerId() {
// return playerId;
// }
//
// public void setPlayerId(int playerId) {
// this.playerId = playerId;
// }
//
// public String getPlayerIdStr() {
// return playerId + "@" + zoneId;
// }
//
// public int getLastSyncFrameSeq() {
// return lastSyncFrameSeq;
// }
//
// public void setLastSyncFrameSeq(int lastSyncFrameSeq) {
// this.lastSyncFrameSeq = lastSyncFrameSeq;
// }
//
// public long getConnectedTime() {
// return connectedTime;
// }
//
// public void setConnectedTime(long connectedTime) {
// this.connectedTime = connectedTime;
// }
//
// public long getReadyTime() {
// return readyTime;
// }
//
// public void setReadyTime(long readyTime) {
// this.readyTime = readyTime;
// }
//
// public long getEndTime() {
// return endTime;
// }
//
// public void setEndTime(long endTime) {
// this.endTime = endTime;
// }
//
// public FrameSyncEndData getEndData() {
// return endData;
// }
//
// public void setEndData(FrameSyncEndData endData) {
// this.endData = endData;
// }
//
// public Set<Integer> getReceivedClientSeqSet() {
// return receivedClientSeqSet;
// }
//
// public boolean isDealedClientSeq(int clientSeq) {
// return receivedClientSeqSet.contains(clientSeq);
// }
//
// public void addDealedClientSeq(int clientSeq) {
// receivedClientSeqSet.add(clientSeq);
// if (receivedClientSeqMax < clientSeq) {
// receivedClientSeqMax = clientSeq;
// }
// }
//
// public int getReceivedClientSeqMax() {
// return receivedClientSeqMax;
// }
//
// public long getChangeAiTime() {
// return changeAiTime;
// }
//
// public void setChangeAiTime(long changeAiTime) {
// this.changeAiTime = changeAiTime;
// }
//
// */
///*
// * 给玩家发送数据
// *//*
//
// public void send(Framesync.FrameSyncDataArray fsda) {
// if (ioSession != null) {
// ioSession.write(fsda);
// }
// }
//}
//*/