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


C# Mooege.GetActorByDynamicId方法代码示例

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


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

示例1: ProcessSkillTEST

 private static void ProcessSkillTEST(Player player, Mooege.Core.GS.Map.World world, TargetMessage message)
 {
     Vector3D targetPosition = message.Field2.Position;
     Mooege.Core.GS.Actors.Actor target = null;
     if (message.TargetID != 0xFFFFFFFF)
     {
         target = world.GetActorByDynamicId(message.TargetID);
         if (target != null)
         {
             targetPosition = target.Position;
             if (target is Mooege.Core.GS.Actors.Monster)
             {
                 (target as Mooege.Core.GS.Actors.Monster).Die();
             }
         }
     } switch (message.PowerSNO)
     {
         case Skills.Skills.Wizard.Offensive.Hydra:
             world.AddEffect(new FXEffect { Actor = player, EffectID = 81103, DurationInTicks = (60 * 9), Position = targetPosition, NeedsActor = true }); // needs to lower to groud
             world.AddEffect(new HydraFXEffect { Actor = player, EffectID = 80745, DurationInTicks = (60 * 9), Position = targetPosition, AttackOffset = 0 });
             world.AddEffect(new HydraFXEffect { Actor = player, EffectID = 80757, DurationInTicks = (60 * 9), Position = targetPosition, AttackOffset = (6 * 4) });
             world.AddEffect(new HydraFXEffect { Actor = player, EffectID = 80758, DurationInTicks = (60 * 9), Position = targetPosition, AttackOffset = (6 * 8) });
             break;
     }
 }
开发者ID:xsochor,项目名称:mooege,代码行数:25,代码来源:ClientEffect.cs

示例2: ProcessSkillMonk

        private static void ProcessSkillMonk(Player player, Mooege.Core.GS.Map.World world, TargetMessage message) {
            Vector3D targetPosition = message.Field2.Position;
            Mooege.Core.GS.Actors.Actor target = null;
            if (message.TargetID != 0xFFFFFFFF)
            {
                target = world.GetActorByDynamicId(message.TargetID);
                if (target != null)
                {
                    targetPosition = target.Position;
                }
            }
            int startingTick = world.Game.TickCounter;
            int effectID = 0;
            int masterEffectID = 0;
            /* // broken ticking
            if (message.Field6 != null)
            {
                startingTick =  message.Field6.Field1;
            }
             */
            switch (message.PowerSNO)
            {
                case Skills.Skills.Monk.SpiritGenerator.FistsOfThunder:
                    effectID  = 143570; // cast
                    masterEffectID = 96176; // projectile
                    switch (message.Field5)
                    {
                        case 0:
                            startingTick += (int)(6 * 3 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                        case 1:
                            effectID = 143561;//143569; // cast
                            masterEffectID = 96176;//96177;
                            startingTick += (int)(6 * 2 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                        case 2:
                            effectID = 143566; // cast
                            masterEffectID = 96178;
                            startingTick += (int)(6 * 5 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                    }
                    world.AddEffect(new FXEffect { Actor = player, EffectID = effectID, StartingTick = (message.Field5 == 2) ? startingTick - (int)(6 * 5 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]) : startingTick });
                    world.AddEffect(new AttackEffect
                    {
                        Actor = player,
                        EffectID = masterEffectID,
                        StartingTick = startingTick,
                        DamageTypeOverride = 2
                    });
                    break;
                case Skills.Skills.Monk.SpiritGenerator.ExplodingPalm:
                    effectID = 142471;
                    masterEffectID = 143841;
                    switch (message.Field5)
                    {
                        case 0:
                            startingTick += (int)(6 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                        case 1:
                            startingTick += (int)(6 * 2 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                        case 2:
                            effectID = 142473;
                            masterEffectID = 143473;
                            startingTick += (int)(6 * 4 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                    }
                    world.AddEffect(new FXEffect { Actor = player, EffectID = effectID, StartingTick = startingTick });
                    world.AddEffect(new AttackEffect { Actor = player, EffectID = masterEffectID, StartingTick = startingTick });
                    break;
                case Skills.Skills.Monk.SpiritGenerator.DeadlyReach:
                    masterEffectID = 140870;
                    switch (message.Field5)
                    {
                        case 0:
                            startingTick += (int)(6 * 2 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                        case 1:
                            masterEffectID = 140871;
                            startingTick += (int)(6 * 2/ player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                        case 2:
                            masterEffectID = 140872;
                            startingTick += (int)(6 * 5 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                            break;
                    }
                    world.AddEffect(new AttackEffect { Actor = player, EffectID = masterEffectID, StartingTick = startingTick });
                    break;
                case Skills.Skills.Monk.SpiritGenerator.CripplingWave:
                    effectID = 152353;
                    startingTick += (int)(6 * 2 / player.Attributes[GameAttribute.Attacks_Per_Second_Total]);
                    switch (message.Field5)
                    {
                        case 0:
                            break;
                        case 1:
                            effectID = 147912;
                            break;
                        case 2:
                            effectID = 147929;
//.........这里部分代码省略.........
开发者ID:xsochor,项目名称:mooege,代码行数:101,代码来源:ClientEffect.cs


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