add PvP as additional ZoneType

This commit is contained in:
2023-01-15 14:24:53 +01:00
parent c24d7f3ddb
commit 84a8aaad31
2 changed files with 22 additions and 17 deletions

View File

@@ -54,28 +54,32 @@ namespace Pilz.Dalamud.ActivityContexts
}
else
{
// Check for ActivityContext
if (content.PvP)
{
newActivityContext = ActivityType.PvpDuty;
newZoneType = ZoneType.Pvp;
}
else
{
newActivityContext = ActivityType.PveDuty;
// Find correct member type
var memberType = content.ContentMemberType.Row;
if (content.RowId == 16 || content.RowId == 15)
memberType = 2; // Praetorium and Castrum Meridianum
else if (content.RowId == 735 || content.RowId == 778)
memberType = 127; // Bozja
// Find correct member type
var memberType = content.ContentMemberType.Row;
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.Dungeon,
3 => ZoneType.Raid,
4 => ZoneType.AllianceRaid,
127 => ZoneType.Foray,
_ => ZoneType.Dungeon,
};
// Check for ZoneType
newZoneType = memberType switch
{
2 => ZoneType.Dungeon,
3 => ZoneType.Raid,
4 => ZoneType.AllianceRaid,
127 => ZoneType.Foray,
_ => ZoneType.Dungeon,
};
}
}
CurrentActivityContext = new(newActivityContext, newZoneType);

View File

@@ -15,6 +15,7 @@ namespace Pilz.Dalamud.ActivityContexts
Dungeon,
Raid,
AllianceRaid,
Foray
Foray,
Pvp
}
}