Beispiel #1
0
 public override void HandleSkillActivate(SkillArg arg)
 {
     base.HandleSkillActivate(arg);
     for (int idx = 0; idx < arg.AffectedActors.Count; idx++)
     {
         SkillAffectedActor i = arg.AffectedActors[idx];
         if (i.Result.IsHit())
         {
             Additions.Frosen frosen = new Additions.Frosen(arg, i.Target);
             frosen.Activate();
         }
     }
     arg.Caster.ChangeStance(Stances.Ice, arg.SkillSession, 12000002, 6);
     Additions.FrosenSelf frosenSelf = new Additions.FrosenSelf(arg);
     frosenSelf.Activate();
 }
Beispiel #2
0
        public override void HandleSkillActivate(SkillArg arg)
        {
            SkillManager.Instance.DoAttack(arg);
            List <SkillAffectedActor> affected = arg.AffectedActors;
            bool noTarget = false;

            foreach (SkillAffectedActor i in affected)
            {
                SkillAttackResult res = i.Result;
                if (res != SkillAttackResult.Avoid && res != SkillAttackResult.Miss && res != SkillAttackResult.Parry && res != SkillAttackResult.TotalParry)
                {
                    if (i.Target.Tasks.ContainsKey("ActorFrosen"))
                    {
                        Buff buff = i.Target.Tasks["ActorFrosen"] as Buff;
                        buff.Deactivate();
                    }

                    i.NoDamageBroadcast = true;
                    Common.Additions.ActorFrosen add = new Common.Additions.ActorFrosen(arg, i.Target, additionID, i.Damage, 5000);

                    i.Target.Tasks["ActorFrosen"] = add;
                    add.Activate();
                    noTarget = true;
                }
            }
            Additions.FrosenSelf frosenSelf = new Additions.FrosenSelf(arg);
            frosenSelf.Activate();

            arg.Caster.ChangeStance(Stances.Ice, arg.SkillSession, 12000002, 6);
            if (noTarget && arg.Caster.ActorType == ActorType.PC)
            {
                Interlocked.Add(ref arg.Caster.MP, 2);
                if (arg.Caster.MP > arg.Caster.MaxMP)
                {
                    Interlocked.Exchange(ref arg.Caster.MP, arg.Caster.MaxMP);
                }

                Network.Client.GameSession client = ((ActorPC)arg.Caster).Client();
                client?.SendPlayerMP();
            }
        }