private void refreshTickBuffs() { for (int i = 0; i < this.m_allBuffs.Count; i++) { Buff buff = this.m_allBuffs[i]; if ((!buff.Ended && (buff.DurationSeconds > 0f)) && ((buff.DamagePerSecond > 0.0) || (buff.HealingPerSecond > 0.0))) { float dt = Time.deltaTime * Time.timeScale; if (buff.TickTimer.tick(dt)) { if (buff.HealingPerSecond > 0.0) { double num3 = buff.HealingPerSecond * buff.DurationSeconds; double amount = num3 * (ConfigGameplay.BUFFS_TICK_INTERVAL / buff.DurationSeconds); CmdGainHp.ExecuteStatic(buff.Character, amount, false); } if (buff.DamagePerSecond > 0.0) { double num5 = buff.DamagePerSecond * buff.DurationSeconds; double baseAmount = num5 * (ConfigGameplay.BUFFS_TICK_INTERVAL / buff.DurationSeconds); CmdDealDamageToCharacter.ExecuteStatic(buff.SourceCharacter, buff.Character, baseAmount, false, DamageType.Magic, SkillType.NONE); } float num7 = buff.TickTimer.timeRemaining() - dt; buff.TickTimer.set(ConfigGameplay.BUFFS_TICK_INTERVAL + num7); } } } }
protected void FixedUpdate() { ActiveDungeon activeDungeon = GameLogic.Binder.GameState.ActiveDungeon; if (((activeDungeon != null) && (activeDungeon.ActiveRoom != null)) && (!activeDungeon.ActiveRoom.MainBossSummoned && !activeDungeon.WildBossMode)) { for (int i = this.m_characters.Count - 1; i >= 0; i--) { CharacterInstance c = this.m_characters[i]; if (((this.m_hpRegenNextTick[c] > 0f) && (Time.fixedTime >= this.m_hpRegenNextTick[c])) && (c.CurrentHp < c.MaxLife(true))) { CmdGainHp.ExecuteStatic(c, c.MaxLife(true) * ConfigGameplay.PASSIVE_HP_REGEN_PCT_PER_TICK, true); this.m_hpRegenNextTick[c] = Time.fixedTime + ConfigGameplay.PASSIVE_HP_REGEN_TICK_INTERVAL; } } } }