diff --git a/Pilz.Dalamud/ActivityContexts/ActivityContextManager.cs b/Pilz.Dalamud/ActivityContexts/ActivityContextManager.cs index bec34f4..0f2e55c 100644 --- a/Pilz.Dalamud/ActivityContexts/ActivityContextManager.cs +++ b/Pilz.Dalamud/ActivityContexts/ActivityContextManager.cs @@ -40,31 +40,40 @@ public class ActivityContextManager : IDisposable ActivityType newActivityContext; ZoneType newZoneType; - if (content.PvP) + if (content.RowId == 0) { - newActivityContext = ActivityType.PvpDuty; - newZoneType = ZoneType.Pvp; + // No content found, so we must be on the overworld + newActivityContext = ActivityType.None; + newZoneType = ZoneType.Overworld; } else { - newActivityContext = ActivityType.PveDuty; - - // Find correct member type - var memberType = content.ContentMemberType.RowId; - if (content.RowId == 16 || content.RowId == 15) - memberType = 2; // Praetorium and Castrum Meridianum - else if (content.RowId == 735 || content.RowId == 778) - memberType = 127; // Bozja - - // Check for ZoneType - newZoneType = memberType switch + if (content.PvP) { - 2 => ZoneType.Doungen, - 3 => ZoneType.Raid, - 4 => ZoneType.AllianceRaid, - 127 => ZoneType.Foray, - _ => ZoneType.Doungen, - }; + newActivityContext = ActivityType.PvpDuty; + newZoneType = ZoneType.Pvp; + } + else + { + newActivityContext = ActivityType.PveDuty; + + // Find correct member type + var memberType = content.ContentMemberType.RowId; + if (content.RowId == 16 || content.RowId == 15) + memberType = 2; // Praetorium and Castrum Meridianum + else if (content.RowId == 735 || content.RowId == 778) + memberType = 127; // Bozja + + // Check for ZoneType + newZoneType = memberType switch + { + 2 => ZoneType.Doungen, + 3 => ZoneType.Raid, + 4 => ZoneType.AllianceRaid, + 127 => ZoneType.Foray, + _ => ZoneType.Doungen, + }; + } } CurrentActivityContext = new(newActivityContext, newZoneType);