/// <summary> /// Sets the execute time for the next item in the queue /// </summary> public void AddTime() { if (EmoteQueue.Count == 0) { return; } var emote = EmoteQueue.Peek(); emote.ExecuteTime = DateTime.UtcNow.AddSeconds(emote.Data.Delay); }
/// <summary> /// Sets the execute time for the next item in the queue /// </summary> public void AddTime() { if (EmoteQueue.Count == 0) { return; } var emote = EmoteQueue.Peek(); emote.ExecuteTime = Timer.CurrentTime + emote.Data.Delay; }
/// <summary> /// Processes the emote queue /// </summary> public void ProcessQueue() { while (EmoteQueue.Count > 0) { var emote = EmoteQueue.Peek(); if (emote.ExecuteTime > DateTime.UtcNow || WorldObject.IsBusy || WorldObject.IsMovingTo) { break; } EmoteQueue.Dequeue(); AddTime(); } }