public static double getConventionTicksLeft(A_Enums.DamageType CurrentElement) { int currentIndex = Array.FindIndex(Presets.ConventionElements.Convention_ElementRotation, x => x == CurrentElement); if (currentIndex < 0) { return(0); } int AttribId_BuffEndTick = Presets.ConventionElements.Convention_BuffEndtickAttribIdRotation[currentIndex]; double ticksleft = get_BuffTicksLeft(A_Enums.Powers.Convention_PowerSno, AttribId_BuffEndTick); return(ticksleft); }
public static A_Enums.DamageType getConventionElement(ActorCommonData acd) { acd.TakeSnapshot(); int index = Array.FindIndex(A_Collection.Presets.ConventionElements.Convention_BuffcountAttribIdRotation, a => a == A_Collection.Presets.ConventionElements.Convention_BuffcountAttribIdRotation.FirstOrDefault( x => isBuff(A_Enums.Powers.Convention_PowerSno, x, acd))); if (index < 0) { return(DamageType.none); } A_Enums.DamageType element = A_Collection.Presets.ConventionElements.Convention_ElementRotation[index]; acd.FreeSnapshot(); return(element); }
public static double getConventionTicksLeft(A_Enums.DamageType CurrentElement, ActorCommonData acd) { acd.TakeSnapshot(); int currentIndex = Array.FindIndex(A_Collection.Presets.ConventionElements.Convention_ElementRotation, x => x == CurrentElement); if (currentIndex < 0) { return(0); } int AttribId_BuffEndTick = A_Collection.Presets.ConventionElements.Convention_BuffEndtickAttribIdRotation[currentIndex]; double ticksleft = getBuffCount(A_Enums.Powers.Convention_PowerSno, AttribId_BuffEndTick, acd) - A_Collection.Environment.Scene.GameTick; acd.FreeSnapshot(); return(ticksleft); }
public static A_Enums.DamageType getNextConventionElement(A_Enums.DamageType CurrentElement, A_Enums.HeroClass Class) { var class_elements = A_Collection.Presets.ConventionElements.Convention_ClassElements.First(x => x.Key == Class).Value; int currentIndex = Array.FindIndex(A_Collection.Presets.ConventionElements.Convention_ElementRotation, x => x == CurrentElement); int class_currentindex = Array.FindIndex(class_elements, x => x == CurrentElement); if (currentIndex < 0) { return(DamageType.none); } if (class_currentindex == class_elements.Count() - 1) { return(class_elements[0]); } return(class_elements[class_currentindex + 1]); }