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


C# World.MabiSkill类代码示例

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


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

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

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

示例3: AddBonuses

        public void AddBonuses(MabiSkill skill)
        {
            var mana = skill.RankInfo.ManaTotal;
            var life = skill.RankInfo.LifeTotal;
            var stamina = skill.RankInfo.StaminaTotal;

            _creature.StrBaseSkill += skill.RankInfo.StrTotal;
            _creature.WillBaseSkill += skill.RankInfo.WillTotal;
            _creature.IntBaseSkill += skill.RankInfo.IntTotal;
            _creature.LuckBaseSkill += skill.RankInfo.LuckTotal;
            _creature.DexBaseSkill += skill.RankInfo.DexTotal;
            _creature.ManaMaxBaseSkill += mana;
            _creature.Mana += mana;
            _creature.LifeMaxBaseSkill += life;
            _creature.Life += life;
            _creature.StaminaMaxBaseSkill += stamina;
            _creature.Stamina += stamina;

            if (skill.Id == SkillConst.MeleeCombatMastery)
            {
                _creature.StatMods.Add(Stat.LifeMaxMod, skill.RankInfo.Var3, StatModSource.SkillRank, skill.Info.Id);
                _creature.Life += skill.RankInfo.Var3;
            }
            else if (skill.Id == SkillConst.MagicMastery)
            {
                _creature.StatMods.Add(Stat.ManaMaxMod, skill.RankInfo.Var1, StatModSource.SkillRank, skill.Info.Id);
                _creature.Mana += skill.RankInfo.Var1;
            }
            else if (skill.Id == SkillConst.Defense)
            {
                _creature.DefenseBaseSkill += (int)skill.RankInfo.Var1;
            }
        }
开发者ID:hzdlive,项目名称:aura,代码行数:33,代码来源:CreatureSkillManager.cs

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

示例5: Prepare

        public override SkillResults Prepare(MabiCreature creature, MabiSkill skill, MabiPacket packet, uint castTime)
        {
            Send.Flash(creature);
            Send.SkillPrepare(creature.Client, creature, skill.Id, castTime);

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

示例6: Use

        public override SkillResults Use(MabiCreature creature, MabiSkill skill, MabiPacket packet)
        {
            var targetId = packet.GetLong();
            var target = WorldManager.Instance.GetCreatureById(targetId);
            if (target == null)
                return SkillResults.InvalidTarget;

            if (creature != target && !WorldManager.InRange(creature, target, 1000))
                return SkillResults.OutOfRange;

            // Reduce Stamina equal to healing amount if a player
            // is using the skill on himself.
            if (creature == target && creature is MabiPC)
            {
                var amount = Math.Min(skill.RankInfo.Var1, creature.LifeInjured - creature.Life);
                if (creature.Stamina < amount)
                    return SkillResults.InsufficientStamina;

                creature.Stamina -= amount;
            }

            target.Life += skill.RankInfo.Var1;
            WorldManager.Instance.CreatureStatsUpdate(target);

            SkillHelper.DecStack(creature, skill);

            WorldManager.Instance.Broadcast(new MabiPacket(Op.Effect, creature.Id).PutInt(Effect.UseMagic).PutString("healing").PutLong(target.Id), SendTargets.Range, creature);
            WorldManager.Instance.Broadcast(new MabiPacket(Op.Effect, creature.Id).PutInt(Effect.StackUpdate).PutString("healing_stack").PutBytes(creature.ActiveSkillStacks, 0), SendTargets.Range, creature);

            SkillHelper.GiveSkillExp(creature, skill, 20);

            Send.SkillUse(creature.Client, creature, skill.Id, targetId);

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

示例7: UseCombat

        public override SkillResults UseCombat(MabiCreature attacker, ulong targetId, MabiSkill skill)
        {
            var target = WorldManager.Instance.GetCreatureById(targetId);
            if (target == null)
                return SkillResults.InvalidTarget;

            if (attacker.Magazine == null || attacker.Magazine.Count < 1)
                return SkillResults.Failure;

            var rnd = RandomProvider.Get();

            attacker.StopMove();

            var factory = new CombatFactory();
            factory.SetAttackerAction(attacker, CombatActionType.RangeHit, skill.Id, targetId);
            factory.SetAttackerOptions(AttackerOptions.Result);
            factory.SetAttackerStun(AfterUseStun);

            bool hit = false;

            if (attacker.GetAimPercent(1) > rnd.NextDouble())
            {
                target.StopMove();

                factory.AddTargetAction(target, CombatActionType.TakeHit);
                factory.SetTargetOptions(TargetOptions.Result);
                factory.SetTargetStun(StunTime);

                hit = true;
            }
            else
            {
                factory.AddTargetAction(target, CombatActionType.None);
            }

            Send.SkillUse(attacker.Client, attacker, skill.Id, AfterUseStun, 1);

            SkillHelper.ClearStack(attacker, skill);

            attacker.Client.Send(new MabiPacket(Op.CombatTargetSet, attacker.Id).PutLong(0));

            factory.ExecuteDamage(new System.Func<MabiCreature, MabiCreature, float>((a, t) =>
                {
                    var damage = attacker.GetRndRangeDamage();
                    damage *= skill.RankInfo.Var1 / 100f;
                    return damage;
                }));
            factory.ExecuteStun();
            factory.ExecuteKnockback(CombatHelper.MaxKnockBack);

            WorldManager.Instance.HandleCombatActionPack(factory.GetCap());

            if (hit)
                CombatHelper.SetAggro(attacker, target);

            SkillHelper.GiveSkillExp(attacker, skill, 20);

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

示例8: Complete

        public override SkillResults Complete(MabiCreature creature, MabiSkill skill, MabiPacket packet)
        {
            Send.SkillComplete(creature.Client, creature, skill.Id);
            if (creature.ActiveSkillStacks > 0)
                Send.SkillReady(creature.Client, creature, skill.Id);

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

示例9: Stop

        public override SkillResults Stop(MabiCreature creature, MabiSkill skill)
        {
            creature.Deactivate(CreatureConditionB.Transparent);

            Send.StatusEffectUpdate(creature);

            return SkillResults.Okay;
        }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:8,代码来源:HideHandler.cs

示例10: Stop

        public override SkillResults Stop(MabiCreature creature, MabiSkill skill)
        {
            creature.Deactivate(CreatureConditionD.SpreadWings);

            Send.SpreadWings(creature, false);

            return SkillResults.Okay;
        }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:8,代码来源:SpreadWingsHandler.cs

示例11: Start

        public override SkillResults Start(MabiCreature creature, MabiSkill skill)
        {
            creature.Activate(CreatureConditionD.SpreadWings);

            Send.SpreadWings(creature, true);

            return SkillResults.Okay;
        }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:8,代码来源:SpreadWingsHandler.cs

示例12: Complete

        public override SkillResults Complete(MabiCreature creature, MabiSkill skill, MabiPacket packet)
        {
            creature.Client.Send(new MabiPacket(Op.CombatSetAimR, creature.Id).PutByte(0));

            Send.SkillComplete(creature.Client, creature, skill.Id);

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

示例13: Start

        public override SkillResults Start(MabiCreature creature, MabiSkill skill)
        {
            creature.Conditions.A |= CreatureConditionA.ManaShield;
            Send.StatusEffectUpdate(creature);
            WorldManager.Instance.Broadcast(new MabiPacket(Op.Effect, creature.Id).PutInt(Effect.ManaShield), SendTargets.Range, creature);

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

示例14: DecStack

 /// <summary>
 /// Decreases stack and sends update.
 /// </summary>
 /// <param name="creature"></param>
 /// <param name="skill"></param>
 /// <param name="amount"></param>
 public static void DecStack(MabiCreature creature, MabiSkill skill, byte amount = 1)
 {
     if (creature.ActiveSkillStacks > amount)
         creature.ActiveSkillStacks -= amount;
     else
         creature.ActiveSkillStacks = 0;
     Send.SkillStackUpdate(creature.Client, creature, skill.Id, creature.ActiveSkillStacks);
 }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:14,代码来源:SkillHelper.cs

示例15: Cancel

        public override SkillResults Cancel(MabiCreature creature, MabiSkill skill)
        {
            SkillHelper.ClearStack(creature, skill);
            WorldManager.Instance.Broadcast(new MabiPacket(Op.Effect, creature.Id).PutInt(Effect.StackUpdate).PutString(this.Name).PutBytes(creature.ActiveSkillStacks, 0), SendTargets.Range, creature);

            WorldManager.Instance.Broadcast(new MabiPacket(Op.MotionCancel2, creature.Id).PutByte(1), SendTargets.Range, creature);

            return SkillResults.Okay;
        }
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:9,代码来源:BoltHandlers.cs


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