Beispiel #1
0
        private void ChargeNovabomb_OnEnter(On.EntityStates.Mage.Weapon.ChargeNovabomb.orig_OnEnter orig, ChargeNovabomb self)
        {
            orig(self);
            GameObject obj = self.outer.gameObject;

            if (AltArtiPassive.instanceLookup.ContainsKey(obj))
            {
                AltArtiPassive passive = AltArtiPassive.instanceLookup[obj];
                var            handle  = new AltArtiPassive.BatchHandle();
                var            context = new NanoBombContext(passive, handle);
                this.nanoBombContext[self] = context;
                passive.SkillCast(handle);
            }
        }
Beispiel #2
0
 private void ChargeNovabomb_FixedUpdate(On.EntityStates.Mage.Weapon.ChargeNovabomb.orig_FixedUpdate orig, ChargeNovabomb self)
 {
     orig(self);
     if (this.nanoBombContext.ContainsKey(self))
     {
         NanoBombContext context = this.nanoBombContext[self];
         context.timer += Time.fixedDeltaTime * context.passive.ext_attackSpeedStat;
         Int32 count = 0;
         while (context.timer >= context.passive.ext_nanoBombInterval && count <= context.passive.ext_nanoBombMaxPerTick)
         {
             count++;
             context.passive.SkillCast(context.handle);
             context.timer -= context.passive.ext_nanoBombInterval;
         }
     }
 }
Beispiel #3
0
        private void ChargeNovabomb_OnExit(On.EntityStates.Mage.Weapon.ChargeNovabomb.orig_OnExit orig, ChargeNovabomb self)
        {
            orig(self);
            if (this.nanoBombContext.ContainsKey(self))
            {
                NanoBombContext context = this.nanoBombContext[self];

                Int32 count = 0;
                while (context.timer >= context.passive.ext_nanoBombInterval && count <= context.passive.ext_nanoBombMaxPerTick)
                {
                    count++;
                    context.passive.SkillCast(context.handle);
                    context.timer -= context.passive.ext_nanoBombInterval;
                }

                context.handle.Fire(context.passive.ext_nanoBombMinDelay, context.passive.ext_nanoBombMaxDelay);
                _ = this.nanoBombContext.Remove(self);
            }
        }