|
@@ -1,39 +1,45 @@
|
|
|
// 服务器与客户端之间的消息 Opcode从1-9999
|
|
// 服务器与客户端之间的消息 Opcode从1-9999
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
|
-using MongoDB.Bson.Serialization;
|
|
|
|
|
|
|
+using ProtoBuf;
|
|
|
|
|
|
|
|
namespace Model
|
|
namespace Model
|
|
|
{
|
|
{
|
|
|
|
|
+ [ProtoContract]
|
|
|
[Message(Opcode.C2R_Login)]
|
|
[Message(Opcode.C2R_Login)]
|
|
|
public class C2R_Login: ARequest
|
|
public class C2R_Login: ARequest
|
|
|
{
|
|
{
|
|
|
|
|
+ [ProtoMember(1)]
|
|
|
public string Account;
|
|
public string Account;
|
|
|
|
|
+
|
|
|
|
|
+ [ProtoMember(2)]
|
|
|
public string Password;
|
|
public string Password;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ [ProtoContract]
|
|
|
[Message(Opcode.R2C_Login)]
|
|
[Message(Opcode.R2C_Login)]
|
|
|
public class R2C_Login: AResponse
|
|
public class R2C_Login: AResponse
|
|
|
{
|
|
{
|
|
|
|
|
+ [ProtoMember(1)]
|
|
|
public string Address { get; set; }
|
|
public string Address { get; set; }
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ [ProtoMember(2)]
|
|
|
public long Key { get; set; }
|
|
public long Key { get; set; }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ [ProtoContract]
|
|
|
[Message(Opcode.C2G_LoginGate)]
|
|
[Message(Opcode.C2G_LoginGate)]
|
|
|
public class C2G_LoginGate: ARequest
|
|
public class C2G_LoginGate: ARequest
|
|
|
{
|
|
{
|
|
|
|
|
+ [ProtoMember(1)]
|
|
|
public long Key;
|
|
public long Key;
|
|
|
-
|
|
|
|
|
- public C2G_LoginGate(long key)
|
|
|
|
|
- {
|
|
|
|
|
- this.Key = key;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ [ProtoContract]
|
|
|
[Message(Opcode.G2C_LoginGate)]
|
|
[Message(Opcode.G2C_LoginGate)]
|
|
|
public class G2C_LoginGate: AResponse
|
|
public class G2C_LoginGate: AResponse
|
|
|
{
|
|
{
|
|
|
|
|
+ [ProtoMember(1)]
|
|
|
public long PlayerId;
|
|
public long PlayerId;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -68,15 +74,19 @@ namespace Model
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ [ProtoContract]
|
|
|
[Message(Opcode.C2G_EnterMap)]
|
|
[Message(Opcode.C2G_EnterMap)]
|
|
|
public class C2G_EnterMap: ARequest
|
|
public class C2G_EnterMap: ARequest
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ [ProtoContract]
|
|
|
[Message(Opcode.G2C_EnterMap)]
|
|
[Message(Opcode.G2C_EnterMap)]
|
|
|
public class G2C_EnterMap: AResponse
|
|
public class G2C_EnterMap: AResponse
|
|
|
{
|
|
{
|
|
|
|
|
+ [ProtoMember(1)]
|
|
|
public long UnitId;
|
|
public long UnitId;
|
|
|
|
|
+ [ProtoMember(2)]
|
|
|
public int Count;
|
|
public int Count;
|
|
|
}
|
|
}
|
|
|
|
|
|