Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FaloopIntegration] Fix ActiveMobUi death function not being called. #670

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

Diyagi
Copy link
Contributor

@Diyagi Diyagi commented Jul 8, 2024

Fix #669
The function to remove the report from the ActiveMobUi was behind the check for Enable Mob Death Report, causing it to only work properly when that setting was enabled, this should fix it.

Maybe would be a good idea to rewrite that switch logic into proper events that we can use to register handlers.

@Diyagi
Copy link
Contributor Author

Diyagi commented Jul 8, 2024

Wait, if Enable Mob Death Report is not enabled, an report is never removed from spawnEvents ?
The only code i can find that removes something from spawnEvents is the MobFalseSpawn function and the MobDeath function, the latter would need Enable Mob Death Report enabled.

@SlashNephy
Copy link
Owner

SlashNephy commented Jul 9, 2024

If Enable Mob Death Report is enabled, a notification will appear in chat when a mob is killed.
Even if Enable Mob Death Report is disabled, events should be removed from spawnEvents.

So OnMobDeath should be as follows.

Ui.OnMobDeath(ev);

if (skipOrphanReport && spawnEvents.RemoveAll(x => x.Id == ev.Id) == 0)
{
    DalamudLog.Log.Debug("OnDeathMobReport: skipOrphanReport");
    return;
}

if (!enableDeathReport)
{
    return;
}

// print death report ...

@SlashNephy
Copy link
Owner

Thank you~

@SlashNephy SlashNephy merged commit a4a0282 into SlashNephy:master Jul 9, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Faloop Integration] Delayed Spawn Reports/Dead spawns not clearing
2 participants