- Fix /r issues

- Scope the block functions menu entry
- Don't show MuteList if accountId is unset
This commit is contained in:
Infi
2024-12-19 18:48:06 +01:00
parent 7cbaf77fe2
commit 70971d7b8a
4 changed files with 46 additions and 13 deletions
+14 -11
View File
@@ -605,20 +605,23 @@ public sealed class PayloadHandler
if (!isFriend && ImGui.Selectable(Language.Context_SendFriendRequest))
LogWindow.Plugin.Functions.SendFriendRequest(player.PlayerName, (ushort) world.RowId);
using var menuBlockFunctions = ImGuiUtil.Menu(Language.Context_BlockFunctions);
if (menuBlockFunctions.Success)
using (var menuBlockFunctions = ImGuiUtil.Menu(Language.Context_BlockFunctions))
{
if (ImGui.Selectable(Language.Context_AddToBlacklist))
LogWindow.Plugin.Functions.AddToBlacklist(player.PlayerName, (ushort)world.RowId);
if (chunk.Message != null)
if (menuBlockFunctions.Success)
{
var message = chunk.Message;
if (ImGui.Selectable(Language.Context_AddToMuteList))
LogWindow.Plugin.Functions.AddToMuteList(message.AccountId, message.ContentId, player.PlayerName, (short) world.RowId);
if (ImGui.Selectable(Language.Context_AddToBlacklist))
LogWindow.Plugin.Functions.AddToBlacklist(player.PlayerName, (ushort)world.RowId);
if (ImGui.Selectable(Language.Context_AddToTermsFilter))
LogWindow.Plugin.Functions.AddToTermsList(message.ContentSource);
if (chunk.Message != null)
{
var message = chunk.Message;
if (message.AccountId != 0 && ImGui.Selectable(Language.Context_AddToMuteList))
LogWindow.Plugin.Functions.AddToMuteList(message.AccountId, message.ContentId, player.PlayerName, (short) world.RowId);
if (ImGui.Selectable(Language.Context_AddToTermsFilter))
LogWindow.Plugin.Functions.AddToTermsList(message.ContentSource);
}
}
}