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


C# MabiPacket.PutBin方法代码示例

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


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

示例1: DyePickColorR

        /// <summary>
        /// Sends DyePickColorR to creature's client.
        /// </summary>
        /// <param name="creature"></param>
        /// <param name="success"></param>
        public static void DyePickColorR(MabiCreature creature, bool success)
        {
            var packet = new MabiPacket(Op.DyePickColorR, creature.Id);
            packet.PutByte(success);
            if (success)
                packet.PutBin(creature.Temp.DyeCursors);

            creature.Client.Send(packet);
        }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:14,代码来源:Send.Item.cs

示例2: SendScript

 protected void SendScript(WorldClient client, string xml)
 {
     var p = new MabiPacket(Op.NPCTalk, client.Character.Id);
     p.PutString(xml);
     p.PutBin(new byte[] { 0 });
     client.Send(p);
 }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:7,代码来源:NPCScript.cs

示例3: CutsceneStart

        public static void CutsceneStart(WorldClient client, MabiCutscene cutscene)
        {
            var p = new MabiPacket(Op.CutsceneStart, Id.World);
            p.PutLongs(client.Character.Id, cutscene.Leader.Id);
            p.PutString(cutscene.Name);
            p.PutSInt(cutscene.Actors.Count);
            foreach (var a in cutscene.Actors)
            {
                p.PutString(a.Item1);
                p.PutShort((ushort)a.Item2.Length);
                p.PutBin(a.Item2);
            }
            p.PutInt(1);
            p.PutLong(client.Character.Id);

            client.Send(p);
        }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:17,代码来源:Send.Character.cs

示例4: EntitiesAppear

        public static void EntitiesAppear(Client client, IEnumerable<MabiEntity> entities)
        {
            var packet = new MabiPacket(Op.EntitiesAppear, Id.Broadcast);

            packet.PutShort((ushort)entities.Count());
            foreach (var entity in entities)
            {
                var data = new MabiPacket(0, 0);
                data.AddPublicEntityInfo(entity);
                var dataBytes = data.Build(false);

                packet.PutShort(entity.DataType);
                packet.PutInt((uint)dataBytes.Length);
                packet.PutBin(dataBytes);
            }

            client.Send(packet);
        }
开发者ID:pjm0616,项目名称:aura,代码行数:18,代码来源:Send.World.cs

示例5: EquipmentChanged

        public static void EquipmentChanged(MabiCreature creature, MabiItem item)
        {
            var packet = new MabiPacket(Op.EquipmentChanged, creature.Id);
            packet.PutBin(item.Info);
            packet.PutByte(1);

            WorldManager.Instance.Broadcast(packet, SendTargets.Range, creature);

            WorldManager.Instance.CreatureStatsUpdate(creature);
        }
开发者ID:pjm0616,项目名称:aura,代码行数:10,代码来源:Send.World.cs

示例6: SkillRankUp

        public static void SkillRankUp(Client client, MabiCreature creature, MabiSkill skill)
        {
            var packet = new MabiPacket(Op.SkillRankUp, creature.Id);
            packet.PutByte(1);
            packet.PutBin(skill.Info);
            packet.PutFloat(0);

            client.Send(packet);
        }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:9,代码来源:Send.Skill.cs

示例7: SkillInfo

        public static void SkillInfo(Client client, MabiCreature creature, MabiSkill skill)
        {
            var packet = new MabiPacket(Op.SkillInfo, creature.Id);
            packet.PutBin(skill.Info);

            client.Send(packet);
        }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:7,代码来源:Send.Skill.cs

示例8: CharacterInfo

        /// <summary>
        /// Sends character info. 
        /// </summary>
        /// <param name="client"></param>
        /// <param name="character"></param>
        public static void CharacterInfo(LoginClient client, uint op, Character character, IEnumerable<Item> items)
        {
            var packet = new MabiPacket(op, Id.Login);
            if (character != null)
            {
                packet.PutByte(true);
                packet.PutString(character.Server);
                packet.PutLong(character.Id);
                packet.PutByte(1);
                packet.PutString(character.Name);
                packet.PutString("");
                packet.PutString("");
                packet.PutInt(character.Race);
                packet.PutByte(character.SkinColor);
                packet.PutByte(character.Eye);
                packet.PutByte(character.EyeColor);
                packet.PutByte(character.Mouth);
                packet.PutInt(0);
                packet.PutFloat(character.Height);
                packet.PutFloat(character.Weight);
                packet.PutFloat(character.Upper);
                packet.PutFloat(character.Lower);
                packet.PutInt(0);
                packet.PutInt(0);
                packet.PutInt(0);
                packet.PutByte(0);
                packet.PutInt(0);
                packet.PutByte(0);
                packet.PutInt(character.Color1);
                packet.PutInt(character.Color2);
                packet.PutInt(character.Color3);
                packet.PutFloat(0.0f);
                packet.PutString("");
                packet.PutFloat(49.0f);
                packet.PutFloat(49.0f);
                packet.PutFloat(0.0f);
                packet.PutFloat(49.0f);
                packet.PutInt(0);
                packet.PutInt(0);
                packet.PutShort(0);
                packet.PutLong(0);
                packet.PutString("");
                packet.PutByte(0);

                packet.PutSInt(items.Count());
                foreach (var item in items)
                {
                    packet.PutLong(item.Id);
                    packet.PutBin(item.Info);
                }

                packet.PutInt(0);  // PetRemainingTime
                packet.PutLong(0); // PetLastTime
                packet.PutLong(0); // PetExpireTime
            }
            else
            {
                packet.PutByte(false);
            }

            client.Send(packet);
        }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:67,代码来源:Send.cs


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