Esempio n. 1
0
 public Status ApplyStatus(NoxUnit source, NoxUnit target, int level, float duration, int initialStacks = 1, int bonusLevel = 0, float bonusDuration = 0, int bonusStacks = 1)
 {
     if (!target.ContainsStatus(Id))
     {
         // create new status and add it to unit
         return(target.AddStatus(Id, new Status(Id, this, source, target, level, duration)));
     }
     return(target.GetStatus(Id).Reapply(bonusDuration, bonusLevel, bonusStacks));
 }
Esempio n. 2
0
        //public Status ApplyStatus(NoxUnit source, NoxUnit target, int level, float duration, int bonusLevel = 0, float bonusDuration = 0, )
        //{
        //    if (!target.ContainsStatus(Id))
        //        // create new status and add it to unit
        //        return target.AddStatus(Id, new Status(Id, this, source, target, level, duration));
        //    return target.GetStatus(Id).Reapply(bonusDuration, bonusLevel, 0);
        //}

//        [Obsolete]
//#pragma warning disable CS0809 // Obsolete member overrides non-obsolete member
        public override Status ApplyStatus(NoxUnit source, NoxUnit target, int level, float duration, int bonusLevel = 0, float bonusDuration = 0)
//#pragma warning restore CS0809 // Obsolete member overrides non-obsolete member
        {
            if (!target.ContainsStatus(Id))
            {
                // create new status and add it to unit
                return(target.AddStatus(Id, new Status(Id, this, source, target, level, duration)));
            }
            return(target.GetStatus(Id).Reapply(bonusDuration, bonusLevel, 0));
        }