当前位置: 首页>>代码示例>>C#>>正文


C# PacketOut.WriteHexStringBytes方法代码示例

本文整理汇总了C#中FrameWork.PacketOut.WriteHexStringBytes方法的典型用法代码示例。如果您正苦于以下问题:C# PacketOut.WriteHexStringBytes方法的具体用法?C# PacketOut.WriteHexStringBytes怎么用?C# PacketOut.WriteHexStringBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FrameWork.PacketOut的用法示例。


在下文中一共展示了PacketOut.WriteHexStringBytes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SendAbilityDone

        public void SendAbilityDone(ushort TargetOID)
        {
            Log.Success("Ability", "Send Done :" + Info.Entry);

            Player player = this.Caster.GetPlayer();
            PacketOut Out1 = new PacketOut((byte)Opcodes.F_USE_ABILITY);
            Out1.WriteUInt16(0);
            Out1.WriteUInt16(Info.Entry);
            Out1.WriteUInt16(Caster.Oid);
            Out1.WriteHexStringBytes("061022730601000001E601000000");
            player.DispatchPacket(Out1, true);

            PacketOut Out2 = new PacketOut((byte)Opcodes.F_USE_ABILITY);
            Out2.WriteUInt16(0);
            Out2.WriteUInt16(Info.Entry);
            Out2.WriteUInt16(Caster.Oid);
            Out2.WriteHexStringBytes("0610227302010000000001000000");
            player.DispatchPacket(Out2, true);

            PacketOut Out3 = new PacketOut((byte)Opcodes.F_SWITCH_ATTACK_MODE);
            Out3.WriteByte(1);
            Out3.Fill(0, 3);
            player.SendPacket(Out3);

            PacketOut Out4 = new PacketOut((byte)Opcodes.F_SET_ABILITY_TIMER);
            Out4.WriteUInt16(Info.Entry);
            Out4.Fill(0, 10);
            player.SendPacket(Out4);
        }
开发者ID:Necrosummon,项目名称:WarEmu,代码行数:29,代码来源:Ability.cs

示例2: SendSniff

        public void SendSniff(string Str)
        {
            string Result = "";
            using (StringReader Reader = new StringReader(Str))
            {
                string Line;
                while ((Line = Reader.ReadLine()) != null)
                {
                    Result+=Line.Substring(1, 48).Replace(" ", string.Empty);
                }
            }

            Result = Result.Remove(0, 4);
            byte Opcode = Convert.ToByte(Result.Substring(0, 2), 16);
            Result = Result.Remove(0, 2);

            PacketOut Out = new PacketOut(Opcode);
            Out.WriteHexStringBytes(Result);
            Out.WritePacketLength();
            SendPacket(Out);
        }
开发者ID:dzikun,项目名称:WarEmu,代码行数:21,代码来源:Player.cs


注:本文中的FrameWork.PacketOut.WriteHexStringBytes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。