fix ActivityContentManager
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user