Exemple #1
0
            public virtual void Frame(ISkillArgs args, IGameUnit unit, int range)
            {
                if (con == null && !StringUtil.IsNullOrEmpty(condition))
                {
                    con = new ExpParaCondition(condition);
                }
                BaseEventArgs bea = (BaseEventArgs)args;

                bea.TempUse("give", unit);
                foreach (IGameUnit gu in args.GetGameUnits())
                {
                    if (((XYZPara.XYZ)gu.GetXYZ().GetValue()).Distance(((XYZPara.XYZ)unit.GetXYZ().GetValue())) <= range)
                    {
                        bea.TempUse("get", gu);
                        if (con == null || con.Meet(args))
                        {
                            effect.SetKey(this.key);
                            effect.SetSource(unit.GetID());
                            if (effect.GetTime() < 200)
                            {
                                effect.SetTime(200);
                            }
                            gu.GetUnitSkill().AddSkillEffect(effect);
                        }
                        bea.Resume("get");
                    }
                }
                bea.Resume("give");
            }