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


C# World.MabiCreature类代码示例

本文整理汇总了C#中Aura.World.World.MabiCreature的典型用法代码示例。如果您正苦于以下问题:C# MabiCreature类的具体用法?C# MabiCreature怎么用?C# MabiCreature使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: AcquireStat

 public static MabiPacket AcquireStat(MabiCreature creature, string statName, double amount)
 {
     var p = new MabiPacket(Op.AcquireInfo, creature.Id);
     p.PutString("<xml type='{0}' value='{1}' simple='true' onlyLog='false' />", statName, (uint)amount);
     p.PutInt(3000);
     return p;
 }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:7,代码来源:PacketCreator.cs

示例2: Ready

        public override SkillResults Ready(MabiCreature creature, MabiSkill skill)
        {
            SkillHelper.FillStack(creature, skill);
            Send.SkillReady(creature.Client, creature, skill.Id);

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

示例3: GuildDonateR

        /// <summary>
        /// Sends GuildDonateR to creature's client.
        /// </summary>
        public static void GuildDonateR(MabiCreature creature, bool success)
        {
            var packet = new MabiPacket(Op.GuildDonateR, creature.Id);
            packet.PutByte(success);

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

示例4: ConvertGpConfirmR

        /// <summary>
        /// Sends ConvertGpConfirmR to creature's client.
        /// </summary>
        public static void ConvertGpConfirmR(MabiCreature creature, bool success)
        {
            var packet = new MabiPacket(Op.ConvertGpConfirmR, creature.Id);
            packet.PutByte(success);

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

示例5: AcquireAp

 public static MabiPacket AcquireAp(MabiCreature creature, uint amount)
 {
     var p = new MabiPacket(Op.AcquireInfo, creature.Id);
     p.PutString("<xml type='ap' value='{0}' simple='true' onlyLog='false' />", amount);
     p.PutInt(3000);
     return p;
 }
开发者ID:nvrlcky,项目名称:aura,代码行数:7,代码来源:PacketCreator.cs

示例6: Stop

        public override SkillResults Stop(MabiCreature creature, MabiSkill skill, MabiTags tags)
        {
            creature.State &= ~CreatureStates.SitDown;
            Send.StandUp(creature);

            if (creature.Temp.SittingProp != null)
            {
                // Effect
                if (creature.Temp.CurrentChair.Effect != 0)
                    Send.Effect(Effect.CherryBlossoms, creature, false);

                // Update chair
                creature.Temp.SittingProp.ExtraData = string.Format("<xml OWNER='0' SITCHAR='0'/>");
                Send.PropUpdate(creature.Temp.SittingProp);

                Send.AssignChair(creature, 0, 0);

                // Remove chair in 1s
                creature.Temp.SittingProp.DisappearTime = DateTime.Now.AddSeconds(1);

                creature.Temp.SittingProp = null;
            }

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

示例7: GetIceSpearLOSChain

        public List<MabiCreature> GetIceSpearLOSChain(MabiCreature attacker, MabiCreature target, uint range)
        {
            var aPos = attacker.GetPosition();
            var tPos = target.GetPosition();

            var minX = Math.Min(aPos.X, tPos.X) - range;
            var maxX = Math.Max(aPos.X, tPos.X) + range;

            var m = ((double)tPos.Y - aPos.Y) / ((double)tPos.X - aPos.X);
            var bL = (double)aPos.Y - aPos.X * m - (range / 2);
            var bH = bL + range;

            var targets = WorldManager.Instance.GetCreaturesInRange(attacker, maxX - minX); // Rough filter

            targets = targets.FindAll((c) =>
                {
                    var pos = c.GetPosition();
                    return !c.IsDead && c.IsAttackableBy(attacker) && (minX < pos.X && pos.X < maxX) && ((m * pos.X + bL) < pos.Y && pos.Y < (m * pos.X + bH));
                });

            if (!targets.Contains(target))
                targets.Add(target);

            return targets;
        }
开发者ID:nvrlcky,项目名称:aura,代码行数:25,代码来源:IcespearHandler.cs

示例8: AcquireExp

 public static MabiPacket AcquireExp(MabiCreature creature, uint amount)
 {
     var p = new MabiPacket(Op.AcquireInfo, creature.Id);
     p.PutString("<xml type='exp' value='{0}'/>", amount);
     p.PutInt(3000);
     return p;
 }
开发者ID:nvrlcky,项目名称:aura,代码行数:7,代码来源:PacketCreator.cs

示例9: AddPvPInfo

        private static void AddPvPInfo(this MabiPacket packet, MabiCreature creature)
        {
            var arena = creature.ArenaPvPManager != null;

            packet.PutByte(arena); // ArenaPvP
            packet.PutInt(arena ? creature.ArenaPvPManager.GetTeam(creature) : (uint)0);
            packet.PutByte(creature.TransPvPEnabled);
            packet.PutInt(arena ? creature.ArenaPvPManager.GetStars(creature) : 0);
            packet.PutByte(creature.EvGEnabled);
            packet.PutByte(creature.EvGSupportRace);
            packet.PutByte(1); // IsPvPMode
            packet.PutLong(creature.PvPWins);
            packet.PutLong(creature.PvPLosses);
            packet.PutInt(0);// PenaltyPoints
            packet.PutByte(1);  // unk

            // [170300] ?
            {
                packet.PutByte(0);
                packet.PutInt(0);
                packet.PutInt(0);
                packet.PutInt(0);
                packet.PutInt(0);
            }
        }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:25,代码来源:Send.PvP.cs

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

示例11: PvPInformation

        /// <summary>
        /// Broadcasts pvp information for creature in region.
        /// </summary>
        /// <param name="creature"></param>
        /// <param name="region"></param>
        public static void PvPInformation(MabiCreature creature, uint region)
        {
            var packet = new MabiPacket(Op.PvPInformation, creature.Id);
            packet.AddPvPInfo(creature);

            WorldManager.Instance.BroadcastRegion(packet, region);
        }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:12,代码来源:Send.PvP.cs

示例12: QuestUpdate

        public static void QuestUpdate(MabiCreature creature, MabiQuest quest)
        {
            var packet = new MabiPacket(Op.QuestUpdate, creature.Id);
            packet.AddQuestProgress(quest);

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

示例13: SkillCancel

        /// <summary>
        /// Simple skill cancel.
        /// </summary>
        /// <param name="client"></param>
        /// <param name="creature"></param>
        public static void SkillCancel(Client client, MabiCreature creature)
        {
            var packet = new MabiPacket(Op.SkillCancel, creature.Id);
            packet.PutBytes(0, 1);

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

示例14: Stop

        public override SkillResults Stop(MabiCreature creature, MabiSkill skill)
        {
            creature.Conditions.A &= ~CreatureConditionA.ManaShield;
            Send.StatusEffectUpdate(creature);

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

示例15: AcquireItem

 public static MabiPacket AcquireItem(MabiCreature creature, uint cls, uint amount)
 {
     var p = new MabiPacket(Op.AcquireInfo, creature.Id);
     p.PutString("<xml type='item' classid='{0}' value='{1}'/>", cls, amount);
     p.PutInt(3000);
     return p;
 }
开发者ID:nvrlcky,项目名称:aura,代码行数:7,代码来源:PacketCreator.cs


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