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


C# NetworkMessage.AddString方法代码示例

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


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

示例1: ToNetworkMessage

        public override void ToNetworkMessage(NetworkMessage msg)
        {
            msg.AddByte((byte)Type);

            msg.AddUInt32(WindowId);
            msg.AddUInt16(ItemId);
            msg.AddUInt16(MaxLength);
            msg.AddString(Text);
            msg.AddString(Author);
            msg.AddString(Date);
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:11,代码来源:ItemTextWindowPacket.cs

示例2: ToNetworkMessage

 public override void ToNetworkMessage(NetworkMessage msg)
 {
     msg.AddByte((byte)Type);
     msg.AddLocation(Location);
     msg.AddByte((byte)Color);
     msg.AddString(Message);
 }
开发者ID:FaNtA91,项目名称:pokemonapi,代码行数:7,代码来源:AnimatedTextPacket.cs

示例3: ToNetworkMessage

        public override void ToNetworkMessage(NetworkMessage msg)
        {
            msg.AddByte((byte)Type);

            msg.AddUInt16(ChannelId);
            msg.AddString(Name);
        }
开发者ID:FaNtA91,项目名称:pokemonapi,代码行数:7,代码来源:PrivateChannelCreatePacket.cs

示例4: ToNetworkMessage

 public override void ToNetworkMessage(NetworkMessage msg)
 {
     msg.AddByte((byte)Type);
     msg.AddUInt32(PlayerId);
     msg.AddString(PlayerName);
     msg.AddByte(PlayerState);
 }
开发者ID:FaNtA91,项目名称:pokemonapi,代码行数:7,代码来源:VipStatePacket.cs

示例5: Create

        public static NetworkMessage Create(byte OS, ushort Version,
            byte[] Signatures, byte[] XteaKey, string AccountName, string Password,bool OpenTibia)
        {
            NetworkMessage msg = new NetworkMessage(149);
            msg.AddByte(0x95);
            msg.AddByte(0x00);
            msg.Position += 4;
            msg.AddByte(0x01);
            msg.AddUInt16(OS);
            msg.AddUInt16(Version);
            msg.AddBytes(Signatures);
            msg.AddByte(0x0);
            msg.AddBytes(XteaKey);
            msg.AddString(AccountName);
            msg.AddString(Password);
            msg.RsaOTEncrypt(23);

            return msg;
        }
开发者ID:FaNtA91,项目名称:pokemonapi,代码行数:19,代码来源:LoginServerRequestPacket.cs

示例6: ToNetworkMessage

        public override void ToNetworkMessage(NetworkMessage msg)
        {
            msg.AddByte((byte)Type);

            SpeechTypeInfo info = Enums.GetSpeechTypeInfo(Client.GetVersionNumber(), SpeechType);

            msg.AddByte(info.Value);

            if (SpeechType == SpeechType.Private)
            {
                msg.AddString(Receiver);
            }
            else if (info.AdditionalSpeechData == AdditionalSpeechData.ChannelId)
            {
                msg.AddUInt16((ushort)ChannelId);
            }

            msg.AddString(Message);
        }
开发者ID:FaNtA91,项目名称:pokemonapi,代码行数:19,代码来源:PlayerSpeechPacket.cs

示例7: ToNetworkMessage

        public override void ToNetworkMessage(NetworkMessage msg)
        {
            msg.AddByte((byte)Type);
            msg.AddByte((byte)Channels.Count);

            foreach (Objects.Channel c in Channels)
            {
                msg.AddUInt16((ushort)c.Id);
                msg.AddString(c.Name);
            }
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:11,代码来源:ChannelListPacket.cs

示例8: ToNetworkMessage

        public override void ToNetworkMessage(NetworkMessage msg)
        {
            msg.AddByte((byte)Type);
            msg.AddUInt16((ushort)ChannelId);
            msg.AddString(ChannelName);

            if (Client.VersionNumber >= 872)
            {
                msg.AddUInt16(NumberOfParticipants);
                for (ushort p = 0; p < NumberOfParticipants; p++)
                {
                    msg.AddString(Participants[p]);
                }
                msg.AddUInt16(NumberOfInvitees);
                for (ushort i = 0; i < NumberOfInvitees; i++)
                {
                    msg.AddString(Invitees[i]);
                }
            }
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:20,代码来源:ChannelOpenPacket.cs

示例9: Create

        public static NetworkMessage Create(byte OS, ushort Version,
         byte[] XteaKey, string AccountName,string CharacterName, string Password, bool OpenTibia)
        {
            NetworkMessage msg = new NetworkMessage(139);
            msg.AddByte(0x89);
            msg.AddByte(0x00);
            msg.Position += 4;
            msg.AddByte(0x0A);
            msg.AddUInt16(OS);
            msg.AddUInt16(Version);
            msg.AddByte(0x0);
            msg.AddBytes(XteaKey);
            msg.AddByte(0x0);
            msg.AddString(AccountName);
            msg.AddString(CharacterName);
            msg.AddString(Password);
            msg.RsaOTEncrypt(11);

            return msg;
        }
开发者ID:FaNtA91,项目名称:pokemonapi,代码行数:20,代码来源:GameServerRequestPacket.cs

示例10: ToNetworkMessage

        public override void ToNetworkMessage(NetworkMessage msg)
        {
            msg.AddByte((byte)Type);

            msg.AddString(Name);
            msg.AddByte((byte)Items.Count);

            foreach (Objects.Item i in Items)
            {
                msg.AddItem(i);
            }
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:12,代码来源:SafeTradeRequestNoAckPacket.cs

示例11: ToNetworkMessage

        public override void ToNetworkMessage(NetworkMessage msg)
        {
            msg.AddByte((byte)Type);
            msg.AddOutfit(Default);
            msg.AddByte((byte)OutfitList.Count);

            foreach (AvalibleOutfit i in OutfitList)
            {
                msg.AddUInt16(i.Id);
                msg.AddString(i.Name);
                msg.AddByte(i.Addons);
            }
        }
开发者ID:FaNtA91,项目名称:pokemonapi,代码行数:13,代码来源:OutfitWindowPacket.cs

示例12: ToNetworkMessage

        public override void ToNetworkMessage(NetworkMessage msg)
        {
            msg.AddByte((byte)Type);

            msg.AddByte((byte)ShopList.Count);

            foreach (ShopInfo i in ShopList)
            {
                msg.AddUInt16(i.ItemId);
                msg.AddByte(i.SubType);
                msg.AddString(i.ItemName);
                msg.AddUInt32(i.Weight);
                msg.AddUInt32(i.BuyPrice);
                msg.AddUInt32(i.SellPrice);
            }
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:16,代码来源:ShopWindowOpenPacket.cs

示例13: ToNetworkMessage

        public override void ToNetworkMessage(NetworkMessage msg)
        {
            msg.AddByte((byte)Type);

            msg.AddByte(Id);
            msg.AddUInt16(ItemId);
            msg.AddString(Name);
            msg.AddByte(Capacity);
            msg.AddByte(HasParent);
            msg.AddByte((byte)Items.Count);


            foreach (Objects.Item i in Items)
            {
                msg.AddItem(i);
            }
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:17,代码来源:ContainerOpenPacket.cs

示例14: ToNetworkMessage

        public override void ToNetworkMessage(NetworkMessage msg)
        {
            msg.AddByte((byte)Type);

            msg.AddOutfit(Default);

            msg.AddByte((byte)OutfitList.Count);

            foreach (AvalibleOutfit i in OutfitList)
            {
                msg.AddUInt16(i.Id);
                msg.AddString(i.Name);
                msg.AddByte(i.Addons);
            }

            if (Client.VersionNumber >= 870)
            {
                msg.AddByte((byte)MountList.Count);

                foreach (MountDescription i in MountList)
                {
                    msg.AddUInt16(i.Id);
                    msg.AddString(i.Name);
                }
            }
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:26,代码来源:OutfitWindowPacket.cs

示例15: ToNetworkMessage

 public NetworkMessage ToNetworkMessage()
 {
     NetworkMessage message = new NetworkMessage();
     message.AddByte(0x04);
     message.AddString(TextName);
     message.AddUInt32(PosX);
     message.AddUInt32(PosY);
     message.AddUInt32(R);
     message.AddUInt32(G);
     message.AddUInt32(B);
     message.AddUInt32(FontType);
     message.AddString(TextToPrint);
     message.Position = 8;
     return message;
 }
开发者ID:PimentelM,项目名称:extibiabot,代码行数:15,代码来源:HudItem.cs


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