muffin v7.5.11
This commit is contained in:
parent
addf2d530f
commit
3102923ce2
522 changed files with 41082 additions and 211592 deletions
|
|
@ -12,186 +12,69 @@ public sealed class PublicEventHelper
|
|||
public unsafe IReadOnlyList<PublicEvent> GetActiveFates()
|
||||
{
|
||||
FateManager* ptr = FateManager.Instance();
|
||||
int num = ((ptr != null) ? (-2066813597) : (-2066813594));
|
||||
List<PublicEvent> list = default(List<PublicEvent>);
|
||||
int num5 = default(int);
|
||||
FateContext* value = default(FateContext*);
|
||||
bool flag = default(bool);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -2066813595;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 6:
|
||||
list = new List<PublicEvent>();
|
||||
num5 = 0;
|
||||
num = -2066813588;
|
||||
break;
|
||||
case 5:
|
||||
value = ptr->Fates[num5].Value;
|
||||
num = ((value == null) ? (-2066813587) : (-2066813595));
|
||||
break;
|
||||
case 7:
|
||||
num = -2066813594;
|
||||
break;
|
||||
case 10:
|
||||
num = ((!flag) ? (-2066813587) : (-2066813586));
|
||||
break;
|
||||
case 0:
|
||||
return Array.Empty<PublicEvent>();
|
||||
}
|
||||
List<PublicEvent> list = new List<PublicEvent>();
|
||||
for (int i = 0; i < ptr->Fates.Count; i++)
|
||||
{
|
||||
FateContext* value = ptr->Fates[i].Value;
|
||||
if (value != null)
|
||||
{
|
||||
FateState state = value->State;
|
||||
num = ((state - 3 > FateState.Unk1) ? (-2066813599) : (-2066813596));
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
num5 = num7 + (num8 + num8);
|
||||
num = -2066813588;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
flag = true;
|
||||
num = -2066813585;
|
||||
break;
|
||||
case 2:
|
||||
return list;
|
||||
case 4:
|
||||
flag = false;
|
||||
num = -2066813585;
|
||||
break;
|
||||
case 11:
|
||||
list.Add(ToPublicEvent(value));
|
||||
num = -2066813587;
|
||||
break;
|
||||
case 3:
|
||||
return Array.Empty<PublicEvent>();
|
||||
case 9:
|
||||
num = ((num5 < ptr->Fates.Count) ? (-2066813600) : (-2066813593));
|
||||
break;
|
||||
if (state - 3 <= FateState.Unk1)
|
||||
{
|
||||
list.Add(ToPublicEvent(value));
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public unsafe IReadOnlyList<PublicEvent> GetActiveDynamicEvents()
|
||||
{
|
||||
DynamicEventContainer* instance = DynamicEventContainer.GetInstance();
|
||||
int num = ((instance != null) ? (-104590452) : (-104590451));
|
||||
int num7 = default(int);
|
||||
Span<DynamicEvent> events = default(Span<DynamicEvent>);
|
||||
ref DynamicEvent reference = default(ref DynamicEvent);
|
||||
List<PublicEvent> list = default(List<PublicEvent>);
|
||||
while (true)
|
||||
if (instance == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -104590454;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return Array.Empty<PublicEvent>();
|
||||
}
|
||||
List<PublicEvent> list = new List<PublicEvent>();
|
||||
Span<DynamicEvent> events = instance->Events;
|
||||
for (int i = 0; i < events.Length; i++)
|
||||
{
|
||||
ref DynamicEvent reference = ref events[i];
|
||||
if (reference.State != DynamicEventState.Inactive)
|
||||
{
|
||||
case 3:
|
||||
num = ((num7 < events.Length) ? (-104590450) : (-104590456));
|
||||
break;
|
||||
case 7:
|
||||
return Array.Empty<PublicEvent>();
|
||||
case 5:
|
||||
num = -104590451;
|
||||
break;
|
||||
case 4:
|
||||
reference = ref events[num7];
|
||||
num = ((reference.State == DynamicEventState.Inactive) ? (-104590454) : (-104590453));
|
||||
break;
|
||||
case 2:
|
||||
return list;
|
||||
case 1:
|
||||
list.Add(ToPublicEvent(ref reference));
|
||||
num = -104590454;
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
int num8 = num7;
|
||||
num3 = 1;
|
||||
num4 = num8;
|
||||
num7 = (num4 | num3) + (num4 & num3);
|
||||
num = -104590455;
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
list = new List<PublicEvent>();
|
||||
events = instance->Events;
|
||||
num7 = 0;
|
||||
num = -104590455;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public unsafe IReadOnlyList<PublicEvent> GetActiveMechaEvents()
|
||||
{
|
||||
WKSManager* ptr = WKSManager.Instance();
|
||||
int num = ((ptr != null) ? 1500071953 : 1500071952);
|
||||
ref WKSMechaEvent reference = default(ref WKSMechaEvent);
|
||||
Span<WKSMechaEvent> events = default(Span<WKSMechaEvent>);
|
||||
int num7 = default(int);
|
||||
List<PublicEvent> list = default(List<PublicEvent>);
|
||||
WKSMechaEventModule* mechaEventModule = default(WKSMechaEventModule*);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1500071954;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return Array.Empty<PublicEvent>();
|
||||
}
|
||||
WKSMechaEventModule* mechaEventModule = ptr->MechaEventModule;
|
||||
if (mechaEventModule == null)
|
||||
{
|
||||
return Array.Empty<PublicEvent>();
|
||||
}
|
||||
List<PublicEvent> list = new List<PublicEvent>();
|
||||
Span<WKSMechaEvent> events = mechaEventModule->Events;
|
||||
for (int i = 0; i < events.Length; i++)
|
||||
{
|
||||
ref WKSMechaEvent reference = ref events[i];
|
||||
if ((reference.Flags & WKSMechaEventFlag.IsEventActive) != 0)
|
||||
{
|
||||
case 8:
|
||||
reference = ref events[num7];
|
||||
num = (((reference.Flags & WKSMechaEventFlag.IsEventActive) == 0) ? 1500071957 : 1500071955);
|
||||
break;
|
||||
case 5:
|
||||
return list;
|
||||
case 2:
|
||||
return Array.Empty<PublicEvent>();
|
||||
case 6:
|
||||
return Array.Empty<PublicEvent>();
|
||||
case 7:
|
||||
{
|
||||
int num8 = num7;
|
||||
num3 = 1;
|
||||
num4 = num8;
|
||||
num7 = (num4 | num3) + (num4 & num3);
|
||||
num = 1500071958;
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
num = 1500071952;
|
||||
break;
|
||||
case 4:
|
||||
num = ((num7 < events.Length) ? 1500071962 : 1500071959);
|
||||
break;
|
||||
case 1:
|
||||
list.Add(ToPublicEvent(ref reference));
|
||||
num = 1500071957;
|
||||
break;
|
||||
case 3:
|
||||
mechaEventModule = ptr->MechaEventModule;
|
||||
num = ((mechaEventModule != null) ? 1500071963 : 1500071956);
|
||||
break;
|
||||
case 9:
|
||||
list = new List<PublicEvent>();
|
||||
events = mechaEventModule->Events;
|
||||
num7 = 0;
|
||||
num = 1500071958;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public IReadOnlyList<PublicEvent> GetAllActiveEvents()
|
||||
|
|
@ -205,382 +88,159 @@ public sealed class PublicEventHelper
|
|||
|
||||
public PublicEvent? GetEventById(EPublicEventType type, uint id)
|
||||
{
|
||||
int num;
|
||||
PublicEvent? result = default(PublicEvent?);
|
||||
switch (type)
|
||||
return type switch
|
||||
{
|
||||
default:
|
||||
num = 1438969819;
|
||||
goto IL_001d;
|
||||
case EPublicEventType.Fate:
|
||||
result = GetFateById((ushort)id);
|
||||
num = 1438969820;
|
||||
goto IL_001d;
|
||||
case EPublicEventType.DynamicEvent:
|
||||
goto IL_006b;
|
||||
case EPublicEventType.MechaEvent:
|
||||
goto IL_00aa;
|
||||
IL_001d:
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1438969816;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 6:
|
||||
goto end_IL_001d;
|
||||
case 4:
|
||||
return result;
|
||||
case 1:
|
||||
goto IL_006b;
|
||||
case 5:
|
||||
num = 1438969819;
|
||||
break;
|
||||
case 0:
|
||||
result = null;
|
||||
num = 1438969820;
|
||||
break;
|
||||
case 3:
|
||||
num = 1438969816;
|
||||
break;
|
||||
case 2:
|
||||
goto IL_00aa;
|
||||
}
|
||||
continue;
|
||||
end_IL_001d:
|
||||
break;
|
||||
}
|
||||
goto case EPublicEventType.Fate;
|
||||
IL_00aa:
|
||||
result = GetMechaEventById(id);
|
||||
num = 1438969820;
|
||||
goto IL_001d;
|
||||
IL_006b:
|
||||
result = GetDynamicEventById((ushort)id);
|
||||
num = 1438969820;
|
||||
goto IL_001d;
|
||||
}
|
||||
EPublicEventType.Fate => GetFateById((ushort)id),
|
||||
EPublicEventType.DynamicEvent => GetDynamicEventById((ushort)id),
|
||||
EPublicEventType.MechaEvent => GetMechaEventById(id),
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
|
||||
public unsafe PublicEvent? GetCurrentPlayerEvent()
|
||||
{
|
||||
FateManager* ptr = FateManager.Instance();
|
||||
int num = ((ptr == null) ? 2074475056 : 2074475058);
|
||||
while (true)
|
||||
if (ptr == null || ptr->CurrentFate == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 2074475059;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 2074475058;
|
||||
break;
|
||||
case 1:
|
||||
num = ((ptr->CurrentFate != null) ? 2074475057 : 2074475056);
|
||||
break;
|
||||
case 3:
|
||||
return null;
|
||||
case 2:
|
||||
return ToPublicEvent(ptr->CurrentFate);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return ToPublicEvent(ptr->CurrentFate);
|
||||
}
|
||||
|
||||
public unsafe PublicEvent? GetCurrentDynamicEvent()
|
||||
{
|
||||
DynamicEventContainer* instance = DynamicEventContainer.GetInstance();
|
||||
int num = ((instance != null) ? 285703707 : 285703710);
|
||||
DynamicEvent* currentEvent = default(DynamicEvent*);
|
||||
while (true)
|
||||
if (instance == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 285703707;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
currentEvent = instance->GetCurrentEvent();
|
||||
num = ((currentEvent == null) ? 285703704 : 285703711);
|
||||
break;
|
||||
case 4:
|
||||
num = ((currentEvent->State != DynamicEventState.Inactive) ? 285703706 : 285703704);
|
||||
break;
|
||||
case 2:
|
||||
num = 285703710;
|
||||
break;
|
||||
case 3:
|
||||
return null;
|
||||
case 5:
|
||||
return null;
|
||||
case 1:
|
||||
return ToPublicEvent(ref *currentEvent);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
DynamicEvent* currentEvent = instance->GetCurrentEvent();
|
||||
if (currentEvent == null || currentEvent->State == DynamicEventState.Inactive)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return ToPublicEvent(ref *currentEvent);
|
||||
}
|
||||
|
||||
public unsafe PublicEvent? GetCurrentMechaEvent()
|
||||
{
|
||||
WKSManager* ptr = WKSManager.Instance();
|
||||
int num = ((ptr != null) ? 599849311 : 599849304);
|
||||
WKSMechaEvent* currentEvent = default(WKSMechaEvent*);
|
||||
WKSMechaEventModule* mechaEventModule = default(WKSMechaEventModule*);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 599849305;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 3:
|
||||
return ToPublicEvent(ref *currentEvent);
|
||||
case 6:
|
||||
mechaEventModule = ptr->MechaEventModule;
|
||||
num = ((mechaEventModule != null) ? 599849308 : 599849307);
|
||||
break;
|
||||
case 7:
|
||||
num = (((currentEvent->Flags & WKSMechaEventFlag.IsEventActive) != 0) ? 599849306 : 599849309);
|
||||
break;
|
||||
case 0:
|
||||
num = 599849304;
|
||||
break;
|
||||
case 2:
|
||||
return null;
|
||||
case 4:
|
||||
return null;
|
||||
case 1:
|
||||
return null;
|
||||
case 5:
|
||||
currentEvent = mechaEventModule->CurrentEvent;
|
||||
num = ((currentEvent == null) ? 599849309 : 599849310);
|
||||
break;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
WKSMechaEventModule* mechaEventModule = ptr->MechaEventModule;
|
||||
if (mechaEventModule == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
WKSMechaEvent* currentEvent = mechaEventModule->CurrentEvent;
|
||||
if (currentEvent == null || (currentEvent->Flags & WKSMechaEventFlag.IsEventActive) == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return ToPublicEvent(ref *currentEvent);
|
||||
}
|
||||
|
||||
public unsafe bool IsFateActive(ushort fateId)
|
||||
{
|
||||
int num = ((fateId != 0) ? 1838657614 : 1838657615);
|
||||
FateContext* fateById = default(FateContext*);
|
||||
FateManager* ptr = default(FateManager*);
|
||||
while (true)
|
||||
if (fateId == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1838657612;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return fateById->State == FateState.Running;
|
||||
case 6:
|
||||
return false;
|
||||
case 3:
|
||||
return false;
|
||||
case 4:
|
||||
fateById = ptr->GetFateById(fateId);
|
||||
num = ((fateById != null) ? 1838657613 : 1838657610);
|
||||
break;
|
||||
case 2:
|
||||
ptr = FateManager.Instance();
|
||||
num = ((ptr != null) ? 1838657608 : 1838657609);
|
||||
break;
|
||||
case 5:
|
||||
return false;
|
||||
case 0:
|
||||
num = 1838657615;
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
FateManager* ptr = FateManager.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
FateContext* fateById = ptr->GetFateById(fateId);
|
||||
if (fateById == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return fateById->State == FateState.Running;
|
||||
}
|
||||
|
||||
private unsafe PublicEvent? GetFateById(ushort fateId)
|
||||
{
|
||||
int num = ((fateId != 0) ? (-1398838121) : (-1398838127));
|
||||
FateContext* fateById = default(FateContext*);
|
||||
FateManager* ptr = default(FateManager*);
|
||||
while (true)
|
||||
if (fateId == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1398838126;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
fateById = ptr->GetFateById(fateId);
|
||||
num = ((fateById != null) ? (-1398838124) : (-1398838122));
|
||||
break;
|
||||
case 4:
|
||||
return null;
|
||||
case 3:
|
||||
return null;
|
||||
case 2:
|
||||
return null;
|
||||
case 6:
|
||||
return ToPublicEvent(fateById);
|
||||
case 5:
|
||||
ptr = FateManager.Instance();
|
||||
num = ((ptr != null) ? (-1398838125) : (-1398838128));
|
||||
break;
|
||||
case 0:
|
||||
num = -1398838127;
|
||||
break;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
FateManager* ptr = FateManager.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
FateContext* fateById = ptr->GetFateById(fateId);
|
||||
if (fateById == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return ToPublicEvent(fateById);
|
||||
}
|
||||
|
||||
private unsafe PublicEvent? GetDynamicEventById(ushort dynamicEventId)
|
||||
{
|
||||
int num = ((dynamicEventId != 0) ? 190075853 : 190075849);
|
||||
Span<DynamicEvent> events = default(Span<DynamicEvent>);
|
||||
DynamicEventContainer* instance = default(DynamicEventContainer*);
|
||||
int num5 = default(int);
|
||||
ref DynamicEvent reference = default(ref DynamicEvent);
|
||||
while (true)
|
||||
if (dynamicEventId == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 190075855;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return null;
|
||||
}
|
||||
DynamicEventContainer* instance = DynamicEventContainer.GetInstance();
|
||||
if (instance == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
Span<DynamicEvent> events = instance->Events;
|
||||
for (int i = 0; i < events.Length; i++)
|
||||
{
|
||||
ref DynamicEvent reference = ref events[i];
|
||||
if (reference.DynamicEventId == dynamicEventId && reference.State != DynamicEventState.Inactive)
|
||||
{
|
||||
case 1:
|
||||
events = instance->Events;
|
||||
num5 = 0;
|
||||
num = 190075847;
|
||||
break;
|
||||
case 2:
|
||||
instance = DynamicEventContainer.GetInstance();
|
||||
num = ((instance != null) ? 190075854 : 190075852);
|
||||
break;
|
||||
case 10:
|
||||
reference = ref events[num5];
|
||||
num = ((reference.DynamicEventId != dynamicEventId) ? 190075851 : 190075848);
|
||||
break;
|
||||
case 0:
|
||||
num = 190075849;
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
num5 = (num4 | num3) + (num4 & num3);
|
||||
num = 190075847;
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
num = ((reference.State == DynamicEventState.Inactive) ? 190075851 : 190075846);
|
||||
break;
|
||||
case 5:
|
||||
return null;
|
||||
case 9:
|
||||
return ToPublicEvent(ref reference);
|
||||
case 3:
|
||||
return null;
|
||||
case 6:
|
||||
return null;
|
||||
case 8:
|
||||
num = ((num5 < events.Length) ? 190075845 : 190075850);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private unsafe PublicEvent? GetMechaEventById(uint mechaEventDataRowId)
|
||||
{
|
||||
int num = ((mechaEventDataRowId != 0) ? 1662115952 : 1662115954);
|
||||
int num5 = default(int);
|
||||
Span<WKSMechaEvent> events = default(Span<WKSMechaEvent>);
|
||||
WKSMechaEventModule* mechaEventModule = default(WKSMechaEventModule*);
|
||||
WKSManager* ptr = default(WKSManager*);
|
||||
ref WKSMechaEvent reference = default(ref WKSMechaEvent);
|
||||
while (true)
|
||||
if (mechaEventDataRowId == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1662115957;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return null;
|
||||
}
|
||||
WKSManager* ptr = WKSManager.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
WKSMechaEventModule* mechaEventModule = ptr->MechaEventModule;
|
||||
if (mechaEventModule == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
Span<WKSMechaEvent> events = mechaEventModule->Events;
|
||||
for (int i = 0; i < events.Length; i++)
|
||||
{
|
||||
ref WKSMechaEvent reference = ref events[i];
|
||||
if (reference.WKSMechaEventDataRowId == mechaEventDataRowId && (reference.Flags & WKSMechaEventFlag.IsEventActive) != 0)
|
||||
{
|
||||
case 12:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
num5 = (num4 | num3) + (num4 & num3);
|
||||
num = 1662115955;
|
||||
break;
|
||||
}
|
||||
case 10:
|
||||
events = mechaEventModule->Events;
|
||||
num5 = 0;
|
||||
num = 1662115955;
|
||||
break;
|
||||
case 5:
|
||||
ptr = WKSManager.Instance();
|
||||
num = ((ptr != null) ? 1662115956 : 1662115964);
|
||||
break;
|
||||
case 0:
|
||||
return ToPublicEvent(ref reference);
|
||||
case 9:
|
||||
return null;
|
||||
case 8:
|
||||
return null;
|
||||
case 2:
|
||||
reference = ref events[num5];
|
||||
num = ((reference.WKSMechaEventDataRowId != mechaEventDataRowId) ? 1662115961 : 1662115953);
|
||||
break;
|
||||
case 6:
|
||||
num = ((num5 < events.Length) ? 1662115959 : 1662115965);
|
||||
break;
|
||||
case 11:
|
||||
return null;
|
||||
case 3:
|
||||
num = 1662115954;
|
||||
break;
|
||||
case 1:
|
||||
mechaEventModule = ptr->MechaEventModule;
|
||||
num = ((mechaEventModule != null) ? 1662115967 : 1662115966);
|
||||
break;
|
||||
case 7:
|
||||
return null;
|
||||
case 4:
|
||||
num = (((reference.Flags & WKSMechaEventFlag.IsEventActive) == 0) ? 1662115961 : 1662115957);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private unsafe static PublicEvent ToPublicEvent(FateContext* fate)
|
||||
{
|
||||
float num = fate->Duration;
|
||||
float timeRemaining = 0f;
|
||||
int num2 = ((!(num > 0f)) ? (-597185620) : (-597185618));
|
||||
while (true)
|
||||
if (num > 0f && fate->StartTimeEpoch > 0)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = -597185619;
|
||||
int num5 = num3;
|
||||
switch ((num5 | num4) - (num5 & num4))
|
||||
{
|
||||
case 1:
|
||||
return new PublicEvent(EPublicEventType.Fate, fate->FateId, fate->Name.ToString(), fate->Location, fate->Radius, fate->Level, fate->MaxLevel, (int)fate->Progress, num, timeRemaining, fate->State == FateState.Running, fate->State == FateState.Preparing, fate->IsBonus, fate->Rule, fate->MotivationNpc, fate->FATEChain);
|
||||
case 2:
|
||||
{
|
||||
float num6 = DateTimeOffset.UtcNow.ToUnixTimeSeconds() - fate->StartTimeEpoch;
|
||||
timeRemaining = _206C_202D_202E_202E_200C_206F_206B_202C_206F_202E_206E_202A_206C_202E_206B_200D_202A_202A_202A_200C_200E_202C_206C_202B_200F_202C_206F_206E_206B_202E_206D_202D_202C_206F_200E_202D_206B_200E_206B_206B_202E(0f, num - num6);
|
||||
num2 = -597185620;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
num2 = ((fate->StartTimeEpoch <= 0) ? (-597185620) : (-597185617));
|
||||
break;
|
||||
case 0:
|
||||
num2 = -597185618;
|
||||
break;
|
||||
}
|
||||
float num2 = DateTimeOffset.UtcNow.ToUnixTimeSeconds() - fate->StartTimeEpoch;
|
||||
timeRemaining = Math.Max(0f, num - num2);
|
||||
}
|
||||
return new PublicEvent(EPublicEventType.Fate, fate->FateId, fate->Name.ToString(), fate->Location, fate->Radius, fate->Level, fate->MaxLevel, (int)fate->Progress, num, timeRemaining, fate->State == FateState.Running, fate->State == FateState.Preparing, fate->IsBonus, fate->Rule, fate->MotivationNpc, fate->FATEChain);
|
||||
}
|
||||
|
||||
private static PublicEvent ToPublicEvent(ref DynamicEvent dynamicEvent)
|
||||
|
|
@ -596,136 +256,30 @@ public sealed class PublicEventHelper
|
|||
float timeRemaining = num2;
|
||||
bool isActive = dynamicEvent.State == DynamicEventState.Battle;
|
||||
DynamicEventState state = dynamicEvent.State;
|
||||
int num3 = ((state - 1 > DynamicEventState.Register) ? 1959810557 : 1959810558);
|
||||
bool isPending = default(bool);
|
||||
while (true)
|
||||
{
|
||||
int num4 = num3;
|
||||
int num5 = 1959810556;
|
||||
int num6 = num4;
|
||||
switch ((num6 | num5) - (num6 & num5))
|
||||
{
|
||||
case 3:
|
||||
num3 = 1959810558;
|
||||
break;
|
||||
case 1:
|
||||
isPending = false;
|
||||
num3 = 1959810556;
|
||||
break;
|
||||
case 2:
|
||||
isPending = true;
|
||||
num3 = 1959810556;
|
||||
break;
|
||||
case 0:
|
||||
return new PublicEvent(EPublicEventType.DynamicEvent, dynamicEventId, name, position, radius, 0, 0, progress, duration, timeRemaining, isActive, isPending, HasBonus: false, 0, 0u, 0);
|
||||
}
|
||||
}
|
||||
bool isPending = state - 1 <= DynamicEventState.Register;
|
||||
return new PublicEvent(EPublicEventType.DynamicEvent, dynamicEventId, name, position, radius, 0, 0, progress, duration, timeRemaining, isActive, isPending, HasBonus: false, 0, 0u, 0);
|
||||
}
|
||||
|
||||
private unsafe static PublicEvent ToPublicEvent(ref WKSMechaEvent mechaEvent)
|
||||
{
|
||||
long num = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
||||
int num2 = ((mechaEvent.EventEndTimestamp > mechaEvent.EventStartTimestamp) ? 783714395 : 783714386);
|
||||
string name = default(string);
|
||||
WKSMechaEventMapMarker* value = default(WKSMechaEventMapMarker*);
|
||||
Vector3 position = default(Vector3);
|
||||
float radius = default(float);
|
||||
float progress = default(float);
|
||||
float duration = default(float);
|
||||
float timeRemaining = default(float);
|
||||
while (true)
|
||||
float duration = ((mechaEvent.EventEndTimestamp > mechaEvent.EventStartTimestamp) ? ((float)(mechaEvent.EventEndTimestamp - mechaEvent.EventStartTimestamp)) : 0f);
|
||||
float timeRemaining = ((mechaEvent.EventEndTimestamp > num) ? ((float)(mechaEvent.EventEndTimestamp - num)) : 0f);
|
||||
Vector3 position = Vector3.Zero;
|
||||
float radius = 0f;
|
||||
string name = string.Empty;
|
||||
if (mechaEvent.MapMarkerPtrs.Count > 0)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = 783714385;
|
||||
int num5 = num3;
|
||||
int num6 = num5 + num4;
|
||||
int num7 = num5 & num4;
|
||||
int num10;
|
||||
float num14;
|
||||
float num8;
|
||||
float num9;
|
||||
bool isPending;
|
||||
switch (num6 - (num7 + num7))
|
||||
WKSMechaEventMapMarker* value = mechaEvent.MapMarkerPtrs[0].Value;
|
||||
if (value != null)
|
||||
{
|
||||
default:
|
||||
continue;
|
||||
case 11:
|
||||
num10 = 0;
|
||||
goto IL_008f;
|
||||
case 5:
|
||||
num14 = 0f;
|
||||
goto IL_0149;
|
||||
case 1:
|
||||
num2 = (((mechaEvent.Flags & WKSMechaEventFlag.IsEventActive) == 0) ? 783714394 : 783714397);
|
||||
continue;
|
||||
case 2:
|
||||
num8 = 0f;
|
||||
break;
|
||||
case 0:
|
||||
num2 = 783714386;
|
||||
continue;
|
||||
case 3:
|
||||
num9 = 0f;
|
||||
goto IL_024c;
|
||||
case 8:
|
||||
{
|
||||
long num11 = mechaEvent.EventEndTimestamp;
|
||||
long num12 = num;
|
||||
long num13 = num11;
|
||||
num14 = ~(~num13 + num12);
|
||||
goto IL_0149;
|
||||
}
|
||||
case 12:
|
||||
num10 = ((mechaEvent.EventProgress == 0) ? 1 : 0);
|
||||
goto IL_008f;
|
||||
case 9:
|
||||
num2 = ((mechaEvent.EventProgressMax > 0) ? 783714390 : 783714387);
|
||||
continue;
|
||||
case 4:
|
||||
name = value->Name.ToString();
|
||||
position = value->MapMarkerData.Position;
|
||||
radius = value->MapMarkerData.Radius;
|
||||
num2 = 783714392;
|
||||
continue;
|
||||
case 6:
|
||||
value = mechaEvent.MapMarkerPtrs[0].Value;
|
||||
num2 = ((value == null) ? 783714392 : 783714389);
|
||||
continue;
|
||||
case 10:
|
||||
{
|
||||
int eventEndTimestamp = mechaEvent.EventEndTimestamp;
|
||||
num4 = mechaEvent.EventStartTimestamp;
|
||||
num5 = eventEndTimestamp;
|
||||
num9 = ~(~num5 + num4);
|
||||
goto IL_024c;
|
||||
}
|
||||
case 7:
|
||||
{
|
||||
num8 = (float)mechaEvent.EventProgress / (float)mechaEvent.EventProgressMax * 100f;
|
||||
break;
|
||||
}
|
||||
IL_008f:
|
||||
isPending = (byte)num10 != 0;
|
||||
return new PublicEvent(EPublicEventType.MechaEvent, mechaEvent.WKSMechaEventDataRowId, name, position, radius, 0, 0, progress, duration, timeRemaining, (mechaEvent.Flags & WKSMechaEventFlag.IsEventActive) != 0, isPending, HasBonus: false, 0, 0u, 0);
|
||||
IL_024c:
|
||||
duration = num9;
|
||||
num2 = ((mechaEvent.EventEndTimestamp > num) ? 783714393 : 783714388);
|
||||
continue;
|
||||
IL_0149:
|
||||
timeRemaining = num14;
|
||||
position = Vector3.Zero;
|
||||
radius = 0f;
|
||||
name = string.Empty;
|
||||
num2 = ((mechaEvent.MapMarkerPtrs.Count <= 0) ? 783714392 : 783714391);
|
||||
continue;
|
||||
}
|
||||
progress = num8;
|
||||
num2 = (((mechaEvent.Flags & WKSMechaEventFlag.PilotRegistrationOpen) == 0) ? 783714394 : 783714384);
|
||||
}
|
||||
}
|
||||
|
||||
static float _206C_202D_202E_202E_200C_206F_206B_202C_206F_202E_206E_202A_206C_202E_206B_200D_202A_202A_202A_200C_200E_202C_206C_202B_200F_202C_206F_206E_206B_202E_206D_202D_202C_206F_200E_202D_206B_200E_206B_206B_202E(float P_0, float P_1)
|
||||
{
|
||||
return Math.Max(P_0, P_1);
|
||||
float progress = ((mechaEvent.EventProgressMax > 0) ? ((float)mechaEvent.EventProgress / (float)mechaEvent.EventProgressMax * 100f) : 0f);
|
||||
bool isPending = (mechaEvent.Flags & WKSMechaEventFlag.PilotRegistrationOpen) != 0 && (mechaEvent.Flags & WKSMechaEventFlag.IsEventActive) != 0 && mechaEvent.EventProgress == 0;
|
||||
return new PublicEvent(EPublicEventType.MechaEvent, mechaEvent.WKSMechaEventDataRowId, name, position, radius, 0, 0, progress, duration, timeRemaining, (mechaEvent.Flags & WKSMechaEventFlag.IsEventActive) != 0, isPending, HasBonus: false, 0, 0u, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue