Пример #1
0
 public PassiveSkill(SkillDescriptor Desc, BaseNpc Master, float SustainTime)
     : base(Desc, Master)
 {
     IsSustain_       = false;
     SustainTime_     = SustainTime;
     PassiveExecutor_ = Executor_ as PassiveExecutor;
     Master_          = Master;
 }
Пример #2
0
 protected BaseSkill(SkillDescriptor Desc, BaseNpc Master)
     : base(Desc.Name)
 {
     this.Master    = Master;
     this.SkillID   = Desc.SkillID;
     this.Type      = Desc.Type;
     this.Icon      = Desc.Icon;
     this.CD        = Desc.CD;
     this.Cost      = Desc.Cost;
     this.Radius    = Desc.Radius;
     this.Priority  = Desc.Priority;
     this.Shape     = Desc.Shape;
     this.Rule      = Desc.Rule;
     this.Time      = 0;
     this.IsCD      = false;
     this.Executor_ = Desc.Executor;
 }
Пример #3
0
        public static NpcSkill AddNpcSkill(SkillDescriptor Desc, BaseNpc Master)
        {
            if (Desc == null || Master == null)
            {
                return(null);
            }

            if (Desc.Type == SkillType.Passive)
            {
                LLogger.LWarning($"need not passive desc, current is {Desc.Type}");
                return(null);
            }

            var Entity = new NpcSkill(Desc, Master);

            AddSkill(Entity);
            return(Entity);
        }
Пример #4
0
        public static PassiveSkill AddPassiveSkill(SkillDescriptor Desc, BaseNpc Master, float SustainTime)
        {
            if (Desc == null || Master == null)
            {
                return(null);
            }

            if (Desc.Type != SkillType.Passive)
            {
                LLogger.LWarning($"need passive desc, current is {Desc.Type}");
                return(null);
            }

            var Entity = new PassiveSkill(Desc, Master, SustainTime);

            AddSkill(Entity);
            Entity.Use(new SkillArgs(Entity));
            return(Entity);
        }
Пример #5
0
 public NpcSkill(SkillDescriptor Desc, BaseNpc Master)
     : base(Desc, Master)
 {
 }