forked from aly/qstbak
muffin v7.5.11
This commit is contained in:
parent
addf2d530f
commit
3102923ce2
522 changed files with 41082 additions and 211592 deletions
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Interface.Textures;
|
||||
using Dalamud.Interface.Textures.TextureWraps;
|
||||
using Dalamud.Plugin.Services;
|
||||
|
|
@ -54,238 +53,92 @@ public sealed class MapTextureService
|
|||
_logger = logger;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public bool LoadForTerritory(uint territoryType)
|
||||
{
|
||||
int num = ((territoryType != _loadedTerritoryType) ? (-703602804) : (-703602806));
|
||||
List<string> list2 = default(List<string>);
|
||||
string value = default(string);
|
||||
Map? map = default(Map?);
|
||||
string[] array = default(string[]);
|
||||
string text = default(string);
|
||||
TerritoryType? rowOrDefault = default(TerritoryType?);
|
||||
while (true)
|
||||
if (territoryType == _loadedTerritoryType && _resolvedTexture != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -703602814;
|
||||
int num4 = num2;
|
||||
Map? obj;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
default:
|
||||
continue;
|
||||
case 0:
|
||||
return false;
|
||||
case 3:
|
||||
num = ((_200E_206C_202D_200C_200F_206A_202A_200E_200E_202C_202D_202D_202B_206B_206F_206F_200F_206D_206A_206E_202C_206E_200F_200F_206B_202A_206A_202A_200F_206A_206F_206A_200E_200D_206E_206D_206B_206B_200D_206E_202E() >= _retryAtMs) ? (-703602796) : (-703602814));
|
||||
continue;
|
||||
case 16:
|
||||
num = ((_candidateTextures == null) ? (-703602797) : (-703602813));
|
||||
continue;
|
||||
case 21:
|
||||
_failed = true;
|
||||
return false;
|
||||
case 1:
|
||||
PollCandidates();
|
||||
return _resolvedTexture != null;
|
||||
case 7:
|
||||
num = ((!_failed) ? (-703602799) : (-703602816));
|
||||
continue;
|
||||
case 15:
|
||||
{
|
||||
List<string> list = list2;
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(19, 2);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(674220722));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(value);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-27764842));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(value);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(582629916));
|
||||
list.Add(defaultInterpolatedStringHandler.ToStringAndClear());
|
||||
num = -703602795;
|
||||
continue;
|
||||
}
|
||||
case 23:
|
||||
_206F_200B_200E_206D_200C_200B_206B_206C_202A_206C_206C_206C_206D_202E_206E_206F_206A_200C_200D_200C_202D_202D_200E_206D_202E_202D_200D_202C_206C_200B_200E_202B_200F_202E_202E_206A_202D_206C_206A_206C_202E((ILogger)_logger, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1609496745), new object[2]
|
||||
{
|
||||
territoryType,
|
||||
_200C_200F_206E_202C_206F_206E_206F_206F_200E_206B_202E_200B_206C_200F_200B_206A_200C_200E_202C_202A_202A_200B_202D_202C_202D_206B_202E_206A_200D_200E_202D_206E_202B_202C_200C_200C_202B_206C_206B_202E_202E(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1645706687), (IEnumerable<string>)list2)
|
||||
});
|
||||
_candidateTextures = list2.Select((string p) => _202E_206B_206B_200F_206B_206E_202B_202D_200C_200F_202C_202E_200B_206B_200B_202B_202B_200D_202B_202A_202C_202C_206F_206C_206D_200E_202A_200C_200E_200E_202C_202B_206B_200C_202D_202B_200B_202E_200D_206B_202E(_textureProvider, p)).ToList();
|
||||
PollCandidates();
|
||||
return _resolvedTexture != null;
|
||||
case 14:
|
||||
num = ((territoryType != _loadedTerritoryType) ? (-703602799) : (-703602811));
|
||||
continue;
|
||||
case 17:
|
||||
num = ((territoryType != _loadedTerritoryType) ? (-703602796) : (-703602815));
|
||||
continue;
|
||||
case 20:
|
||||
num = ((map.Value.RowId != 0) ? (-703602808) : (-703602809));
|
||||
continue;
|
||||
case 19:
|
||||
num = ((territoryType != _loadedTerritoryType) ? (-703602797) : (-703602798));
|
||||
continue;
|
||||
case 13:
|
||||
return true;
|
||||
case 9:
|
||||
obj = null;
|
||||
break;
|
||||
case 4:
|
||||
num = -703602806;
|
||||
continue;
|
||||
case 2:
|
||||
return false;
|
||||
case 18:
|
||||
array = _202B_200D_202E_202E_200B_206D_206C_206E_200C_200B_200E_202E_202B_200F_202C_200F_202E_206B_200E_206B_200C_202E_206D_206C_206F_206C_202D_200F_200B_200F_202D_206B_202A_206E_206D_206B_206A_202B_202A_200D_202E(text, '/', StringSplitOptions.None);
|
||||
num = ((array.Length == 2) ? (-703602807) : (-703602793));
|
||||
continue;
|
||||
case 5:
|
||||
_failed = true;
|
||||
return false;
|
||||
case 11:
|
||||
{
|
||||
value = array[0];
|
||||
string text2 = array[1];
|
||||
List<string> list3 = new List<string>();
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler2 = new DefaultInterpolatedStringHandler(14, 3);
|
||||
defaultInterpolatedStringHandler2.AppendLiteral(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1333505234));
|
||||
defaultInterpolatedStringHandler2.AppendFormatted(text);
|
||||
defaultInterpolatedStringHandler2.AppendLiteral(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-102430846));
|
||||
defaultInterpolatedStringHandler2.AppendFormatted(value);
|
||||
defaultInterpolatedStringHandler2.AppendFormatted(text2);
|
||||
defaultInterpolatedStringHandler2.AppendLiteral(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-25096421));
|
||||
list3.Add(defaultInterpolatedStringHandler2.ToStringAndClear());
|
||||
list2 = list3;
|
||||
num = ((!_206A_200E_206B_206F_206B_200E_202B_206E_202E_200C_206F_206A_202E_200F_206B_206E_206A_200B_200D_202D_200B_202B_206A_200C_202E_206C_206D_206D_206D_206C_200F_202B_200D_200D_202C_206F_206B_206A_206A_206D_202E(text2, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-1596345032))) ? (-703602795) : (-703602803));
|
||||
continue;
|
||||
}
|
||||
case 6:
|
||||
_failed = true;
|
||||
return false;
|
||||
case 8:
|
||||
num = ((_resolvedTexture == null) ? (-703602804) : (-703602801));
|
||||
continue;
|
||||
case 22:
|
||||
_resolvedTexture = null;
|
||||
_candidateTextures = null;
|
||||
_failed = false;
|
||||
_retryAtMs = 0L;
|
||||
_loadedTerritoryType = territoryType;
|
||||
_searchFrames = 0;
|
||||
rowOrDefault = _dataManager.GetExcelSheet<TerritoryType>().GetRowOrDefault(territoryType);
|
||||
num = (rowOrDefault.HasValue ? (-703602802) : (-703602805));
|
||||
continue;
|
||||
case 10:
|
||||
_sizeFactor = map.Value.SizeFactor;
|
||||
_offsetX = map.Value.OffsetX;
|
||||
_offsetY = map.Value.OffsetY;
|
||||
text = map.Value.Id.ExtractText();
|
||||
num = ((!_206C_200D_202E_202D_202C_202E_200C_202D_202C_202A_200F_206D_200B_206B_200B_206B_202A_206A_200D_206F_206C_200B_206A_200E_206C_206E_200B_202E_200C_200E_206E_206F_206F_202A_206C_200D_200B_200B_206C_206B_202E(text)) ? (-703602800) : (-703602812));
|
||||
continue;
|
||||
case 12:
|
||||
obj = rowOrDefault.GetValueOrDefault().Map.ValueNullable;
|
||||
break;
|
||||
}
|
||||
map = obj;
|
||||
num = ((!map.HasValue) ? (-703602809) : (-703602794));
|
||||
return true;
|
||||
}
|
||||
if (territoryType == _loadedTerritoryType && _failed)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (territoryType == _loadedTerritoryType && _candidateTextures != null)
|
||||
{
|
||||
PollCandidates();
|
||||
return _resolvedTexture != null;
|
||||
}
|
||||
if (territoryType == _loadedTerritoryType && Environment.TickCount64 < _retryAtMs)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_resolvedTexture = null;
|
||||
_candidateTextures = null;
|
||||
_failed = false;
|
||||
_retryAtMs = 0L;
|
||||
_loadedTerritoryType = territoryType;
|
||||
_searchFrames = 0;
|
||||
Map? map = _dataManager.GetExcelSheet<TerritoryType>().GetRowOrDefault(territoryType)?.Map.ValueNullable;
|
||||
if (!map.HasValue || map.Value.RowId == 0)
|
||||
{
|
||||
_failed = true;
|
||||
return false;
|
||||
}
|
||||
_sizeFactor = map.Value.SizeFactor;
|
||||
_offsetX = map.Value.OffsetX;
|
||||
_offsetY = map.Value.OffsetY;
|
||||
string text = map.Value.Id.ExtractText();
|
||||
if (string.IsNullOrEmpty(text))
|
||||
{
|
||||
_failed = true;
|
||||
return false;
|
||||
}
|
||||
string[] array = text.Split('/');
|
||||
if (array.Length != 2)
|
||||
{
|
||||
_failed = true;
|
||||
return false;
|
||||
}
|
||||
string value = array[0];
|
||||
string text2 = array[1];
|
||||
List<string> list = new List<string> { $"ui/map/{text}/{value}{text2}_m.tex" };
|
||||
if (text2 != "00")
|
||||
{
|
||||
list.Add($"ui/map/{value}/00/{value}00_m.tex");
|
||||
}
|
||||
_logger.LogDebug("Starting map texture search for territory {TerritoryType}: {Paths}", territoryType, string.Join(", ", list));
|
||||
_candidateTextures = list.Select((string p) => _textureProvider.GetFromGame(p)).ToList();
|
||||
PollCandidates();
|
||||
return _resolvedTexture != null;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private void PollCandidates()
|
||||
{
|
||||
int num = ((_candidateTextures != null) ? 1719406812 : 1719406813);
|
||||
ISharedImmediateTexture current = default(ISharedImmediateTexture);
|
||||
while (true)
|
||||
if (_candidateTextures == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1719406812;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return;
|
||||
}
|
||||
foreach (ISharedImmediateTexture candidateTexture in _candidateTextures)
|
||||
{
|
||||
if (candidateTexture.GetWrapOrDefault() != null)
|
||||
{
|
||||
case 2:
|
||||
goto IL_004b;
|
||||
case 1:
|
||||
_resolvedTexture = candidateTexture;
|
||||
_candidateTextures = null;
|
||||
return;
|
||||
case 0:
|
||||
{
|
||||
using (List<ISharedImmediateTexture>.Enumerator enumerator = _candidateTextures.GetEnumerator())
|
||||
{
|
||||
num = -2142994811;
|
||||
while (true)
|
||||
{
|
||||
int num7 = num;
|
||||
num3 = -2142994811;
|
||||
num4 = num7;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = (enumerator.MoveNext() ? (-2142994815) : (-2142994809));
|
||||
break;
|
||||
case 4:
|
||||
current = enumerator.Current;
|
||||
num = ((_202E_200B_200C_200B_206D_200E_200B_206F_200D_206E_202C_206D_200C_206C_200D_202D_206E_200E_206F_200C_206B_200F_200B_206A_206E_200F_202D_200D_200D_202E_202E_200C_200B_206A_206B_202E_206D_202E_202A_202D_202E(current, (IDalamudTextureWrap)null) == null) ? (-2142994811) : (-2142994812));
|
||||
break;
|
||||
case 3:
|
||||
num = -2142994811;
|
||||
break;
|
||||
case 1:
|
||||
_resolvedTexture = current;
|
||||
_candidateTextures = null;
|
||||
return;
|
||||
case 2:
|
||||
goto end_IL_006e;
|
||||
}
|
||||
continue;
|
||||
end_IL_006e:
|
||||
break;
|
||||
}
|
||||
}
|
||||
int searchFrames = _searchFrames;
|
||||
num3 = 1;
|
||||
num4 = searchFrames;
|
||||
int num8 = num4 ^ num3;
|
||||
int num9 = num4 & num3;
|
||||
_searchFrames = num8 + (num9 + num9);
|
||||
num = ((_searchFrames < 120) ? 613954225 : 613954226);
|
||||
while (true)
|
||||
{
|
||||
int num10 = num;
|
||||
num3 = 613954224;
|
||||
num4 = num10;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 613954226;
|
||||
break;
|
||||
case 2:
|
||||
_206D_206F_202C_200D_202B_202E_200C_200B_206C_206A_206D_202B_206B_202B_206B_202C_202A_206B_202C_200E_206E_200F_200F_206D_202A_206B_206F_206B_200D_200F_200D_206D_200C_206B_200D_202B_200D_206A_206D_200C_202E((ILogger)_logger, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1519773533), new object[2] { _loadedTerritoryType, 30L });
|
||||
_candidateTextures = null;
|
||||
_retryAtMs = _200E_206C_202D_200C_200F_206A_202A_200E_200E_202C_202D_202D_202B_206B_206F_206F_200F_206D_206A_206E_202C_206E_200F_200F_206B_202A_206A_202A_200F_206A_206F_206A_200E_200D_206E_206D_206B_206B_200D_206E_202E() + 30000;
|
||||
num = 613954225;
|
||||
break;
|
||||
case 1:
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
continue;
|
||||
IL_004b:
|
||||
num = 1719406813;
|
||||
}
|
||||
_searchFrames++;
|
||||
if (_searchFrames >= 120)
|
||||
{
|
||||
_logger.LogWarning("Map texture search timed out for territory {TerritoryType}, retrying in {Delay}s", _loadedTerritoryType, 30L);
|
||||
_candidateTextures = null;
|
||||
_retryAtMs = Environment.TickCount64 + 30000;
|
||||
}
|
||||
}
|
||||
|
||||
public IDalamudTextureWrap? GetTextureWrap()
|
||||
{
|
||||
ISharedImmediateTexture? resolvedTexture = _resolvedTexture;
|
||||
if (resolvedTexture == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return _202E_200B_200C_200B_206D_200E_200B_206F_200D_206E_202C_206D_200C_206C_200D_202D_206E_200E_206F_200C_206B_200F_200B_206A_206E_200F_202D_200D_200D_202E_202E_200C_200B_206A_206B_202E_206D_202E_202A_202D_202E(resolvedTexture, (IDalamudTextureWrap)null);
|
||||
return _resolvedTexture?.GetWrapOrDefault();
|
||||
}
|
||||
|
||||
public Vector2 WorldToUV(float worldX, float worldZ)
|
||||
|
|
@ -315,49 +168,4 @@ public sealed class MapTextureService
|
|||
Vector2 vector = (screenPos - imagePos) / imageSize;
|
||||
return UVToWorld(vector.X, vector.Y);
|
||||
}
|
||||
|
||||
static long _200E_206C_202D_200C_200F_206A_202A_200E_200E_202C_202D_202D_202B_206B_206F_206F_200F_206D_206A_206E_202C_206E_200F_200F_206B_202A_206A_202A_200F_206A_206F_206A_200E_200D_206E_206D_206B_206B_200D_206E_202E()
|
||||
{
|
||||
return Environment.TickCount64;
|
||||
}
|
||||
|
||||
static bool _206C_200D_202E_202D_202C_202E_200C_202D_202C_202A_200F_206D_200B_206B_200B_206B_202A_206A_200D_206F_206C_200B_206A_200E_206C_206E_200B_202E_200C_200E_206E_206F_206F_202A_206C_200D_200B_200B_206C_206B_202E(string P_0)
|
||||
{
|
||||
return string.IsNullOrEmpty(P_0);
|
||||
}
|
||||
|
||||
static string[] _202B_200D_202E_202E_200B_206D_206C_206E_200C_200B_200E_202E_202B_200F_202C_200F_202E_206B_200E_206B_200C_202E_206D_206C_206F_206C_202D_200F_200B_200F_202D_206B_202A_206E_206D_206B_206A_202B_202A_200D_202E(string P_0, char P_1, StringSplitOptions P_2)
|
||||
{
|
||||
return P_0.Split(P_1, P_2);
|
||||
}
|
||||
|
||||
static bool _206A_200E_206B_206F_206B_200E_202B_206E_202E_200C_206F_206A_202E_200F_206B_206E_206A_200B_200D_202D_200B_202B_206A_200C_202E_206C_206D_206D_206D_206C_200F_202B_200D_200D_202C_206F_206B_206A_206A_206D_202E(string P_0, string P_1)
|
||||
{
|
||||
return P_0 != P_1;
|
||||
}
|
||||
|
||||
static string _200C_200F_206E_202C_206F_206E_206F_206F_200E_206B_202E_200B_206C_200F_200B_206A_200C_200E_202C_202A_202A_200B_202D_202C_202D_206B_202E_206A_200D_200E_202D_206E_202B_202C_200C_200C_202B_206C_206B_202E_202E(string P_0, IEnumerable<string> P_1)
|
||||
{
|
||||
return string.Join(P_0, P_1);
|
||||
}
|
||||
|
||||
static void _206F_200B_200E_206D_200C_200B_206B_206C_202A_206C_206C_206C_206D_202E_206E_206F_206A_200C_200D_200C_202D_202D_200E_206D_202E_202D_200D_202C_206C_200B_200E_202B_200F_202E_202E_206A_202D_206C_206A_206C_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogDebug(P_1, P_2);
|
||||
}
|
||||
|
||||
static IDalamudTextureWrap _202E_200B_200C_200B_206D_200E_200B_206F_200D_206E_202C_206D_200C_206C_200D_202D_206E_200E_206F_200C_206B_200F_200B_206A_206E_200F_202D_200D_200D_202E_202E_200C_200B_206A_206B_202E_206D_202E_202A_202D_202E(ISharedImmediateTexture P_0, IDalamudTextureWrap P_1)
|
||||
{
|
||||
return P_0.GetWrapOrDefault(P_1);
|
||||
}
|
||||
|
||||
static void _206D_206F_202C_200D_202B_202E_200C_200B_206C_206A_206D_202B_206B_202B_206B_202C_202A_206B_202C_200E_206E_200F_200F_206D_202A_206B_206F_206B_200D_200F_200D_206D_200C_206B_200D_202B_200D_206A_206D_200C_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogWarning(P_1, P_2);
|
||||
}
|
||||
|
||||
static ISharedImmediateTexture _202E_206B_206B_200F_206B_206E_202B_202D_200C_200F_202C_202E_200B_206B_200B_202B_202B_200D_202B_202A_202C_202C_206F_206C_206D_200E_202A_200C_200E_200E_202C_202B_206B_200C_202D_202B_200B_202E_200D_206B_202E(ITextureProvider P_0, string P_1)
|
||||
{
|
||||
return P_0.GetFromGame(P_1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue