Skip to content

Commit fee1b08

Browse files
committed
up
1 parent 9f344d5 commit fee1b08

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

DataTypes.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,12 +491,25 @@ public class KBEDATATYPE_ENTITYCALL : KBEDATATYPE_BASE
491491
{
492492
public override object createFromStream(MemoryStream stream)
493493
{
494-
return stream.readBlob();
494+
UInt64 cid = stream.readUint64();
495+
Int32 id = stream.readInt32();
496+
UInt16 type = stream.readUint16();
497+
UInt16 utype = stream.readUint16();
498+
499+
return new byte[0];
495500
}
496501

497502
public override void addToStream(Bundle stream, object v)
498503
{
499-
stream.writeBlob((byte[])v);
504+
UInt64 cid = 0;
505+
Int32 id = 0;
506+
UInt16 type = 0;
507+
UInt16 utype = 0;
508+
509+
stream.writeUint64(cid);
510+
stream.writeInt32(id);
511+
stream.writeUint16(type);
512+
stream.writeUint16(utype);
500513
}
501514

502515
public override object parseDefaultValStr(string v)

EntityDef.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ public static void bindMessageDataType()
137137
datatype2id["PY_DICT"] = 10;
138138
datatype2id["PY_TUPLE"] = 10;
139139
datatype2id["PY_LIST"] = 10;
140-
datatype2id["ENTITYCALL"] = 10;
141140

142141
id2datatypes[10] = datatypes["PYTHON"];
143142

@@ -176,6 +175,8 @@ public static void bindMessageDataType()
176175
datatype2id["ARRAY"] = 19;
177176
// 这里不需要绑定,ARRAY需要根据不同类型实例化动态得到id
178177
//id2datatypes[19] = datatypes["ARRAY"];
178+
179+
datatype2id["ENTITYCALL"] = 20;
179180
}
180181
}
181182

0 commit comments

Comments
 (0)