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


C# MabiPacket.PutLong方法代码示例

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


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

示例1: CombatTargetSet

        public static void CombatTargetSet(MabiCreature creature, MabiCreature target)
        {
            var packet = new MabiPacket(Op.CombatTargetSet, creature.Id);
            packet.PutLong(target != null ? target.Id : 0);

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

示例2: Close

 public virtual void Close(WorldClient client, string message = "<end/>")
 {
     var p = new MabiPacket(Op.NPCTalkEndR, client.Character.Id);
     p.PutByte(1);
     p.PutLong(client.NPCSession.Target.Id);
     p.PutString(message);
     client.Send(p);
 }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:8,代码来源:NPCScript.cs

示例3: ConfirmMailRecipentResponse

        public static void ConfirmMailRecipentResponse(WorldClient client, bool success, ulong recipientId)
        {
            var packet = new MabiPacket(Op.ConfirmMailRecipentR, client.Character.Id);
            packet.PutByte(success);
            if (success)
                packet.PutLong(recipientId);

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

示例4: GetMailsResponse

        public static void GetMailsResponse(WorldClient client, IEnumerable<MabiMail> mails)
        {
            var p = new MabiPacket(Op.GetMailsR, client.Character.Id);
            foreach (var mail in mails)
                p.Add(mail);
            p.PutLong(0);

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

示例5: ItemAmount

        /// <summary>
        /// Sends ItemAmount to creature's client.
        /// </summary>
        /// <param name="creature"></param>
        /// <param name="item"></param>
        public static void ItemAmount(MabiCreature creature, MabiItem item)
        {
            var packet = new MabiPacket(Op.ItemAmount, creature.Id);
            packet.PutLong(item.Id);
            packet.PutShort(item.Info.Amount);
            packet.PutByte(2); // ? (related to the 2 in move item?)

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

示例6: NPCTalkStartResponse

        public static void NPCTalkStartResponse(WorldClient client, bool success, ulong npcId)
        {
            var packet = new MabiPacket(Op.NPCTalkStartR, client.Character.Id);
            packet.PutByte(success);
            if (success)
                packet.PutLong(npcId);

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

示例7: LoginResponse

        /// <summary>
        /// Sends positive login response.
        /// </summary>
        /// <param name="client"></param>
        /// <param name="creature"></param>
        public static void LoginResponse(Client client, MabiCreature creature)
        {
            var packet = new MabiPacket(Op.WorldLoginR, Id.World);
            packet.PutByte(true);
            packet.PutLong(creature.Id);
            packet.PutLong(MabiTime.Now.DateTime);
            packet.PutInt(1);
            packet.PutString("");

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

示例8: RecallMailResponse

        public static void RecallMailResponse(WorldClient client, bool success, ulong mailId)
        {
            var packet = new MabiPacket(Op.RecallMailR, client.Character.Id);
            packet.PutByte(success);
            if (success)
            {
                packet.PutByte(success);
                packet.PutLong(mailId);
            }

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

示例9: NPCTalkPartnerStartResponse

        public static void NPCTalkPartnerStartResponse(WorldClient client, bool success, ulong id, string partnerName)
        {
            var packet = new MabiPacket(Op.NPCTalkPartnerR, client.Character.Id);
            packet.PutByte(success);
            if (success)
            {
                packet.PutLong(id);
                packet.PutString(client.Character.Name + "'s " + partnerName);
                packet.PutString(client.Character.Name + "'s " + partnerName);
                client.Send(packet);
            }

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

示例10: AddMemberPacket

        public void AddMemberPacket(MabiPacket packet, MabiCreature member)
        {
            if (!Members.Contains(member))
                return;

            packet.PutInt(this.GetMemberNumber(member));
            packet.PutLong(member.Id);
            packet.PutString(member.Name);
            packet.PutByte(1); // ?
            packet.PutInt(member.Region);
            MabiVertex loc = member.GetPosition();
            packet.PutInt(loc.X);
            packet.PutInt(loc.Y);
            packet.PutByte(0); // ?
            packet.PutInt((uint)((member.Life * 100) / member.LifeMax));
            packet.PutInt((uint)member.LifeMax);
            packet.PutLong(0); // ?
        }
开发者ID:hzdlive,项目名称:aura,代码行数:18,代码来源:MabiParty.cs

示例11: ViewEquipmentResponse

        /// <summary>
        /// Sends view equipment to client. Response is negative if items is null.
        /// </summary>
        /// <param name="client"></param>
        /// <param name="targetId"></param>
        /// <param name="items"></param>
        public static void ViewEquipmentResponse(WorldClient client, ulong targetId, IEnumerable<MabiItem> items)
        {
            var packet = new MabiPacket(Op.ViewEquipmentR, client.Character.Id);
            if (items != null)
            {
                packet.PutByte(true);
                packet.PutLong(targetId);
                packet.PutInt((ushort)items.Count());
                foreach (var item in items)
                    packet.AddItemInfo(item, ItemPacketType.Private);
            }
            else
            {
                packet.PutByte(false);
            }

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

示例12: EnterRegionPermission

        /// <summary>
        /// Sends enter region permission, which kinda makes the client warp.
        /// </summary>
        /// <param name="client"></param>
        /// <param name="creature"></param>
        /// <param name="permission"></param>
        public static void EnterRegionPermission(WorldClient client, MabiCreature creature, bool permission = true)
        {
            var pos = creature.GetPosition();

            var p = new MabiPacket(Op.EnterRegionPermission, Id.World);
            p.PutLong(creature.Id);
            p.PutByte(permission);
            if (permission)
            {
                p.PutInt(creature.Region);
                p.PutInt(pos.X);
                p.PutInt(pos.Y);
            }

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

示例13: StatusEffectUpdate

        /// <summary>
        /// Broadcasts current conditions of creature.
        /// </summary>
        /// <param name="wm"></param>
        /// <param name="creature"></param>
        public static void StatusEffectUpdate(MabiCreature creature)
        {
            var packet = new MabiPacket(Op.StatusEffectUpdate, creature.Id);
            packet.PutLong((ulong)creature.Conditions.A);
            packet.PutLong((ulong)creature.Conditions.B);
            packet.PutLong((ulong)creature.Conditions.C);
            // [150100] New conditions list
            {
                packet.PutLong((ulong)creature.Conditions.D);
            }
            packet.PutInt(0);

            WorldManager.Instance.Broadcast(packet, SendTargets.Range, creature);
        }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:19,代码来源:Send.Character.cs

示例14: ItemRemove

        /// <summary>
        /// Sends ItemRemove to creature's client.
        /// </summary>
        /// <param name="creature"></param>
        /// <param name="item"></param>
        public static void ItemRemove(MabiCreature creature, MabiItem item)
        {
            var packet = new MabiPacket(Op.ItemRemove, creature.Id);
            packet.PutLong(item.Id);
            packet.PutByte(item.Info.Pocket);

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

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


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