本文整理汇总了C#中Packets.GetVersion方法的典型用法代码示例。如果您正苦于以下问题:C# Packets.GetVersion方法的具体用法?C# Packets.GetVersion怎么用?C# Packets.GetVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Packets
的用法示例。
在下文中一共展示了Packets.GetVersion方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnSendVersion
public void OnSendVersion(Packets.Client.CSMG_SEND_VERSION p)
{
Logger.ShowInfo("Client(Version:" + p.GetVersion() + ") is trying to connect...");
this.client_Version = p.GetVersion();
Packets.Server.SSMG_VERSION_ACK p1 = new SagaLogin.Packets.Server.SSMG_VERSION_ACK();
p1.SetResult(SagaLogin.Packets.Server.SSMG_VERSION_ACK.Result.OK);
p1.SetVersion(this.client_Version);
this.netIO.SendPacket(p1);
//Official HK server will now request for Hackshield GUID check , we don't know its algorithms, so not implemented
Packets.Server.SSMG_LOGIN_ALLOWED p2 = new SagaLogin.Packets.Server.SSMG_LOGIN_ALLOWED();
this.frontWord = (uint)Global.Random.Next();
this.backWord = (uint)Global.Random.Next();
p2.FrontWord = this.frontWord;
p2.BackWord = this.backWord;
this.netIO.SendPacket(p2);
}
示例2: OnSendVersion
public void OnSendVersion(Packets.Client.CSMG_SEND_VERSION p)
{
Logger.ShowInfo(string.Format(LocalManager.Instance.Strings.CLIENT_CONNECTING, p.GetVersion()));
this.client_Version = p.GetVersion();
Packets.Server.SSMG_VERSION_ACK p1 = new SagaMap.Packets.Server.SSMG_VERSION_ACK();
p1.SetResult(SagaMap.Packets.Server.SSMG_VERSION_ACK.Result.OK);
p1.SetVersion(this.client_Version);
this.netIO.SendPacket(p1);
//Official HK server will now request for Hackshield GUID check , we don't know its algorithms, so not implemented
Packets.Server.SSMG_LOGIN_ALLOWED p2 = new SagaMap.Packets.Server.SSMG_LOGIN_ALLOWED();
this.frontWord = (uint)Global.Random.Next();
this.backWord = (uint)Global.Random.Next();
p2.FrontWord = this.frontWord;
p2.BackWord = this.backWord;
this.netIO.SendPacket(p2);
}