July 23, 20178 yr Hello, for this purpose you need a stopwatch and events: private readonly Stopwatch _combatTimer = new Stopwatch(); public void Initialize() { EventsLua.AttachEventLua(LuaEventsId.PLAYER_REGEN_DISABLED, CombatStart); EventsLua.AttachEventLua(LuaEventsId.PLAYER_REGEN_ENABLED, CombatEnd); } private void CombatStart(object context) { _combatTimer.Restart(); } private void CombatEnd(object context) { _combatTimer.Reset(); } usage in a method for example: if (_combatTimer.ElapsedMilliseconds > 8000) { Logging.Write("In combat since 8 seconds"); }
July 24, 20178 yr Hello, wManager.Wow.Helpers.Fight.CombatStartSince To get command, convert your xml fightclasses to c# (with fightclass editor)
July 24, 20178 yr Author Wow, I feel so dumb right now.. I should have known that. Thank you, @Droidz
Create an account or sign in to comment