mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-19 14:27:45 +01:00
feat: add CfPop event to ClientState
This commit is contained in:
parent
37f0fba52a
commit
b6df202344
3 changed files with 25 additions and 8 deletions
|
|
@ -22,8 +22,10 @@ namespace Dalamud.Game.Network {
|
|||
private readonly bool optOutMbUploads;
|
||||
private readonly IMarketBoardUploader uploader;
|
||||
|
||||
public delegate Task CfPop(ContentFinderCondition cfc);
|
||||
public event CfPop ProcessCfPop;
|
||||
/// <summary>
|
||||
/// Event which gets fired when a duty is ready.
|
||||
/// </summary>
|
||||
public event EventHandler<ContentFinderCondition> CfPop;
|
||||
|
||||
public NetworkHandlers(Dalamud dalamud, bool optOutMbUploads) {
|
||||
this.dalamud = dalamud;
|
||||
|
|
@ -79,11 +81,11 @@ namespace Dalamud.Game.Network {
|
|||
NativeFunctions.FlashWindowEx(ref flashInfo);
|
||||
}
|
||||
|
||||
Task.Run(async () => {
|
||||
Task.Run(() => {
|
||||
if(this.dalamud.Configuration.DutyFinderChatMessage)
|
||||
this.dalamud.Framework.Gui.Chat.Print("Duty pop: " + cfcName);
|
||||
|
||||
await this.ProcessCfPop?.Invoke(contentFinderCondition);
|
||||
CfPop?.Invoke(this, contentFinderCondition);
|
||||
});
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue