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


C# NetworkMessage.AddUInt32方法代码示例

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


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

示例1: ToNetworkMessage

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

            msg.AddUInt16(Health);
            msg.AddUInt16(MaxHealth);
            msg.AddUInt32(Capacity);

            if (Client.VersionNumber >= 870)
            {
                msg.AddUInt64(Experience);
            }
            else
            {
                msg.AddUInt32((uint)Experience);
            }

            msg.AddUInt16(Level);

            msg.AddByte(LevelPercent);

            msg.AddUInt16(Mana);
            msg.AddUInt16(MaxMana);

            msg.AddByte(MagicLevel);
            msg.AddByte(MagicLevelPercent);
            msg.AddByte(Soul);

            msg.AddUInt16(Stamina);
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:30,代码来源:PlayerStatusPacket.cs

示例2: ToNetworkMessage

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

            if (Client.VersionNumber >= 860)
            {
                msg.AddUInt32(Count);
            }
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:10,代码来源:FollowPacket.cs

示例3: 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

示例4: ToNetworkMessage

 public override void ToNetworkMessage(NetworkMessage msg)
 {
     msg.AddByte((byte)Type);
     msg.AddUInt32(YourId);
     msg.AddUInt16(0x0032); // Related to client-side drawing speed
     msg.AddByte(CanReportBug);
 }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:7,代码来源:SelfAppearPacket.cs

示例5: ToNetworkMessage

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

示例6: 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

示例7: ToNetworkMessage

 public override void ToNetworkMessage(NetworkMessage msg)
 {
     msg.AddByte((byte)Type);
     msg.AddLocation(FromLocation);
     msg.AddUInt16(SpriteId);
     msg.AddByte(FromStackPosition);
     msg.AddUInt32(CreatureId);
 }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:8,代码来源:ItemUseBattlelistPacket.cs

示例8: 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

示例9: ToNetworkMessage

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

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

            foreach (ShopInfo i in ItemList)
            {
                msg.AddUInt16(i.ItemId);
                msg.AddByte(i.SubType);
            }
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:13,代码来源:ShopSaleGoldCountPacket.cs

示例10: ToNetworkMessage

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

            msg.AddUInt16(Health);
            msg.AddUInt16(MaxHealth);
            msg.AddUInt32(PokemonsCount);

            msg.AddUInt32((uint)Experience);

            msg.AddUInt16(Level);

            msg.AddByte(LevelPercent);

            msg.AddUInt16(Pokemons);
            msg.AddUInt16(PokemonsMax);

            msg.AddByte(MagicLevel);
            msg.AddByte(MagicLevelPercent);
            msg.AddByte(Soul);

            msg.AddUInt16(Stamina);
        }
开发者ID:FaNtA91,项目名称:pokemonapi,代码行数:23,代码来源:PlayerStatusPacket.cs

示例11: ToNetworkMessage

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

            msg.AddLocation(Position);
            msg.AddByte(StackPosition);
            msg.AddUInt16(ThingId);

            if (ThingId == 0x0061 || ThingId == 0x0062 || ThingId == 0x0063)
            {
                msg.AddUInt32(CreatureId);
                msg.AddByte(CreatureDirection);
            }
            else
            {
                if (Item.HasExtraByte)
                    msg.AddByte(Item.Count);
            }
        }
开发者ID:FaNtA91,项目名称:pokemonapi,代码行数:19,代码来源:TileTransformThingPacket.cs

示例12: ToNetworkMessage

 public override void ToNetworkMessage(NetworkMessage msg)
 {
     msg.AddByte((byte)Type);
     msg.AddUInt32(CreatureId);
     msg.AddOutfit(Outfit);
 }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:6,代码来源:CreatureOutfitPacket.cs

示例13: ToNetworkMessage

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

            msg.AddLocation(Location);
            msg.AddByte(Stack);
            msg.AddUInt16(ThingId);

            if (ThingId == 0x0061 || ThingId == 0x0062)
            {
                if (ThingId == 0x0062)
                    msg.AddUInt32(Creature.Id);
                else if (ThingId == 0x0061)
                {
                    msg.AddUInt32(Creature.RemoveId);
                    msg.AddUInt32(Creature.Id);
                    msg.AddString(Creature.Name);
                }

                msg.AddByte(Creature.Health);
                msg.AddByte(Creature.Direction);
                msg.AddOutfit(Creature.Outfit);

                msg.AddByte(Creature.LightLevel);
                msg.AddByte(Creature.LightColor);

                msg.AddUInt16(Creature.Speed);
                msg.AddByte((byte)Creature.Skull);
                msg.AddByte((byte)Creature.PartyShield);
                if (Client.VersionNumber >= 853)
                {
                    if (ThingId == 0x0061)
                        msg.AddByte((byte)Creature.WarIcon);
                    msg.AddByte(Convert.ToByte(Creature.IsBlocking));
                }
            }
            else if (ThingId == 0x0063)
            {
                msg.AddUInt32(Creature.Id);
                msg.AddByte(Creature.Direction);
            }
            else
            {
                if (Item.HasExtraByte)
                    msg.AddByte(Item.Count);
            }
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:47,代码来源:TileAddThingPacket.cs

示例14: ToNetworkMessage

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

            msg.AddUInt16(Health);
            msg.AddUInt16(MaxHealth);
            msg.AddUInt32(Capacity);

            msg.AddUInt32(Experience);

            msg.AddUInt16(Level);

            msg.AddByte(LevelPercent);

            msg.AddUInt16(Mana);
            msg.AddUInt16(MaxMana);

            msg.AddByte(MagicLevel);
            msg.AddByte(MagicLevelPercent);
            msg.AddByte(Soul);

            msg.AddUInt16(Stamina);
        }
开发者ID:sindromexd,项目名称:simplebot,代码行数:23,代码来源:PlayerStatusPacket.cs

示例15: ToNetworkMessage

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

            msg.AddUInt32(Unknown);
            msg.AddString(SenderName);
            msg.AddUInt16(SenderLevel);

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

            msg.AddByte(info.Value);

            switch (info.AdditionalSpeechData)
            {
                case AdditionalSpeechData.Location:
                    msg.AddLocation(Position);
                    break;
                case AdditionalSpeechData.ChannelId:
                    msg.AddUInt16((ushort)ChannelId);
                    break;
                case AdditionalSpeechData.Time:
                    msg.AddUInt32(Time);
                    break;
                default:
                    break;
            }

            msg.AddString(Message);
        }
开发者ID:Xileck,项目名称:tibiaapi,代码行数:29,代码来源:CreatureSpeechPacket.cs


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