コード例 #1
0
        public override void HandleSkillActivate(SkillArg arg)
        {
            base.HandleSkillActivate(arg);
            foreach (SkillAffectedActor i in arg.AffectedActors)
            {
                if (arg.Target.Tasks.TryGetValue("ActorCatch", out Task removed))
                {
                    removed.Deactivate();
                }

                //Additions.Throw throws = new Additions.Throw(arg, i.Target);
                //throws.Activate();
                Map.Map          map  = Map.MapManager.Instance.GetMap(arg.Caster.MapInstanceID);
                Map.MoveArgument argu = new Map.MoveArgument()
                {
                    BNSMoveType = Map.MoveType.PushBack
                };
                bool pushed = map.HeightMapBuilder.GetMaximunPushBackPos(arg.Caster.X, arg.Caster.Y, arg.Caster.Z, arg.Caster.Dir, 150, out argu.X, out argu.Y, out argu.Z);
                argu.PushBackSource = arg.Caster;
                argu.Dir            = arg.Caster.Dir;
                argu.SkillSession   = arg.SkillSession;
                map.MoveActor(i.Target, argu, true);
                Common.Additions.ActorDown add = new Common.Additions.ActorDown(arg, i.Target, 12311013, i.Damage, 1000);

                i.Target.Tasks["ActorDown"] = add;
                add.Activate();
            }
        }
コード例 #2
0
        private void Mine_OnAdditionEnd(Actor actor, Buff skill, bool cancel)
        {
            Map.Map map = Map.MapManager.Instance.GetMap(actor.MapInstanceID);
            ((ActorExt)actor).Tasks.TryRemove("Mine", out Task removed);
            UpdateEvent evt = new UpdateEvent()
            {
                Actor             = actor,
                Target            = actor,
                SkillSession      = 128,
                AdditionID        = 15208019,
                AdditionSession   = 1,
                ExtraActivateMode = UpdateEvent.ExtraUpdateModes.Cancel
            };

            evt.SkillSession = arg.SkillSession;
            evt.UpdateType   = UpdateTypes.Actor;
            evt.UserData     = new byte[] { 9, 3, 0 };
            map.SendEventToAllActorsWhoCanSeeActor(MapEvents.EVENT_BROADCAST, evt, actor, true);

            evt = new UpdateEvent()
            {
                Actor             = actor,
                Target            = actor,
                AdditionSession   = 1,
                AdditionID        = 15208019,
                ExtraActivateMode = UpdateEvent.ExtraUpdateModes.Cancel,
                SkillSession      = 128,
                UpdateType        = UpdateTypes.ActorExtension
            };
            map.SendEventToAllActorsWhoCanSeeActor(MapEvents.EVENT_BROADCAST, evt, actor, true);
            SkillManager.Instance.BroadcastSkillCast(arg, SkillMode.Abort);
            SkillManager.Instance.DoAttack(arg);
            foreach (SkillAffectedActor i in arg.AffectedActors)
            {
                SkillAttackResult res = i.Result;
                if (res != SkillAttackResult.Avoid && res != SkillAttackResult.Miss && res != SkillAttackResult.Parry && res != SkillAttackResult.TotalParry)
                {
                    if (i.Target.Tasks.ContainsKey("ActorDown"))
                    {
                        Buff buff = i.Target.Tasks["ActorDown"] as Buff;
                        buff.Deactivate();
                    }
                    i.NoDamageBroadcast = true;
                    Common.Additions.ActorDown add = new Common.Additions.ActorDown(arg, i.Target, 15208018, i.Damage);

                    i.Target.Tasks["ActorDown"] = add;
                    add.Activate();
                }
            }
            SkillManager.Instance.BroadcastSkillCast(arg, SkillMode.End);
        }
コード例 #3
0
        public void HandleSkillActivate(SkillArg arg)
        {
            SkillManager.Instance.DoAttack(arg);
            foreach (SkillAffectedActor i in arg.AffectedActors)
            {
                SkillAttackResult res = i.Result;
                if (res != SkillAttackResult.Avoid && res != SkillAttackResult.Miss && res != SkillAttackResult.Parry && res != SkillAttackResult.TotalParry)
                {
                    if (i.Target.Tasks.ContainsKey("ActorDown"))
                    {
                        Buff buff = i.Target.Tasks["ActorDown"] as Buff;
                        buff.Deactivate();
                    }

                    Common.Additions.ActorDown add = new Common.Additions.ActorDown(arg, i.Target, 55110389);

                    i.Target.Tasks["ActorDown"] = add;
                    add.Activate();
                }
            }
        }