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


C# MabiPacket.GetElementType方法代码示例

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


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

示例1: Complete

        public override SkillResults Complete(MabiCreature creature, MabiSkill skill, MabiPacket packet)
        {
            if (creature.Temp.SkillItem1 == null || creature.Temp.SkillItem2 == null)
                return SkillResults.Failure;

            var part = packet.GetInt();

            if (packet.GetElementType() == ElementType.Short)
                return this.CompleteRegular(creature, packet, skill.Id, part);
            else if (packet.GetElementType() == ElementType.Byte)
                return this.CompleteFixed(creature, packet, skill.Id, part);

            return SkillResults.Failure;
        }
开发者ID:pjm0616,项目名称:aura,代码行数:14,代码来源:DyeHandler.cs

示例2: Start

        public override SkillResults Start(MabiCreature creature, MabiSkill skill, MabiPacket packet)
        {
            // Usually the second parameter is an empty string,
            // but if it's not empty it seems to be tags.
            var parameter = (packet != null && packet.GetElementType() == ElementType.String ? packet.GetString() : null);
            var tags = new MabiTags(parameter);

            var result = this.Start(creature, skill, tags);

            Send.SkillStart(creature, skill.Id, parameter);

            return result;
        }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:13,代码来源:StartStopTagsSkillHandler.cs

示例3: Stop

        public override SkillResults Stop(MabiCreature creature, MabiSkill skill, MabiPacket packet)
        {
            var parameter = (packet != null && packet.GetElementType() == ElementType.String ? packet.GetString() : null);

            var result = this.Stop(creature, skill);

            if (parameter != null)
                Send.SkillStop(creature, skill.Id, parameter);
            else
                Send.SkillStop(creature, skill.Id, 1);

            return result;
        }
开发者ID:nvrlcky,项目名称:aura,代码行数:13,代码来源:StartStopSkillHandler.cs

示例4: Stop

        public override SkillResults Stop(MabiCreature creature, MabiSkill skill, MabiPacket packet)
        {
            // Sometimes the second stop parameter is a byte,
            // possibly when canceling by moving (eg Rest).
            // The client doesn't really seem to care about what we send back though...
            var parameter = (packet != null && packet.GetElementType() == ElementType.String ? packet.GetString() : null);
            var tags = new MabiTags(parameter);

            var result = this.Stop(creature, skill, tags);

            if (parameter != null)
                Send.SkillStop(creature, skill.Id, parameter);
            else
                Send.SkillStop(creature, skill.Id, 1);

            return result;
        }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:17,代码来源:StartStopTagsSkillHandler.cs

示例5: Use

        public override SkillResults Use(MabiCreature creature, MabiSkill skill, MabiPacket packet)
        {
            if (creature.Temp.SkillItem1 == null || creature.Temp.SkillItem2 == null)
                return SkillResults.Failure;

            var part = packet.GetInt();

            // Regular
            if (packet.GetElementType() == ElementType.Short)
            {
                var x = packet.GetShort();
                var y = packet.GetShort();

                Send.SkillUseDye(creature.Client, creature, skill.Id, part, x, y);
            }
            // Fixed
            else if (packet.GetElementType() == ElementType.Byte)
            {
                var unk = packet.GetByte();

                Send.SkillUseDye(creature.Client, creature, skill.Id, part, unk);
            }

            return SkillResults.Okay;
        }
开发者ID:pjm0616,项目名称:aura,代码行数:25,代码来源:DyeHandler.cs


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