mirror of
https://github.com/GTNewHorizons/Opis.git
synced 2026-11-23 21:49:42 +00:00
Refactoring of client side packet handling.
It is using the same enum and same generic design as the server side.
This commit is contained in:
1 parent
3f8fcac81c
commit
dcbc5e2f59
15 files changed
+265
-257
No files matched your search
@@ -24,7 +24,7 @@ public class Packet_DataValue extends Packet_DataAbstract{
|
||||
|
||||
try{
|
||||
this.header = istream.readByte();
|
||||
this.dataReq = Message.values()[istream.readInt()];
|
||||
this.msg = Message.values()[istream.readInt()];
|
||||
String datatype = "";
|
||||
datatype = Packet.readString(istream, 255);
|
||||
data = dataRead(datatype, istream);
|
||||
@@ -55,7 +55,7 @@ public class Packet_DataValue extends Packet_DataAbstract{
|
||||
packet.length = bos.size();
|
||||
|
||||
Packet_DataValue capsule = new Packet_DataValue();
|
||||
capsule.dataReq = dataReq;
|
||||
capsule.msg = dataReq;
|
||||
capsule.header = Packets.DATA_VALUE_GENERAL;
|
||||
capsule.packet = packet;
|
||||
|
||||
|
||||
Reference in new issue
Block a user