RynthCore as of 2026-11-23 (internal 115e628): release 2026.11.23.1
This commit is contained in:
parent
3fafd29133
commit
a7d5f791c8
85 changed files with 5889 additions and 861 deletions
|
|
@ -239,9 +239,156 @@ begin
|
|||
Log('Decal bridge: per-user step did not start: ' + SysErrorMessage(Code));
|
||||
end;
|
||||
|
||||
(* -------------------------------------------------------------------------------------
|
||||
VirindiTank files: offer to copy the player's VTank metas (*.met, and metaf's *.af), nav
|
||||
routes (*.nav) and loot profiles (*.utl) into RynthAi's MetaFiles, NavProfiles and
|
||||
LootProfiles, which RynthAi loads as they are. VTank's "--<character>_<server>" state files
|
||||
and character settings (.usd) are not part of this (settings are imported per character in
|
||||
game). Nothing about Decal changes. The same copy is in the launcher (Runtime > Coming from
|
||||
VirindiTank > Import VirindiTank files), which can also pick a folder and keep both copies
|
||||
when RynthAi has a different file of the same name; Setup only ever skips those.
|
||||
|
||||
- Interactive installs only: never with /SILENT or /VERYSILENT (the launcher's updates) or
|
||||
on the /RELAUNCH update path.
|
||||
- Asked once per PC: the answer, Yes or No, is recorded in VTankAskedMarker (in RynthAi's
|
||||
folder, which uninstall never removes), and Setup never asks again while it exists.
|
||||
- Files first: RynthCore.exe --vtank-import scan (src\RynthCore.App\VTankFileImport.cs,
|
||||
tested by tools\VTankFileImportTests) looks at the top level of VTank's folder(s): Decal's
|
||||
VTank entry (read only) and the usual install locations. Nothing new to copy: no question
|
||||
and nothing recorded.
|
||||
- Yes: --vtank-import copy. Never overwrites a file RynthAi has, never changes, moves or
|
||||
deletes anything in a VTank folder. Every copied and skipped file goes to the setup log;
|
||||
one closing message gives the counts.
|
||||
Both commands run as the user who started Setup (their Documents, their files).
|
||||
------------------------------------------------------------------------------------- *)
|
||||
const
|
||||
VTankRynthAiDir = 'C:\Games\RynthSuite\RynthAi';
|
||||
VTankAskedMarker = 'C:\Games\RynthSuite\RynthAi\vtank-import-asked.txt';
|
||||
|
||||
function VTankReportValue(const Lines: TArrayOfString; const Key: String): Integer;
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
Result := 0;
|
||||
for I := 0 to GetArrayLength(Lines) - 1 do
|
||||
if Pos(Key + '=', Lines[I]) = 1 then
|
||||
begin
|
||||
Result := StrToIntDef(Copy(Lines[I], Length(Key) + 2, MaxInt), 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
function RunVTankImport(const Mode: String; var Lines: TArrayOfString): Boolean;
|
||||
var
|
||||
Report: String;
|
||||
Code, I: Integer;
|
||||
begin
|
||||
Result := False;
|
||||
Report := ExpandConstant('{tmp}\rynthcore-vtank-import-' + Mode + '.txt');
|
||||
DeleteFile(Report);
|
||||
if not ExecAsOriginalUser(ExpandConstant('{app}\RynthCore.exe'),
|
||||
'--vtank-import ' + Mode + ' "' + VTankRynthAiDir + '" --report "' + Report + '"',
|
||||
ExpandConstant('{app}'), SW_HIDE, ewWaitUntilTerminated, Code) then
|
||||
begin
|
||||
Log('VTank import: ' + Mode + ' did not start: ' + SysErrorMessage(Code));
|
||||
Exit;
|
||||
end;
|
||||
Log('VTank import: ' + Mode + ' exit code ' + IntToStr(Code));
|
||||
if not LoadStringsFromFile(Report, Lines) then
|
||||
begin
|
||||
Log('VTank import: no ' + Mode + ' report - nothing more done.');
|
||||
Exit;
|
||||
end;
|
||||
for I := 0 to GetArrayLength(Lines) - 1 do
|
||||
if Pos('log=', Lines[I]) = 1 then
|
||||
Log(Copy(Lines[I], 5, MaxInt));
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
function VTankCount(N: Integer; const One, Many: String): String;
|
||||
begin
|
||||
if N = 1 then
|
||||
Result := '1 ' + One
|
||||
else
|
||||
Result := IntToStr(N) + ' ' + Many;
|
||||
end;
|
||||
|
||||
procedure VTankAddPart(var List: String; N: Integer; const One, Many: String);
|
||||
begin
|
||||
if N <= 0 then Exit;
|
||||
if List <> '' then List := List + ', ';
|
||||
List := List + VTankCount(N, One, Many);
|
||||
end;
|
||||
|
||||
procedure OfferVTankImport;
|
||||
var
|
||||
Scan, Done: TArrayOfString;
|
||||
Found, Answer, Msg: String;
|
||||
Copied, Skipped, Already, Failed: Integer;
|
||||
begin
|
||||
if WizardSilent or CmdLineParamExists('/RELAUNCH') then Exit;
|
||||
if FileExists(VTankAskedMarker) then
|
||||
begin
|
||||
Log('VTank import: asked before (' + VTankAskedMarker + ') - not asked again.');
|
||||
Exit;
|
||||
end;
|
||||
if not DirExists(VTankRynthAiDir) then Exit;
|
||||
if not RunVTankImport('scan', Scan) then Exit;
|
||||
if VTankReportValue(Scan, 'new') <= 0 then
|
||||
begin
|
||||
Log('VTank import: no VirindiTank files that RynthAi does not have already - nothing asked.');
|
||||
Exit;
|
||||
end;
|
||||
|
||||
Found := '';
|
||||
VTankAddPart(Found, VTankReportValue(Scan, 'metas'), 'meta', 'metas');
|
||||
VTankAddPart(Found, VTankReportValue(Scan, 'navs'), 'nav route', 'nav routes');
|
||||
VTankAddPart(Found, VTankReportValue(Scan, 'loot'), 'loot profile', 'loot profiles');
|
||||
if MsgBox('RynthCore found your VirindiTank files: ' + Found + '.' + #13#10#13#10 +
|
||||
'Copy them to RynthAi so you can use them there? Files you already have in RynthAi are not replaced, ' +
|
||||
'and nothing in your VirindiTank folder is changed.' + #13#10#13#10 +
|
||||
'You can also do this later from the launcher: Runtime tab, Import VirindiTank files.',
|
||||
mbConfirmation, MB_YESNO) = IDYES then
|
||||
Answer := 'Yes'
|
||||
else
|
||||
Answer := 'No';
|
||||
Log('VTank import: offered ' + Found + '; answer ' + Answer + '.');
|
||||
if not SaveStringToFile(VTankAskedMarker,
|
||||
'RynthCore Setup asked on ' + GetDateTimeString('yyyy/mm/dd hh:nn', '-', ':') +
|
||||
' whether to copy the VirindiTank files (' + Found + ') to RynthAi. Answer: ' + Answer + '.' + #13#10 +
|
||||
'While this file exists Setup does not ask again.' + #13#10, False) then
|
||||
Log('VTank import: could not record the answer in ' + VTankAskedMarker + ' - Setup may ask again next time.');
|
||||
if Answer <> 'Yes' then Exit;
|
||||
|
||||
WizardForm.StatusLabel.Caption := 'Copying your VirindiTank files to RynthAi...';
|
||||
if not RunVTankImport('copy', Done) then
|
||||
begin
|
||||
MsgBox('RynthCore could not copy your VirindiTank files. Nothing in your VirindiTank folder was changed.',
|
||||
mbError, MB_OK);
|
||||
Exit;
|
||||
end;
|
||||
Copied := VTankReportValue(Done, 'copied');
|
||||
Skipped := VTankReportValue(Done, 'skipped');
|
||||
Failed := VTankReportValue(Done, 'failed');
|
||||
Already := VTankReportValue(Done, 'already');
|
||||
Msg := 'Copied ' + VTankCount(Copied, 'VirindiTank file', 'VirindiTank files') + ' to RynthAi.';
|
||||
if Already > 0 then
|
||||
Msg := Msg + #13#10 + VTankCount(Already, 'file was', 'files were') + ' already in RynthAi.';
|
||||
if Skipped > 0 then
|
||||
Msg := Msg + #13#10 + VTankCount(Skipped, 'file was', 'files were') +
|
||||
' skipped: RynthAi already has a different file of that name (yours was kept). ' +
|
||||
'The launcher''s Import VirindiTank files button (Runtime tab) can copy them beside yours.';
|
||||
if Failed > 0 then
|
||||
Msg := Msg + #13#10 + VTankCount(Failed, 'file', 'files') + ' could not be copied (the setup log says why).';
|
||||
MsgBox(Msg, mbInformation, MB_OK);
|
||||
end;
|
||||
|
||||
procedure CurStepChanged(CurStep: TSetupStep);
|
||||
begin
|
||||
{ After the files, before [Run] (which relaunches the launcher after an update). }
|
||||
if CurStep = ssPostInstall then
|
||||
begin
|
||||
RegisterDecalBridge;
|
||||
OfferVTankImport;
|
||||
end;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ namespace RynthCore.App.Avalonia;
|
|||
/// <summary>
|
||||
/// Small code-built dialogs for the Decal bridge: the "Check Decal bridge" report (with
|
||||
/// Repair / Copy), the yes/no before an administrator step or Repair Decal, and plain messages.
|
||||
/// Also used by other launcher actions (Fix folder permissions, Import VirindiTank files).
|
||||
/// </summary>
|
||||
internal static class DecalBridgeDialog
|
||||
{
|
||||
|
|
@ -33,6 +34,32 @@ internal static class DecalBridgeDialog
|
|||
return result == true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A message with several buttons (selectable text). Returns the index of the button pressed,
|
||||
/// -1 when the window was closed. The first button is the default; the last is Cancel (Esc).
|
||||
/// </summary>
|
||||
public static async Task<int> ChooseAsync(Window owner, string title, string message, params string[] buttons)
|
||||
{
|
||||
var dialog = NewWindow(title, 640);
|
||||
var controls = new Control[buttons.Length];
|
||||
for (int i = 0; i < buttons.Length; i++)
|
||||
{
|
||||
int index = i;
|
||||
var b = new Button { Content = buttons[i], IsDefault = i == 0, IsCancel = i == buttons.Length - 1 };
|
||||
b.Click += (_, _) => dialog.Close(index);
|
||||
controls[i] = b;
|
||||
}
|
||||
dialog.Content = Layout(title,
|
||||
new ScrollViewer
|
||||
{
|
||||
MaxHeight = 460,
|
||||
Content = new SelectableTextBlock { Text = message, TextWrapping = TextWrapping.Wrap, Foreground = Text },
|
||||
},
|
||||
controls);
|
||||
int? result = await dialog.ShowDialog<int?>(owner);
|
||||
return result ?? -1;
|
||||
}
|
||||
|
||||
/// <summary>A message with one OK button (selectable text, so paths can be copied).</summary>
|
||||
public static async Task InfoAsync(Window owner, string title, string message)
|
||||
{
|
||||
|
|
|
|||
160
src/RynthCore.App.Avalonia/MainWindow.VTankImport.cs
Normal file
160
src/RynthCore.App.Avalonia/MainWindow.VTankImport.cs
Normal file
|
|
@ -0,0 +1,160 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Avalonia.Platform.Storage;
|
||||
using RynthCore.Install;
|
||||
using static RynthCore.App.VTankFileImport;
|
||||
|
||||
namespace RynthCore.App.Avalonia;
|
||||
|
||||
/// <summary>
|
||||
/// Runtime > "Coming from VirindiTank" > Import VirindiTank files: copies the player's VTank metas,
|
||||
/// navs and loot profiles into RynthAi's folders. The search, the plan and the copy are
|
||||
/// src\RynthCore.App\VTankFileImport.cs (shared with the installer's offer, tested by
|
||||
/// tools\VTankFileImportTests); this is only the questions and the messages.
|
||||
/// </summary>
|
||||
internal partial class MainWindow
|
||||
{
|
||||
private const string VTankImportTitle = "Import VirindiTank files";
|
||||
private bool _vtankImportBusy;
|
||||
|
||||
private enum VTankChoice { Copy, KeepBoth, PickFolder, Cancel }
|
||||
|
||||
private async Task ImportVTankFilesAsync()
|
||||
{
|
||||
if (_vtankImportBusy) return;
|
||||
_vtankImportBusy = true;
|
||||
ImportVTankFilesButton.IsEnabled = false;
|
||||
try
|
||||
{
|
||||
await ImportVTankFilesCoreAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LauncherDiag.Info($"VTANKIMPORT: failed ({ex.GetType().Name}: {ex.Message})");
|
||||
AppendActivity($"Import VirindiTank files: failed ({ex.Message}).");
|
||||
await DecalBridgeDialog.InfoAsync(this, VTankImportTitle, $"The import stopped: {ex.Message}\n\nNothing in your VirindiTank folder was changed.");
|
||||
}
|
||||
finally
|
||||
{
|
||||
_vtankImportBusy = false;
|
||||
ImportVTankFilesButton.IsEnabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private async Task ImportVTankFilesCoreAsync()
|
||||
{
|
||||
string ai = RynthInstallPaths.RynthAiDir;
|
||||
if (!Directory.Exists(ai))
|
||||
{
|
||||
AppendActivity($"Import VirindiTank files: RynthAi's folder {ai} doesn't exist; nothing copied.");
|
||||
await DecalBridgeDialog.InfoAsync(this, VTankImportTitle,
|
||||
$"RynthAi isn't installed here yet: {ai} doesn't exist. Install RynthSuite first, then import.");
|
||||
return;
|
||||
}
|
||||
|
||||
ScanResult scan = await ScanVTankAsync(null, ai);
|
||||
ConflictMode mode;
|
||||
while (true)
|
||||
{
|
||||
if (scan.TotalFound == 0)
|
||||
{
|
||||
string why = scan.Roots.Count == 0
|
||||
? "RynthCore didn't find a VirindiTank folder in the usual places (Decal's plugin list, " +
|
||||
@"C:\Games\VirindiPlugins\VirindiTank, Documents, Program Files)."
|
||||
: "There are no VirindiTank metas (.met, .af), nav routes (.nav) or loot profiles (.utl) in " +
|
||||
string.Join(", ", scan.Roots) + ".";
|
||||
int pick = await DecalBridgeDialog.ChooseAsync(this, VTankImportTitle,
|
||||
why + "\n\nChoose the folder VirindiTank is installed in?", "Choose folder...", "Cancel");
|
||||
if (pick != 0 || !await RescanPickedFolderAsync(ai, s => scan = s))
|
||||
{
|
||||
AppendActivity("Import VirindiTank files: cancelled; nothing copied.");
|
||||
return;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
var choices = new List<(string Label, VTankChoice Choice)>();
|
||||
if (scan.NewCount > 0) choices.Add(("Copy", VTankChoice.Copy));
|
||||
if (scan.ConflictCount > 0) choices.Add(("Copy, keep both", VTankChoice.KeepBoth));
|
||||
choices.Add(("Choose another folder...", VTankChoice.PickFolder));
|
||||
choices.Add((choices.Count == 1 ? "Close" : "Cancel", VTankChoice.Cancel));
|
||||
|
||||
string plan = DescribePlan(scan);
|
||||
if (scan.NewCount == 0 && scan.ConflictCount == 0)
|
||||
plan += "\n\nEverything here is already in RynthAi.";
|
||||
int i = await DecalBridgeDialog.ChooseAsync(this, VTankImportTitle, plan, choices.Select(c => c.Label).ToArray());
|
||||
VTankChoice choice = i >= 0 && i < choices.Count ? choices[i].Choice : VTankChoice.Cancel;
|
||||
if (choice == VTankChoice.PickFolder)
|
||||
{
|
||||
if (!await RescanPickedFolderAsync(ai, s => scan = s))
|
||||
{
|
||||
AppendActivity("Import VirindiTank files: cancelled; nothing copied.");
|
||||
return;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (choice == VTankChoice.Cancel)
|
||||
{
|
||||
AppendActivity("Import VirindiTank files: cancelled; nothing copied.");
|
||||
return;
|
||||
}
|
||||
mode = choice == VTankChoice.KeepBoth ? ConflictMode.KeepBoth : ConflictMode.Skip;
|
||||
break;
|
||||
}
|
||||
|
||||
AppendActivity($"Import VirindiTank files: copying from {string.Join(", ", scan.Roots)}{(mode == ConflictMode.KeepBoth ? " (keep both)" : "")}...");
|
||||
CopyResult result = await Task.Run(() => Copy(scan, mode));
|
||||
foreach (string line in result.Log) LauncherDiag.Info("VTANKIMPORT: " + line);
|
||||
string summary = $"{result.Copied} copied ({result.KeptBoth} kept both), {result.Skipped} skipped, " +
|
||||
$"{result.AlreadyThere} already there, {result.Failed} failed.";
|
||||
LauncherDiag.Info("VTANKIMPORT: (launcher) " + summary);
|
||||
AppendActivity("Import VirindiTank files: " + summary);
|
||||
await DecalBridgeDialog.InfoAsync(this, VTankImportTitle, DescribeResult(result, ai));
|
||||
}
|
||||
|
||||
/// <summary>Scans <paramref name="roots"/> (null = this PC's usual VTank folders) off the UI thread; logs it.</summary>
|
||||
private static async Task<ScanResult> ScanVTankAsync(IEnumerable<string>? roots, string ai)
|
||||
{
|
||||
ScanResult scan = await Task.Run(() => Find(roots ?? DefaultRoots(), ai));
|
||||
foreach (string r in scan.Roots) LauncherDiag.Info("VTANKIMPORT: looked in " + r);
|
||||
foreach (string line in scan.Log) LauncherDiag.Info("VTANKIMPORT: " + line);
|
||||
LauncherDiag.Info($"VTANKIMPORT: scan: {scan.TotalFound} found, {scan.NewCount} new, {scan.ConflictCount} name conflicts, " +
|
||||
$"{scan.SameCount} already there, {scan.StateFilesLeftOut} VTank state files left out.");
|
||||
return scan;
|
||||
}
|
||||
|
||||
/// <summary>Folder picker, then a scan of that folder. False when the player cancelled the picker.</summary>
|
||||
private async Task<bool> RescanPickedFolderAsync(string ai, Action<ScanResult> set)
|
||||
{
|
||||
string? picked = await PickVTankFolderAsync();
|
||||
if (picked == null) return false;
|
||||
string root = ResolvePickedFolder(picked);
|
||||
set(await ScanVTankAsync(new[] { root }, ai));
|
||||
return true;
|
||||
}
|
||||
|
||||
private async Task<string?> PickVTankFolderAsync()
|
||||
{
|
||||
var topLevel = GetTopLevel(this);
|
||||
if (topLevel == null) return null;
|
||||
IStorageFolder? start = null;
|
||||
try
|
||||
{
|
||||
string guess = Directory.Exists(@"C:\Games\VirindiPlugins") ? @"C:\Games\VirindiPlugins" : @"C:\Games";
|
||||
if (Directory.Exists(guess)) start = await topLevel.StorageProvider.TryGetFolderFromPathAsync(guess);
|
||||
}
|
||||
catch { }
|
||||
var folders = await topLevel.StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
|
||||
{
|
||||
Title = "Choose your VirindiTank folder",
|
||||
AllowMultiple = false,
|
||||
SuggestedStartLocation = start,
|
||||
});
|
||||
if (folders.Count == 0) return null;
|
||||
string? path = folders[0].TryGetLocalPath();
|
||||
return string.IsNullOrEmpty(path) ? null : path;
|
||||
}
|
||||
}
|
||||
|
|
@ -440,6 +440,14 @@
|
|||
Content="Rewrite AC window titles per account"
|
||||
ToolTip.Tip="Replaces "Asheron's Call" with "Account / Character @ Server" on tracked clients so multi-box taskbars are readable. Untracked external clients are left alone." />
|
||||
<CheckBox x:Name="InjectAllRunningAcCheckBox" Content="Inject all running AC sessions" />
|
||||
<CheckBox x:Name="FixPaletteLeakCheckBox"
|
||||
Content="Fix AC's palette memory leak"
|
||||
ToolTip.Tip="AC never frees the colour palettes of creatures, armour and items, so a client's memory grows the longer it runs (hundreds of MB in a day of hunting). This changes one byte in two places in the running client to fix it (eriknihlen's EoR palette leak fix). Leave it off if your acclient.exe is already patched for this. Takes effect the next time a game starts." />
|
||||
<TextBlock Text="Takes effect the next time a game starts. Leave off if your client already has the palette leak fix."
|
||||
TextWrapping="Wrap"
|
||||
FontSize="12"
|
||||
Foreground="#9AA8B3"
|
||||
Margin="28,-4,0,0" />
|
||||
<TextBlock Text="Logging level (applies live)" Foreground="#EAF0F4" Margin="0,4,0,0" />
|
||||
<ComboBox x:Name="LoggingLevelComboBox" SelectedIndex="3"
|
||||
ToolTip.Tip="Engine log threshold. Written to engine.json immediately; running clients pick it up within a second. Off = errors only.">
|
||||
|
|
@ -548,6 +556,17 @@
|
|||
Foreground="#9AA8B3" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Background="#132028" CornerRadius="16" Padding="18">
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="Coming from VirindiTank" FontSize="16" FontWeight="SemiBold" Foreground="#26C1A6" />
|
||||
<TextBlock Text="Copies your VirindiTank metas, nav routes and loot profiles into RynthAi. You see what it will copy before anything happens; files RynthAi already has are never replaced, and nothing in your VirindiTank folder changes."
|
||||
TextWrapping="Wrap"
|
||||
Foreground="#9AA8B3" />
|
||||
<Button x:Name="ImportVTankFilesButton" Content="Import VirindiTank files"
|
||||
ToolTip.Tip="Copies VirindiTank's .met and .af metas, .nav routes and .utl loot profiles into RynthAi's MetaFiles, NavProfiles and LootProfiles folders. Finds your VirindiTank folder (Decal's plugin list or the usual places), or lets you pick it." />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
|
|
|
|||
|
|
@ -277,6 +277,7 @@ internal partial class MainWindow : Window
|
|||
CheckDecalBridgeButton.Click += async (_, _) => await CheckDecalBridgeAsync();
|
||||
RepairDecalButton.Click += async (_, _) => await RepairDecalAsync();
|
||||
FixFolderPermissionsButton.Click += async (_, _) => await FixFolderPermissionsAsync();
|
||||
ImportVTankFilesButton.Click += async (_, _) => await ImportVTankFilesAsync();
|
||||
AddPluginDllButton.Click += async (_, _) => await AddPluginDllAsync();
|
||||
CheckUpdatesButton.Click += async (_, _) => await CheckForUpdatesAsync();
|
||||
RollbackButton.Click += async (_, _) => await RollBackAsync();
|
||||
|
|
@ -417,6 +418,7 @@ internal partial class MainWindow : Window
|
|||
InjectAllRunningAcCheckBox.IsChecked = _settings.InjectAllRunningClients;
|
||||
SetLoggingLevelSelection(_settings.LoggingLevel);
|
||||
OverrideWindowTitleCheckBox.IsChecked = _settings.OverrideWindowTitle;
|
||||
FixPaletteLeakCheckBox.IsChecked = _settings.FixPaletteLeak;
|
||||
LaunchStaggerMsBox.Value = _settings.LaunchStaggerMs;
|
||||
CrashRelaunchLimitBox.Value = _settings.CrashRelaunchLimitInWindow;
|
||||
CrashRelaunchWindowBox.Value = _settings.CrashRelaunchWindowMinutes;
|
||||
|
|
@ -1670,6 +1672,7 @@ internal partial class MainWindow : Window
|
|||
_settings.InjectAllRunningClients = InjectAllRunningAcCheckBox.IsChecked == true;
|
||||
_settings.LoggingLevel = GetSelectedLoggingLevel();
|
||||
_settings.OverrideWindowTitle = OverrideWindowTitleCheckBox.IsChecked == true;
|
||||
_settings.FixPaletteLeak = FixPaletteLeakCheckBox.IsChecked == true;
|
||||
if (LaunchStaggerMsBox.Value is decimal staggerMs)
|
||||
_settings.LaunchStaggerMs = (int)staggerMs;
|
||||
if (CrashRelaunchLimitBox.Value is decimal crashLimit)
|
||||
|
|
@ -4877,6 +4880,11 @@ internal partial class MainWindow : Window
|
|||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
private static extern bool GetWindowRect(IntPtr hWnd, out WinRect lpRect);
|
||||
|
||||
// The area AC draws into: its resolution while the launcher leaves the size to AC (no message sent).
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
private static extern bool GetClientRect(IntPtr hWnd, out WinRect lpRect);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
private static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
|
||||
|
|
@ -5106,6 +5114,11 @@ internal partial class MainWindow : Window
|
|||
// resolution, and a smaller window crops the game and the HUD.
|
||||
SetWindowPos(hwnd, IntPtr.Zero, d.X, d.Y, 0, 0,
|
||||
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_ASYNCWINDOWPOS);
|
||||
// 2026-11-21: a saved size that is not the window's is never applied; say so once.
|
||||
if (GetClientRect(hwnd, out WinRect client)
|
||||
&& AcWindowPlacementRule.SavedSizeIgnored(sv.Width, sv.Height, current.Width, current.Height,
|
||||
client.Right - client.Left, client.Bottom - client.Top) is string ignored)
|
||||
LauncherDiag.Info($"WindowPos PID {process.Id} ({accountName}@{serverName}): {ignored}.");
|
||||
LauncherDiag.Info(d.Clamped
|
||||
? $"WindowPos PID {process.Id} ({accountName}@{serverName}): restored position to ({d.X},{d.Y}), pulled onto the screen from ({sv.X},{sv.Y}); size left to AC ({current.Width}x{current.Height})."
|
||||
: $"WindowPos PID {process.Id} ({accountName}@{serverName}): restored position to ({d.X},{d.Y}); size left to AC ({current.Width}x{current.Height}).");
|
||||
|
|
|
|||
|
|
@ -83,6 +83,16 @@ internal static class Program
|
|||
}
|
||||
return report.Ok ? 0 : 1;
|
||||
}
|
||||
// The installer's offer to copy VirindiTank metas, navs and loot profiles into RynthAi
|
||||
// (installer\RynthCore.iss OfferVTankImport, interactive installs only, asked once per PC):
|
||||
// --vtank-import scan|copy "<RynthAi folder>" --report "<file>". Never overwrites, never
|
||||
// changes a VTank folder. Never falls through to the window: a malformed command exits with 2.
|
||||
if (Array.Exists(args, a => string.Equals(a, RynthCore.App.VTankFileImport.Argument, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
int code = RynthCore.App.VTankFileImport.Run(args, roots: null, out string summary);
|
||||
LauncherDiag.Info($"VTANKIMPORT: (installer) {summary}");
|
||||
return code;
|
||||
}
|
||||
if (Array.Exists(args, a => string.Equals(a, "--decal-bridge-status", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
LauncherDiag.Info($"DECALBRIDGE: status (command line): {RynthCore.App.DecalBridgeRegistration.GetStatus()}");
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
<Compile Include="..\RynthCore.App\DecalLocator.cs" Link="Shared\DecalLocator.cs" />
|
||||
<Compile Include="..\RynthCore.App\DecalBridgeRegistration.cs" Link="Shared\DecalBridgeRegistration.cs" />
|
||||
<Compile Include="..\RynthCore.App\FolderAccess.cs" Link="Shared\FolderAccess.cs" />
|
||||
<Compile Include="..\RynthCore.App\VTankFileImport.cs" Link="Shared\VTankFileImport.cs" />
|
||||
<Compile Include="..\RynthCore.App\DecalBridgeCheck.cs" Link="Shared\DecalBridgeCheck.cs" />
|
||||
<Compile Include="..\RynthCore.App\RealDecalCheckHost.cs" Link="Shared\RealDecalCheckHost.cs" />
|
||||
<Compile Include="..\RynthCore.App\AcLaunchArgumentBuilder.cs" Link="Shared\AcLaunchArgumentBuilder.cs" />
|
||||
|
|
|
|||
|
|
@ -28,6 +28,15 @@ namespace RynthCore.App;
|
|||
/// the client closes, and AC's own moves at startup and portal-in, never reach the profile.
|
||||
/// The saved width and height are still written: they are what the size checks compare against.
|
||||
///
|
||||
/// 2026-11-21: a saved 1940x1100 window (client 1934x1071) on a 1600x900 game was still being put back,
|
||||
/// size included, by builds that predate the rule above, and AC stretched its 1600x900 picture about 21%
|
||||
/// to fill it (the overlay's nameplates were misplaced too). Here the launcher keeps the size AC gives
|
||||
/// the window: AC sizes it from the Resolution in its prefs when it starts (and again when the player
|
||||
/// changes the resolution in game), so a window the launcher only moves always matches the resolution,
|
||||
/// whatever it is. Reading the prefs ini instead would only repeat what AC already did, and could be
|
||||
/// stale. When the saved size differs from the window's, one line says it was ignored
|
||||
/// (<see cref="SavedSizeIgnored"/>).
|
||||
///
|
||||
/// 2026-11-15, report R-20261115-160655-1201: the engine's opt-in Remember Game Window Position
|
||||
/// (UI/AcWindowChrome) had the same bug and now uses this rule too (compiled into the engine, so keep
|
||||
/// it free of launcher types). While that option is on, the launcher leaves the window to the engine.
|
||||
|
|
@ -78,6 +87,19 @@ internal static class AcWindowPlacementRule
|
|||
&& Math.Abs(width - savedWidth) * 4L <= Math.Max(width, savedWidth)
|
||||
&& Math.Abs(height - savedHeight) * 4L <= Math.Max(height, savedHeight);
|
||||
|
||||
/// <summary>
|
||||
/// 2026-11-21: the one log line for a saved size that is not put back, or null when the saved size is
|
||||
/// the window's (give or take <see cref="Tolerance"/>). <paramref name="width"/> x <paramref name="height"/>
|
||||
/// is the outer size the window has (or gets) at AC's resolution, <paramref name="drawWidth"/> x
|
||||
/// <paramref name="drawHeight"/> that resolution (the client area AC draws into). A saved size is only
|
||||
/// ever a hint for "is this the same window": AC stretches its picture to a window that is not its
|
||||
/// resolution, so neither the launcher nor the engine applies one.
|
||||
/// </summary>
|
||||
public static string? SavedSizeIgnored(int savedWidth, int savedHeight, int width, int height, int drawWidth, int drawHeight) =>
|
||||
Math.Abs(savedWidth - width) <= Tolerance && Math.Abs(savedHeight - height) <= Tolerance
|
||||
? null
|
||||
: $"saved size {savedWidth}x{savedHeight} ignored: AC draws at {drawWidth}x{drawHeight}";
|
||||
|
||||
/// <summary>The window collapsed below half the reference in-game area: AC's login / character-select window.</summary>
|
||||
public static bool IsLoginShrink(int width, int height, int refWidth, int refHeight) =>
|
||||
refWidth > 0 && refHeight > 0 && (long)width * height * 2L < (long)refWidth * refHeight;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,12 @@ internal sealed class AppSettings
|
|||
public int CrashRelaunchWindowMinutes { get; set; } = 5;
|
||||
public bool OverrideWindowTitle { get; set; } = true;
|
||||
|
||||
/// "Fix AC's palette memory leak": the engine changes one byte at each of the two places where
|
||||
/// the end-of-retail client keeps every custom palette forever (RynthCore.Engine PaletteLeakFix).
|
||||
/// The engine reads it once at load, so it applies from the next game start. OFF by default (a
|
||||
/// missing key is off): many clients already have the fix from a patched acclient or the original patch.
|
||||
public bool FixPaletteLeak { get; set; }
|
||||
|
||||
/// When true (default), the launcher installs RynthSuite plugin updates as soon as a
|
||||
/// check finds them. Safe mid-session: running clients keep the version they started
|
||||
/// with; the new one loads on the next AC start. Core updates always ask first.
|
||||
|
|
|
|||
646
src/RynthCore.App/VTankFileImport.cs
Normal file
646
src/RynthCore.App/VTankFileImport.cs
Normal file
|
|
@ -0,0 +1,646 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace RynthCore.App;
|
||||
|
||||
/// <summary>
|
||||
/// Copies a player's VirindiTank files into RynthAi. Used by the installer's offer
|
||||
/// (installer\RynthCore.iss, OfferVTankImport, through the --vtank-import command below) and by the
|
||||
/// launcher's Runtime > Recovery Actions > "Import VirindiTank files" button
|
||||
/// (RynthCore.App.Avalonia\MainWindow.VTankImport.cs). RynthAi loads these files as they are:
|
||||
/// *.met metas -> RynthAi\MetaFiles
|
||||
/// *.af metas as text (metaf) -> RynthAi\MetaFiles
|
||||
/// *.nav nav routes -> RynthAi\NavProfiles
|
||||
/// *.utl loot profiles -> RynthAi\LootProfiles
|
||||
/// RynthAi lists only the top level of those three folders (no per-server or per-character
|
||||
/// subfolders; its pickers re-list a folder within 3 s of a change), so that is where they go.
|
||||
/// Character settings (.usd, .cdf, .ast) are not part of this: they are imported per character
|
||||
/// in game. VTank's own per-character state files ("--<character>_<server>.met/.nav",
|
||||
/// the meta and nav each character last had loaded) are left out too: RynthAi's meta list hides
|
||||
/// "--" names anyway, and hundreds of them would bury the real navs.
|
||||
///
|
||||
/// Where VTank keeps them: the top level of its own install folder (a real install has every one
|
||||
/// of them there, no subfolders). So only the top level of each VTank folder is read, never deeper
|
||||
/// and never a whole drive. The folders are VTank's entry in Decal's plugin list (its Path value,
|
||||
/// read only), the usual install locations, or one the player picks in the launcher.
|
||||
///
|
||||
/// The copy never overwrites, never deletes, never moves: nothing in a VTank folder is changed,
|
||||
/// and a file whose name RynthAi already has is skipped, unless the player chose "keep both" in the
|
||||
/// launcher: then the VTank one is copied as "<name> (VTank)<ext>". A file identical to the
|
||||
/// one RynthAi has (or to an earlier "keep both" copy) is never copied again. A copy that arrives
|
||||
/// read-only (a read-only source) has ReadOnly cleared, or RynthAi couldn't save edits to it.
|
||||
///
|
||||
/// Command line (RynthCore.exe, run by the installer as the installing user, no window):
|
||||
/// --vtank-import scan "<RynthAi folder>" --report "<file>" counts what would be offered
|
||||
/// --vtank-import copy "<RynthAi folder>" --report "<file>" copies (never keep both); each file logged
|
||||
/// The report is "key=value" lines in UTF-8 with a BOM (paths can have any characters):
|
||||
/// a "report=" header first (which nothing reads, so a reader that keeps the BOM on line 1
|
||||
/// loses nothing), metas, navs, loot (found, by distinct name), new (not yet in RynthAi),
|
||||
/// conflicts (a different file of that name in RynthAi), same (already in RynthAi), copied,
|
||||
/// skipped, failed, and any number of "log=" lines for the setup log.
|
||||
///
|
||||
/// VirindiSense (a separate Virindi plugin, its own Decal entry and folder, usually
|
||||
/// C:\Games\VirindiPlugins\VirindiSense) is not read here.
|
||||
/// </summary>
|
||||
public static class VTankFileImport
|
||||
{
|
||||
public const string Argument = "--vtank-import";
|
||||
|
||||
/// <summary>The report must be a new file of this name shape (a stray path can't be overwritten).</summary>
|
||||
public const string ReportPrefix = "rynthcore-vtank-import";
|
||||
|
||||
/// <summary>VTank's plugin entry in Decal's list (HKLM\SOFTWARE\Decal\Plugins\{...}, 32-bit view).</summary>
|
||||
public const string VTankPluginGuid = "{642F1F48-16BE-48BF-B1D4-286652C4533E}";
|
||||
public const string VTankPluginObject = "uTank2.PluginCore";
|
||||
|
||||
/// <summary>Upper bound per VTank folder per extension (a real one has a few hundred to a thousand).</summary>
|
||||
public const int MaxFilesPerKind = 20000;
|
||||
|
||||
/// <summary>The name a "keep both" copy gets: "<name> (VTank)<ext>", then "(VTank 2)" ...</summary>
|
||||
public const string KeepBothTag = "VTank";
|
||||
private const int MaxKeepBothNumber = 999;
|
||||
|
||||
/// <summary>VTank's per-character state files start with this ("--<character>_<server>.met").</summary>
|
||||
public const string VTankStatePrefix = "--";
|
||||
|
||||
public enum Kind { Meta, Nav, Loot }
|
||||
|
||||
/// <summary>What to do with a VTank file whose name RynthAi already has (a different file).</summary>
|
||||
public enum ConflictMode
|
||||
{
|
||||
/// <summary>Leave it: RynthAi's file stays, the VTank one is not copied (the installer's only mode).</summary>
|
||||
Skip,
|
||||
/// <summary>Copy the VTank one beside it as "<name> (VTank)<ext>".</summary>
|
||||
KeepBoth,
|
||||
}
|
||||
|
||||
public static IReadOnlyList<string> Extensions(Kind k) => k switch
|
||||
{
|
||||
Kind.Meta => new[] { ".met", ".af" },
|
||||
Kind.Nav => new[] { ".nav" },
|
||||
_ => new[] { ".utl" },
|
||||
};
|
||||
|
||||
public static string RynthAiSubfolder(Kind k) => k switch { Kind.Meta => "MetaFiles", Kind.Nav => "NavProfiles", _ => "LootProfiles" };
|
||||
public static readonly Kind[] AllKinds = { Kind.Meta, Kind.Nav, Kind.Loot };
|
||||
|
||||
/// <summary>The kind for a file name, by exact extension (any case); null when it isn't imported.</summary>
|
||||
public static Kind? KindOf(string fileName)
|
||||
{
|
||||
string ext = Path.GetExtension(fileName);
|
||||
foreach (Kind k in AllKinds)
|
||||
if (Extensions(k).Any(e => string.Equals(e, ext, StringComparison.OrdinalIgnoreCase))) return k;
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>VTank's own per-character state ("--name_server.met"), never imported.</summary>
|
||||
public static bool IsVTankStateFile(string fileName) =>
|
||||
Path.GetFileName(fileName).StartsWith(VTankStatePrefix, StringComparison.Ordinal);
|
||||
|
||||
public enum State
|
||||
{
|
||||
/// <summary>Not in RynthAi yet: copied.</summary>
|
||||
New,
|
||||
/// <summary>RynthAi has a different file of this name: skipped, or copied beside it with "keep both".</summary>
|
||||
AlreadyInRynthAi,
|
||||
/// <summary>RynthAi already has this very file (same bytes, same name or an earlier "keep both" copy): left alone.</summary>
|
||||
SameInRynthAi,
|
||||
/// <summary>Another VTank folder had the same name first: that one is the one offered.</summary>
|
||||
DuplicateName,
|
||||
}
|
||||
|
||||
public sealed record FoundFile(Kind Kind, string Source, string Destination, State State);
|
||||
|
||||
public sealed class ScanResult
|
||||
{
|
||||
public List<string> Roots { get; } = new();
|
||||
public List<FoundFile> Files { get; } = new();
|
||||
public List<string> Log { get; } = new();
|
||||
|
||||
/// <summary>VTank's per-character state files seen and left out.</summary>
|
||||
public int StateFilesLeftOut { get; set; }
|
||||
|
||||
/// <summary>Distinct names of this kind found (duplicates across VTank folders counted once).</summary>
|
||||
public int Count(Kind k) => Files.Count(f => f.Kind == k && f.State != State.DuplicateName);
|
||||
public int Count(Kind k, State s) => Files.Count(f => f.Kind == k && f.State == s);
|
||||
public int CountState(State s) => Files.Count(f => f.State == s);
|
||||
public int NewCount => CountState(State.New);
|
||||
public int ConflictCount => CountState(State.AlreadyInRynthAi);
|
||||
public int SameCount => CountState(State.SameInRynthAi);
|
||||
public int TotalFound => Files.Count(f => f.State != State.DuplicateName);
|
||||
}
|
||||
|
||||
public sealed class CopyResult
|
||||
{
|
||||
/// <summary>Copied, under their own name or (keep both) a "(VTank)" one.</summary>
|
||||
public int Copied;
|
||||
/// <summary>Of <see cref="Copied"/>, those copied beside a different file of the same name.</summary>
|
||||
public int KeptBoth;
|
||||
/// <summary>Not copied: RynthAi has a different file of that name, or another VTank folder had it first.</summary>
|
||||
public int Skipped;
|
||||
/// <summary>Not copied: RynthAi already has this very file.</summary>
|
||||
public int AlreadyThere;
|
||||
public int Failed;
|
||||
public List<string> Log { get; } = new();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------- folders
|
||||
|
||||
/// <summary>
|
||||
/// VTank folders from Decal's plugin entries (guid, Object value, Path value): the entry with
|
||||
/// VTank's GUID or object name. Returns each Path that is an absolute folder path.
|
||||
/// </summary>
|
||||
public static List<string> VTankPathsFromPluginEntries(IEnumerable<(string Guid, string? Object, string? Path)> entries)
|
||||
{
|
||||
var list = new List<string>();
|
||||
foreach (var (guid, obj, path) in entries)
|
||||
{
|
||||
bool isVTank = string.Equals(guid?.Trim(), VTankPluginGuid, StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(obj?.Trim(), VTankPluginObject, StringComparison.OrdinalIgnoreCase);
|
||||
if (!isVTank || string.IsNullOrWhiteSpace(path)) continue;
|
||||
string p = path.Trim().Trim('"');
|
||||
if (!IsAbsoluteFolderPath(p)) continue;
|
||||
list.Add(p);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Every place to look, in order: Decal's entry first, then the usual install locations.
|
||||
/// Duplicates (any case, trailing slash) once. Existence is checked by <see cref="Find"/>.
|
||||
/// </summary>
|
||||
public static List<string> CandidateRoots(IEnumerable<string> fromDecal, string? documents, string? localAppData,
|
||||
string? programFilesX86, string? programFiles)
|
||||
{
|
||||
var all = new List<string>(fromDecal);
|
||||
all.Add(@"C:\Games\VirindiPlugins\VirindiTank");
|
||||
if (!string.IsNullOrEmpty(documents))
|
||||
{
|
||||
all.Add(Path.Combine(documents, "VirindiPlugins", "VirindiTank"));
|
||||
all.Add(Path.Combine(documents, "Decal", "VirindiPlugins", "VirindiTank"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(localAppData)) all.Add(Path.Combine(localAppData, "VirindiPlugins", "VirindiTank"));
|
||||
if (!string.IsNullOrEmpty(programFilesX86)) all.Add(Path.Combine(programFilesX86, "VirindiPlugins", "VirindiTank"));
|
||||
if (!string.IsNullOrEmpty(programFiles)) all.Add(Path.Combine(programFiles, "VirindiPlugins", "VirindiTank"));
|
||||
|
||||
var seen = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
||||
var result = new List<string>();
|
||||
foreach (string r in all)
|
||||
{
|
||||
if (!IsAbsoluteFolderPath(r)) continue;
|
||||
string norm;
|
||||
try { norm = Path.TrimEndingDirectorySeparator(Path.GetFullPath(r)); } catch { continue; }
|
||||
if (seen.Add(norm)) result.Add(norm);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>This PC's folders: Decal's VTank entry (read only, both registry views a 32-bit Decal uses) + the usual ones.</summary>
|
||||
public static List<string> DefaultRoots()
|
||||
{
|
||||
var entries = new List<(string, string?, string?)>();
|
||||
ReadPluginEntries(RegistryHive.LocalMachine, RegistryView.Registry32, @"SOFTWARE\Decal\Plugins", entries);
|
||||
// A per-user (VirtualStore) copy of Decal's list, which a non-elevated client reads instead.
|
||||
ReadPluginEntries(RegistryHive.CurrentUser, RegistryView.Default,
|
||||
@"Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\Decal\Plugins", entries);
|
||||
return CandidateRoots(VTankPathsFromPluginEntries(entries),
|
||||
SafeFolder(Environment.SpecialFolder.MyDocuments),
|
||||
SafeFolder(Environment.SpecialFolder.LocalApplicationData),
|
||||
SafeFolder(Environment.SpecialFolder.ProgramFilesX86),
|
||||
SafeFolder(Environment.SpecialFolder.ProgramFiles));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A folder the player picked: itself when it has VTank files at the top level, else its
|
||||
/// VirindiTank or VirindiPlugins\VirindiTank subfolder when that has them (the player picked the
|
||||
/// Virindi folder above it), else itself.
|
||||
/// </summary>
|
||||
public static string ResolvePickedFolder(string picked)
|
||||
{
|
||||
string p;
|
||||
try { p = Path.TrimEndingDirectorySeparator(Path.GetFullPath(picked)); } catch { return picked; }
|
||||
if (HasImportableFiles(p)) return p;
|
||||
foreach (string sub in new[] { Path.Combine(p, "VirindiTank"), Path.Combine(p, "VirindiPlugins", "VirindiTank") })
|
||||
if (HasImportableFiles(sub)) return sub;
|
||||
return p;
|
||||
}
|
||||
|
||||
/// <summary>True when the top level of <paramref name="folder"/> has a file this import copies.</summary>
|
||||
public static bool HasImportableFiles(string folder)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(folder)) return false;
|
||||
return Directory.EnumerateFiles(folder, "*", SearchOption.TopDirectoryOnly)
|
||||
.Any(f => KindOf(f) != null && !IsVTankStateFile(f));
|
||||
}
|
||||
catch { return false; }
|
||||
}
|
||||
|
||||
private static void ReadPluginEntries(RegistryHive hive, RegistryView view, string subKey, List<(string, string?, string?)> into)
|
||||
{
|
||||
try
|
||||
{
|
||||
using RegistryKey root = RegistryKey.OpenBaseKey(hive, view);
|
||||
using RegistryKey? plugins = root.OpenSubKey(subKey, writable: false);
|
||||
if (plugins == null) return;
|
||||
foreach (string name in plugins.GetSubKeyNames())
|
||||
{
|
||||
try
|
||||
{
|
||||
using RegistryKey? k = plugins.OpenSubKey(name, writable: false);
|
||||
if (k == null) continue;
|
||||
into.Add((name, k.GetValue("Object") as string, k.GetValue("Path") as string));
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private static string? SafeFolder(Environment.SpecialFolder f)
|
||||
{
|
||||
try { string s = Environment.GetFolderPath(f); return string.IsNullOrEmpty(s) ? null : s; } catch { return null; }
|
||||
}
|
||||
|
||||
private static bool IsAbsoluteFolderPath(string p)
|
||||
{
|
||||
try { return !string.IsNullOrWhiteSpace(p) && Path.IsPathFullyQualified(p) && p.IndexOfAny(Path.GetInvalidPathChars()) < 0; }
|
||||
catch { return false; }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------- scan + copy
|
||||
|
||||
/// <summary>
|
||||
/// The .met/.af/.nav/.utl files at the top level of each existing root (exact extension: "*.met"
|
||||
/// alone would also match ".meta" through Windows' short names), VTank's "--" state files left
|
||||
/// out. A root that is the RynthAi folder or inside it is never read. Changes nothing.
|
||||
/// </summary>
|
||||
public static ScanResult Find(IEnumerable<string> roots, string rynthAiFolder)
|
||||
{
|
||||
var result = new ScanResult();
|
||||
string dest = Path.TrimEndingDirectorySeparator(Path.GetFullPath(rynthAiFolder));
|
||||
var claimed = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
||||
var seenRoots = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
||||
foreach (string root in roots)
|
||||
{
|
||||
string r;
|
||||
try { r = Path.TrimEndingDirectorySeparator(Path.GetFullPath(root)); } catch { continue; }
|
||||
if (!Directory.Exists(r) || !seenRoots.Add(r)) continue;
|
||||
if (IsSameOrInside(r, dest))
|
||||
{
|
||||
result.Log.Add($"VTank import: {r} is inside RynthAi's folder - not read.");
|
||||
continue;
|
||||
}
|
||||
result.Roots.Add(r);
|
||||
int stateFiles = 0;
|
||||
foreach (Kind k in AllKinds)
|
||||
{
|
||||
foreach (string ext in Extensions(k))
|
||||
{
|
||||
int n = 0;
|
||||
List<string> files;
|
||||
try
|
||||
{
|
||||
files = Directory.EnumerateFiles(r, "*" + ext, SearchOption.TopDirectoryOnly)
|
||||
.Where(f => string.Equals(Path.GetExtension(f), ext, StringComparison.OrdinalIgnoreCase))
|
||||
.OrderBy(f => f, StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.Log.Add($"VTank import: cannot read {r} ({ext}): {ex.Message}");
|
||||
continue;
|
||||
}
|
||||
foreach (string src in files)
|
||||
{
|
||||
if (IsVTankStateFile(src)) { stateFiles++; continue; }
|
||||
if (++n > MaxFilesPerKind)
|
||||
{
|
||||
result.Log.Add($"VTank import: more than {MaxFilesPerKind} {ext} files in {r} - the rest left out.");
|
||||
break;
|
||||
}
|
||||
string to = Path.Combine(dest, RynthAiSubfolder(k), Path.GetFileName(src));
|
||||
if (!claimed.Add(to))
|
||||
{
|
||||
result.Files.Add(new FoundFile(k, src, to, State.DuplicateName));
|
||||
continue;
|
||||
}
|
||||
if (!File.Exists(to))
|
||||
{
|
||||
result.Files.Add(new FoundFile(k, src, to, State.New));
|
||||
continue;
|
||||
}
|
||||
// RynthAi has that name. The same file (or an earlier "keep both" copy of it) = nothing to do.
|
||||
string? same = SameFile(src, to) ? to : FindKeptCopy(src, to);
|
||||
result.Files.Add(same != null
|
||||
? new FoundFile(k, src, same, State.SameInRynthAi)
|
||||
: new FoundFile(k, src, to, State.AlreadyInRynthAi));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (stateFiles > 0)
|
||||
{
|
||||
result.StateFilesLeftOut += stateFiles;
|
||||
result.Log.Add($"VTank import: {stateFiles} VirindiTank character state file(s) (\"--\" names) in {r} left out.");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>"<dir>\<stem> (VTank)<ext>" for n = 1, "(VTank n)" after.</summary>
|
||||
public static string KeepBothName(string destination, int n)
|
||||
{
|
||||
string dir = Path.GetDirectoryName(destination) ?? "";
|
||||
string stem = Path.GetFileNameWithoutExtension(destination);
|
||||
string ext = Path.GetExtension(destination);
|
||||
string tag = n <= 1 ? $" ({KeepBothTag})" : $" ({KeepBothTag} {n})";
|
||||
return Path.Combine(dir, stem + tag + ext);
|
||||
}
|
||||
|
||||
/// <summary>The first free "keep both" name for <paramref name="destination"/>; null after 999 tries.</summary>
|
||||
public static string? FreeKeepBothName(string destination, Func<string, bool> taken)
|
||||
{
|
||||
for (int n = 1; n <= MaxKeepBothNumber; n++)
|
||||
{
|
||||
string c = KeepBothName(destination, n);
|
||||
if (!taken(c)) return c;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>An existing "keep both" copy of <paramref name="source"/> beside <paramref name="destination"/>, if any.</summary>
|
||||
private static string? FindKeptCopy(string source, string destination)
|
||||
{
|
||||
for (int n = 1; n <= MaxKeepBothNumber; n++)
|
||||
{
|
||||
string c = KeepBothName(destination, n);
|
||||
if (!File.Exists(c)) return null;
|
||||
if (SameFile(source, c)) return c;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>Same length and bytes. False when either can't be read.</summary>
|
||||
public static bool SameFile(string a, string b)
|
||||
{
|
||||
try
|
||||
{
|
||||
var fa = new FileInfo(a);
|
||||
var fb = new FileInfo(b);
|
||||
if (!fa.Exists || !fb.Exists || fa.Length != fb.Length) return false;
|
||||
using var sa = new FileStream(a, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
|
||||
using var sb = new FileStream(b, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
|
||||
var ba = new byte[81920];
|
||||
var bb = new byte[81920];
|
||||
while (true)
|
||||
{
|
||||
int ra = sa.ReadAtLeast(ba, ba.Length, throwOnEndOfStream: false);
|
||||
int rb = sb.ReadAtLeast(bb, bb.Length, throwOnEndOfStream: false);
|
||||
if (ra != rb) return false;
|
||||
if (ra == 0) return true;
|
||||
if (!ba.AsSpan(0, ra).SequenceEqual(bb.AsSpan(0, rb))) return false;
|
||||
}
|
||||
}
|
||||
catch { return false; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies the <see cref="State.New"/> files, and with <see cref="ConflictMode.KeepBoth"/> the
|
||||
/// <see cref="State.AlreadyInRynthAi"/> ones under a "(VTank)" name. Never overwrites; the sources are only read.
|
||||
/// </summary>
|
||||
public static CopyResult Copy(ScanResult scan, ConflictMode mode = ConflictMode.Skip)
|
||||
{
|
||||
var result = new CopyResult();
|
||||
var usedThisRun = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
||||
foreach (FoundFile f in scan.Files)
|
||||
{
|
||||
string target = f.Destination;
|
||||
bool keptBoth = false;
|
||||
switch (f.State)
|
||||
{
|
||||
case State.SameInRynthAi:
|
||||
result.AlreadyThere++;
|
||||
result.Log.Add($"VTank import: {f.Source} - already in RynthAi as {f.Destination}");
|
||||
continue;
|
||||
case State.DuplicateName:
|
||||
result.Skipped++;
|
||||
result.Log.Add($"VTank import: skipped {f.Source} - another VirindiTank folder has a file of the same name");
|
||||
continue;
|
||||
case State.AlreadyInRynthAi when mode == ConflictMode.Skip:
|
||||
result.Skipped++;
|
||||
result.Log.Add($"VTank import: skipped {f.Source} - RynthAi already has a different {f.Destination}");
|
||||
continue;
|
||||
case State.AlreadyInRynthAi:
|
||||
string? free = FreeKeepBothName(f.Destination, p => usedThisRun.Contains(p) || File.Exists(p));
|
||||
if (free == null)
|
||||
{
|
||||
result.Skipped++;
|
||||
result.Log.Add($"VTank import: skipped {f.Source} - no free \"({KeepBothTag})\" name beside {f.Destination}");
|
||||
continue;
|
||||
}
|
||||
target = free;
|
||||
keptBoth = true;
|
||||
break;
|
||||
}
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(target)!);
|
||||
if (File.Exists(target))
|
||||
{
|
||||
result.Skipped++;
|
||||
result.Log.Add($"VTank import: skipped {f.Source} - RynthAi already has {target}");
|
||||
continue;
|
||||
}
|
||||
File.Copy(f.Source, target, overwrite: false);
|
||||
usedThisRun.Add(target);
|
||||
try
|
||||
{
|
||||
var a = File.GetAttributes(target);
|
||||
if ((a & FileAttributes.ReadOnly) != 0) File.SetAttributes(target, a & ~FileAttributes.ReadOnly);
|
||||
}
|
||||
catch { }
|
||||
result.Copied++;
|
||||
if (keptBoth) result.KeptBoth++;
|
||||
result.Log.Add(keptBoth
|
||||
? $"VTank import: copied {f.Source} -> {target} (RynthAi's own {Path.GetFileName(f.Destination)} kept)"
|
||||
: $"VTank import: copied {f.Source} -> {target}");
|
||||
}
|
||||
catch (IOException) when (File.Exists(target))
|
||||
{
|
||||
// Appeared between the check and the copy: still never replaced.
|
||||
result.Skipped++;
|
||||
result.Log.Add($"VTank import: skipped {f.Source} - RynthAi already has {target}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.Failed++;
|
||||
result.Log.Add($"VTank import: could not copy {f.Source}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private static bool IsSameOrInside(string path, string folder)
|
||||
{
|
||||
if (string.Equals(path, folder, StringComparison.OrdinalIgnoreCase)) return true;
|
||||
return path.StartsWith(folder + Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------- plain words (launcher)
|
||||
|
||||
private static string Plural(int n, string one, string many) => n == 1 ? $"1 {one}" : $"{n} {many}";
|
||||
|
||||
private static string KindWords(Kind k, int n) => k switch
|
||||
{
|
||||
Kind.Meta => Plural(n, "meta", "metas"),
|
||||
Kind.Nav => Plural(n, "nav route", "nav routes"),
|
||||
_ => Plural(n, "loot profile", "loot profiles"),
|
||||
};
|
||||
|
||||
/// <summary>What the scan found and what a copy would do, for the launcher's question.</summary>
|
||||
public static string DescribePlan(ScanResult scan)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append(scan.Roots.Count == 1 ? $"VirindiTank folder: {scan.Roots[0]}" : "VirindiTank folders: " + string.Join(", ", scan.Roots));
|
||||
sb.Append("\n\nFound:");
|
||||
foreach (Kind k in AllKinds)
|
||||
{
|
||||
int all = scan.Count(k);
|
||||
int fresh = scan.Count(k, State.New);
|
||||
sb.Append($"\n {KindWords(k, all)}" + (all > 0 ? $" ({fresh} new) -> {RynthAiSubfolder(k)}" : ""));
|
||||
}
|
||||
sb.Append("\n");
|
||||
sb.Append($"\n{Plural(scan.NewCount, "file is", "files are")} new to RynthAi and will be copied.");
|
||||
if (scan.SameCount > 0)
|
||||
sb.Append($"\n{Plural(scan.SameCount, "file is", "files are")} already in RynthAi (the same file), so left alone.");
|
||||
if (scan.ConflictCount > 0)
|
||||
sb.Append($"\n{Plural(scan.ConflictCount, "file has", "files have")} the same name as a different file in RynthAi. " +
|
||||
$"Your RynthAi file is never replaced: \"Copy\" skips these; \"Copy, keep both\" copies them as " +
|
||||
$"\"<name> ({KeepBothTag})\".");
|
||||
if (scan.StateFilesLeftOut > 0)
|
||||
sb.Append($"\n{Plural(scan.StateFilesLeftOut, "VirindiTank character file", "VirindiTank character files")} " +
|
||||
"(names starting with \"--\", the meta and nav each character last had loaded) are left out.");
|
||||
sb.Append("\n\nNothing in your VirindiTank folder is changed. Character settings (.usd) are imported per character in game.");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>The result in plain words, for the launcher's closing message.</summary>
|
||||
public static string DescribeResult(CopyResult c, string rynthAiFolder)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append(c.Copied == 0 ? "No files copied." : $"Copied {Plural(c.Copied, "file", "files")} to {rynthAiFolder}.");
|
||||
if (c.KeptBoth > 0)
|
||||
sb.Append($"\n{Plural(c.KeptBoth, "of them was", "of them were")} copied as \"<name> ({KeepBothTag})\" beside your own file of the same name.");
|
||||
if (c.AlreadyThere > 0)
|
||||
sb.Append($"\n{Plural(c.AlreadyThere, "file was", "files were")} already in RynthAi.");
|
||||
if (c.Skipped > 0)
|
||||
sb.Append($"\n{Plural(c.Skipped, "file was", "files were")} skipped: RynthAi already has a different file of that name (yours was kept).");
|
||||
if (c.Failed > 0)
|
||||
sb.Append($"\n{Plural(c.Failed, "file", "files")} could not be copied (launcher.log says why).");
|
||||
if (c.Copied > 0)
|
||||
sb.Append("\n\nThey show in RynthAi's Meta, Nav and Loot lists within a few seconds, also in a game that is running.");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------- command line
|
||||
|
||||
public static bool TryParseArguments(string[] args, out bool copy, out string rynthAiFolder, out string reportPath)
|
||||
{
|
||||
copy = false; rynthAiFolder = ""; reportPath = "";
|
||||
int i = Array.FindIndex(args, a => string.Equals(a, Argument, StringComparison.OrdinalIgnoreCase));
|
||||
if (i < 0 || i + 2 >= args.Length) return false;
|
||||
string mode = args[i + 1];
|
||||
if (string.Equals(mode, "scan", StringComparison.OrdinalIgnoreCase)) copy = false;
|
||||
else if (string.Equals(mode, "copy", StringComparison.OrdinalIgnoreCase)) copy = true;
|
||||
else return false;
|
||||
string folder = args[i + 2].Trim().Trim('"');
|
||||
if (folder.StartsWith("--", StringComparison.Ordinal) || !IsAbsoluteFolderPath(folder)) return false;
|
||||
int r = Array.FindIndex(args, a => string.Equals(a, "--report", StringComparison.OrdinalIgnoreCase));
|
||||
if (r < 0 || r + 1 >= args.Length) return false;
|
||||
string report = args[r + 1].Trim().Trim('"');
|
||||
if (!IsAbsoluteFolderPath(report)) return false;
|
||||
string name = Path.GetFileName(report);
|
||||
if (!name.StartsWith(ReportPrefix, StringComparison.OrdinalIgnoreCase) || !name.EndsWith(".txt", StringComparison.OrdinalIgnoreCase))
|
||||
return false;
|
||||
rynthAiFolder = folder;
|
||||
reportPath = report;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static string BuildArguments(bool copy, string rynthAiFolder, string reportPath) =>
|
||||
$"{Argument} {(copy ? "copy" : "scan")} \"{rynthAiFolder}\" --report \"{reportPath}\"";
|
||||
|
||||
public static List<string> ReportLines(ScanResult scan, CopyResult? copy)
|
||||
{
|
||||
var lines = new List<string>
|
||||
{
|
||||
// First line carries nothing the installer reads: a reader that keeps the BOM on line 1 loses nothing.
|
||||
"report=rynthcore-vtank-import 2",
|
||||
$"metas={scan.Count(Kind.Meta)}",
|
||||
$"navs={scan.Count(Kind.Nav)}",
|
||||
$"loot={scan.Count(Kind.Loot)}",
|
||||
$"new={scan.NewCount}",
|
||||
$"conflicts={scan.ConflictCount}",
|
||||
$"same={scan.SameCount}",
|
||||
};
|
||||
if (copy != null)
|
||||
{
|
||||
lines.Add($"copied={copy.Copied}");
|
||||
lines.Add($"skipped={copy.Skipped}");
|
||||
lines.Add($"already={copy.AlreadyThere}");
|
||||
lines.Add($"failed={copy.Failed}");
|
||||
}
|
||||
foreach (string r in scan.Roots) lines.Add($"log=VTank import: looked in {r}");
|
||||
if (scan.Roots.Count == 0) lines.Add("log=VTank import: no VirindiTank folder found.");
|
||||
lines.AddRange(scan.Log.Select(OneLine));
|
||||
if (copy != null) lines.AddRange(copy.Log.Select(OneLine));
|
||||
return lines;
|
||||
}
|
||||
|
||||
private static string OneLine(string s) => "log=" + s.Replace('\r', ' ').Replace('\n', ' ');
|
||||
|
||||
/// <summary>
|
||||
/// The command. Exit 0 = done (scan, or a copy with no failures), 1 = a copy failed or the
|
||||
/// report couldn't be written, 2 = malformed command line or no RynthAi folder (nothing done).
|
||||
/// <paramref name="summary"/> is one line for launcher.log. The command never keeps both.
|
||||
/// </summary>
|
||||
public static int Run(string[] args, IEnumerable<string>? roots, out string summary)
|
||||
{
|
||||
if (!TryParseArguments(args, out bool copy, out string folder, out string report))
|
||||
{
|
||||
summary = "malformed command line; nothing done.";
|
||||
return 2;
|
||||
}
|
||||
if (!Directory.Exists(folder))
|
||||
{
|
||||
summary = $"no RynthAi folder at {folder}; nothing done.";
|
||||
return 2;
|
||||
}
|
||||
if (File.Exists(report))
|
||||
{
|
||||
summary = $"the report file {report} already exists; nothing done.";
|
||||
return 2;
|
||||
}
|
||||
ScanResult scan = Find(roots ?? DefaultRoots(), folder);
|
||||
CopyResult? copied = copy ? Copy(scan, ConflictMode.Skip) : null;
|
||||
summary = copied == null
|
||||
? $"scan: {scan.Count(Kind.Meta)} metas, {scan.Count(Kind.Nav)} navs, {scan.Count(Kind.Loot)} loot, {scan.NewCount} new, " +
|
||||
$"{scan.ConflictCount} name conflicts, {scan.SameCount} already there, in {scan.Roots.Count} folder(s)."
|
||||
: $"copy: {copied.Copied} copied, {copied.Skipped} skipped, {copied.AlreadyThere} already there, {copied.Failed} failed.";
|
||||
try
|
||||
{
|
||||
File.WriteAllLines(report, ReportLines(scan, copied), new UTF8Encoding(encoderShouldEmitUTF8Identifier: true));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
summary += $" Report not written: {ex.Message}";
|
||||
return 1;
|
||||
}
|
||||
return copied is { Failed: > 0 } ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -272,6 +272,16 @@ internal static class AcMainThreadQueue
|
|||
_ => false,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Kept through a world transition (held while it lasts, then run, not dropped): the teardown
|
||||
/// group, and a raise (Train). A raise is the player's own click on a Skills window (the engine's
|
||||
/// Skills panel, a plugin's through TrainingApi), a CM_Train game action that reads and changes no
|
||||
/// world object, and ACE takes it whenever it lands (Player.HandleActionRaise* / TrainSkill check
|
||||
/// only the XP or the credits). Dropped, a raise clicked in portal space was lost with no word to
|
||||
/// the player (2026-11-20); the panels now say it waits for the landing.
|
||||
/// </summary>
|
||||
private static bool KeptThroughTransition(in Entry e) => IsTeardown(e) || e.Kind == ActionKind.Train;
|
||||
|
||||
// World-transition drops: counted, and folded into the rate-limited stale summary line.
|
||||
private static long _transitionDropped;
|
||||
public static long TransitionDroppedCount => Interlocked.Read(ref _transitionDropped);
|
||||
|
|
@ -734,7 +744,7 @@ internal static class AcMainThreadQueue
|
|||
if (gestureSafeOnly && !RunsDuringGesture(e.Kind)) break;
|
||||
_ring.Pop();
|
||||
long age = runAt - e.At;
|
||||
if (PlayerLifecycleLog.DecideQueued(runAt, e.At, IsTeardown(e)) == WorldTransitionState.Verdict.Drop)
|
||||
if (PlayerLifecycleLog.DecideQueued(runAt, e.At, KeptThroughTransition(e)) == WorldTransitionState.Verdict.Drop)
|
||||
{
|
||||
NoteTransitionDrop(Describe(e), age);
|
||||
if (e.Kind == ActionKind.SalvageDirect) TakeSalvageDirectList(e.B); // free its list slot
|
||||
|
|
|
|||
|
|
@ -39,6 +39,13 @@
|
|||
// (or `/rc acmouse watch` for 20 s of changes in chat) names what AC has
|
||||
// under the cursor; Identify is the one place that decides.
|
||||
//
|
||||
// Portal space (2026-11-20): gmSmartBoxUI::UseTime (0x004D7A90) hides the
|
||||
// SmartBox and shows its child 0x10000436, a 3D viewport holding the portal
|
||||
// swirl (gmSmartBoxUI PostInit 0x004D77C7), over the 3D view. That element
|
||||
// counts as the world too (AcMouseOverRules.ElementIdPortalSpaceView): as an
|
||||
// AC window it made every window drawn under AC's UI click-through for the
|
||||
// whole portal (ImGuiPanelHost: underUi + AcWindow = NoInputs).
|
||||
//
|
||||
// Threads: AC's main thread only (EndScene and the UI detours run there);
|
||||
// anything else gets Unknown. Every read goes through the memory probe first.
|
||||
// ============================================================================
|
||||
|
|
@ -102,7 +109,7 @@ internal static unsafe class AcMouseOver
|
|||
if (ClientObjectHooks.IsReadableSpan(s.Element + ElementIdOffset, 4))
|
||||
s.ElementId = *(uint*)(s.Element + ElementIdOffset);
|
||||
}
|
||||
s.Target = Identify(readable, outside, s.Element, s.TypeKnown, s.Type);
|
||||
s.Target = Identify(readable, outside, s.Element, s.TypeKnown, s.Type, s.ElementId);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
@ -112,11 +119,12 @@ internal static unsafe class AcMouseOver
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// The one decision: the 3D view is gmSmartBoxUI (type 0x10000014) or its SmartBox wrapper (0x10000030);
|
||||
/// any other element AC reports is one of its windows; nothing readable is Unknown.
|
||||
/// The one decision: the 3D view is gmSmartBoxUI (type 0x10000014) or its SmartBox wrapper (0x10000030),
|
||||
/// and in portal space the portal-space view (element 0x10000436); any other element AC reports is one
|
||||
/// of its windows; nothing readable is Unknown.
|
||||
/// </summary>
|
||||
private static AcMouseTarget Identify(bool readable, bool outside, IntPtr element, bool typeKnown, int type)
|
||||
=> AcMouseOverRules.Classify(readable, outside, (uint)element.ToInt32(), typeKnown, type);
|
||||
private static AcMouseTarget Identify(bool readable, bool outside, IntPtr element, bool typeKnown, int type, uint id)
|
||||
=> AcMouseOverRules.Classify(readable, outside, (uint)element.ToInt32(), typeKnown, type, id);
|
||||
|
||||
/// <summary>The element's UIElement type (vtable +0x98), asked once per class. Main thread.</summary>
|
||||
private static bool TryGetType(IntPtr element, out int type)
|
||||
|
|
|
|||
|
|
@ -39,23 +39,45 @@ internal static class AcMouseOverRules
|
|||
/// </summary>
|
||||
public const int UIElementTypeGmSmartBoxUI = 0x10000014;
|
||||
|
||||
/// <summary>
|
||||
/// The portal-space view: gmSmartBoxUI's child element 0x10000436, a 3D viewport
|
||||
/// (gmSmartBoxUI PostInit 0x004D77C7: GetChildRecursive(0x10000436), DynamicCast 0xD, kept at
|
||||
/// +0x678, with the portal swirl object and its light and camera added). gmSmartBoxUI::UseTime
|
||||
/// (0x004D7A90) shows it (vtable +0x18 with 1) and hides the SmartBox while a teleport is in
|
||||
/// progress (its states 2..5) and hides it again after. It covers the 3D view then, so in
|
||||
/// portal space it is what AC has under the cursor where the world normally is: it stands in
|
||||
/// for the world, not for one of AC's windows. Counted as an AC window, every window drawn
|
||||
/// under AC's UI went click-through for the whole portal (2026-11-20: the DreamWeave Skills
|
||||
/// window took no clicks, scrolls or tab changes in portal space).
|
||||
/// </summary>
|
||||
public const uint ElementIdPortalSpaceView = 0x10000436;
|
||||
|
||||
/// <summary>One of the 3D view's element types.</summary>
|
||||
public static bool IsWorldType(int elementType) =>
|
||||
elementType == UIElementTypeSmartBoxWrapper || elementType == UIElementTypeGmSmartBoxUI;
|
||||
|
||||
/// <summary>
|
||||
/// The 3D view, or what stands in for it: one of its element types, or the portal-space view
|
||||
/// (by its element id, <see cref="ElementIdPortalSpaceView"/>).
|
||||
/// </summary>
|
||||
public static bool IsWorldElement(int elementType, uint elementId) =>
|
||||
IsWorldType(elementType) || elementId == ElementIdPortalSpaceView;
|
||||
|
||||
/// <summary>
|
||||
/// Classifies one read of UIElementManager. <paramref name="stateReadable"/>: the manager
|
||||
/// was known and its fields readable. <paramref name="mouseOutside"/>: its +0x2D4 flag (the
|
||||
/// cursor left the client; AC then hit-tests nothing). <paramref name="element"/>: +0x244,
|
||||
/// the raw element under the mouse. <paramref name="typeKnown"/>/<paramref name="elementType"/>:
|
||||
/// that element's GetUIElementType, when it could be read safely.
|
||||
/// that element's GetUIElementType, when it could be read safely. <paramref name="elementId"/>:
|
||||
/// its element id (+0x2E4; 0 when it couldn't be read).
|
||||
/// </summary>
|
||||
public static AcMouseTarget Classify(bool stateReadable, bool mouseOutside, uint element, bool typeKnown, int elementType)
|
||||
public static AcMouseTarget Classify(bool stateReadable, bool mouseOutside, uint element, bool typeKnown, int elementType,
|
||||
uint elementId = 0)
|
||||
{
|
||||
if (!stateReadable) return AcMouseTarget.Unknown;
|
||||
if (mouseOutside || element == 0) return AcMouseTarget.Nothing;
|
||||
if (!typeKnown) return AcMouseTarget.Unknown;
|
||||
return IsWorldType(elementType) ? AcMouseTarget.World : AcMouseTarget.AcWindow;
|
||||
return IsWorldElement(elementType, elementId) ? AcMouseTarget.World : AcMouseTarget.AcWindow;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -30,6 +30,17 @@
|
|||
// anything and the plugin's command runs on the next game tick instead
|
||||
// (AC's toolbar button and key both send it). A command no plugin takes
|
||||
// (the plugin unloaded) drops the claim and opens AC's panel after all.
|
||||
//
|
||||
// The pack showing under another panel (2026-11-22: the inventory's 3D
|
||||
// figure drawn over AC's Vitae panel, now and then):
|
||||
// closing a panel that was opened over another one (vitae over the pack)
|
||||
// from outside a UI message - RynthCore's bar or /rc panels on the game
|
||||
// tick - makes AC's container handler re-enter itself and end with its
|
||||
// window hidden, no current panel, and the pack still shown inside; the
|
||||
// next panel AC opens there shows on top of the pack, the paper doll over
|
||||
// both. Each container's current and previous panel (+0x608, +0x60C) are
|
||||
// noted before a close notice and AC's result is repaired after it
|
||||
// (PanelSwapPolicy, which has the addresses and the whole account).
|
||||
// ============================================================================
|
||||
|
||||
using System;
|
||||
|
|
@ -54,6 +65,8 @@ internal static unsafe class AcPanels
|
|||
[(0x1000004F, 8), (0x10000008, 8), (0x1000004E, 12), (0x10000033, 12), (0x10000054, 12)];
|
||||
|
||||
private const int TableOffset = 0x5FC, CountOffset = 0x604, RegionFlagsOffset = 0xA4, VisibleBit = 0x2;
|
||||
// The container's notice handler +0x10 / +0x14: the panel it shows, and the one to bring back when that closes.
|
||||
private const int CurrentOffset = 0x608, PreviousOffset = 0x60C;
|
||||
private const int MgrElements = 0x14, MgrElementCount = 0x1C, MaxRegistered = 200_000, MaxPanels = 64;
|
||||
private const int ChildCountOffset = 0x120, ChildHeadOffset = 0x124;
|
||||
|
||||
|
|
@ -137,7 +150,100 @@ internal static unsafe class AcPanels
|
|||
}
|
||||
}
|
||||
catch { /* never in AC's way */ }
|
||||
return ((delegate* unmanaged[Cdecl]<uint, int, byte>)_noticeOriginal)(id, visible);
|
||||
if ((visible & 0xFF) != 0)
|
||||
return ((delegate* unmanaged[Cdecl]<uint, int, byte>)_noticeOriginal)(id, visible);
|
||||
|
||||
// A close: note the containers AC should bring a previous panel back in, repair after (see the header).
|
||||
Span<CloseWatch> watch = stackalloc CloseWatch[Hosts.Length];
|
||||
int watching = 0;
|
||||
try { watching = WatchClose(id, watch); }
|
||||
catch { watching = 0; }
|
||||
byte result = ((delegate* unmanaged[Cdecl]<uint, int, byte>)_noticeOriginal)(id, visible);
|
||||
if (watching > 0)
|
||||
{
|
||||
try { RepairClose(id, watch[..watching]); }
|
||||
catch { /* never in AC's way */ }
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>A container whose current panel is closing and which has a previous panel to bring back.</summary>
|
||||
private readonly record struct CloseWatch(IntPtr Host, IntPtr Previous, uint PreviousId);
|
||||
|
||||
private static int _repairsLogged;
|
||||
|
||||
/// <summary>Before AC handles the close of panel <paramref name="id"/>: the containers to check after it.</summary>
|
||||
private static int WatchClose(uint id, Span<CloseWatch> into)
|
||||
{
|
||||
using var probe = MemoryProbe.BeginWalk();
|
||||
bool any = false;
|
||||
for (int h = 0; h < Hosts.Length; h++) any |= Valid(h);
|
||||
if (!any) Find();
|
||||
int n = 0;
|
||||
for (int h = 0; h < Hosts.Length && n < into.Length; h++)
|
||||
{
|
||||
if (!Valid(h)) continue;
|
||||
IntPtr host = _found[h];
|
||||
if (!ClientObjectHooks.IsReadableSpan(host, PreviousOffset + 4)) continue;
|
||||
IntPtr closing = EntryOf(host, Hosts[h].Stride, id);
|
||||
if (closing == IntPtr.Zero) continue;
|
||||
nint prev = PanelSwapPolicy.PreviousToWatch(open: false, closing, Marshal.ReadIntPtr(host, CurrentOffset),
|
||||
Marshal.ReadIntPtr(host, PreviousOffset));
|
||||
if (prev == 0) continue;
|
||||
uint prevId = IdOf(host, Hosts[h].Stride, prev);
|
||||
if (prevId == 0) continue;
|
||||
into[n++] = new CloseWatch(host, prev, prevId);
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
/// <summary>After AC handled the close of panel <paramref name="id"/>: a previous panel left shown in a hidden container is opened properly.</summary>
|
||||
private static void RepairClose(uint id, ReadOnlySpan<CloseWatch> watched)
|
||||
{
|
||||
foreach (CloseWatch w in watched)
|
||||
{
|
||||
if (!ClientObjectHooks.IsReadableSpan(w.Host, PreviousOffset + 4)) continue;
|
||||
IntPtr current = Marshal.ReadIntPtr(w.Host, CurrentOffset);
|
||||
bool shows = ClientObjectHooks.IsReadableSpan(w.Previous, RegionFlagsOffset + 4) && Shows(w.Previous);
|
||||
if (!PanelSwapPolicy.ShouldReopen(w.Previous, current, shows, Replacements.ContainsKey(w.PreviousId))) continue;
|
||||
int k = Interlocked.Increment(ref _repairsLogged);
|
||||
if (k <= 50 || k % 100 == 0)
|
||||
RynthLog.Compat($"AcPanels: closing panel {id} left panel {w.PreviousId} shown in a hidden window with no current panel " +
|
||||
$"(AC's handler re-entered itself); opened panel {w.PreviousId} again so the window shows only it (#{k}).");
|
||||
Send(w.PreviousId, open: true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>The table entry (panel element) with notice id <paramref name="id"/>, or zero.</summary>
|
||||
private static IntPtr EntryOf(IntPtr host, int stride, uint id)
|
||||
{
|
||||
if (!TryTable(host, stride, out IntPtr table, out int n)) return IntPtr.Zero;
|
||||
for (int i = 0; i < n; i++)
|
||||
if (unchecked((uint)Marshal.ReadInt32(table, i * stride + 4)) == id) return Marshal.ReadIntPtr(table, i * stride);
|
||||
return IntPtr.Zero;
|
||||
}
|
||||
|
||||
/// <summary>The notice id of table entry <paramref name="panel"/>, or 0.</summary>
|
||||
private static uint IdOf(IntPtr host, int stride, IntPtr panel)
|
||||
{
|
||||
if (panel == IntPtr.Zero || !TryTable(host, stride, out IntPtr table, out int n)) return 0;
|
||||
for (int i = 0; i < n; i++)
|
||||
if (Marshal.ReadIntPtr(table, i * stride) == panel)
|
||||
{
|
||||
uint id = unchecked((uint)Marshal.ReadInt32(table, i * stride + 4));
|
||||
return id is > 0 and <= 0xFFFF ? id : 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static bool TryTable(IntPtr host, int stride, out IntPtr table, out int n)
|
||||
{
|
||||
table = IntPtr.Zero;
|
||||
n = 0;
|
||||
if (!ClientObjectHooks.IsReadableSpan(host, CountOffset + 4)) return false;
|
||||
n = Marshal.ReadInt32(host, CountOffset);
|
||||
table = Marshal.ReadIntPtr(host, TableOffset);
|
||||
return n > 0 && n <= MaxPanels && ClientObjectHooks.IsReadableSpan(table, n * stride);
|
||||
}
|
||||
|
||||
/// <summary>Game thread: the claimed panels AC asked to open run their plugin's command.</summary>
|
||||
|
|
@ -161,9 +267,11 @@ internal static unsafe class AcPanels
|
|||
|
||||
private static unsafe void Send(uint id, bool open)
|
||||
{
|
||||
// Saved, not cleared: a repair sends from inside a notice that may itself be ours.
|
||||
bool was = _bypass;
|
||||
_bypass = true;
|
||||
try { ((delegate* unmanaged[Cdecl]<uint, int, byte>)_notice)(id, open ? 1 : 0); }
|
||||
finally { _bypass = false; }
|
||||
finally { _bypass = was; }
|
||||
_cachedMs = long.MinValue / 2;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,24 @@ internal static class LauncherSettings
|
|||
// The launcher's own default (AppSettings.AllowMultipleClients, on since 2026-10-14) until it has saved one.
|
||||
private static bool _allowMultipleClients = true;
|
||||
private static string _statusMessage = "Launcher settings not loaded.";
|
||||
// The launcher's "Fix AC's palette memory leak" (AppSettings.FixPaletteLeak): off until checked.
|
||||
private static bool _fixPaletteLeak;
|
||||
|
||||
/// <summary>The launcher's "Fix AC's palette memory leak" checkbox (PaletteLeakFix). A missing key is off.</summary>
|
||||
public static bool FixPaletteLeakEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
EnsureLoaded();
|
||||
return _fixPaletteLeak;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>appsettings.json's FixPaletteLeak: true only when it is there and true (tools\PaletteLeakFixTests).</summary>
|
||||
internal static bool ReadFixPaletteLeak(JsonElement root) =>
|
||||
root.ValueKind == JsonValueKind.Object
|
||||
&& root.TryGetProperty("FixPaletteLeak", out JsonElement v)
|
||||
&& v.ValueKind == JsonValueKind.True;
|
||||
|
||||
public static bool AllowMultipleClientsEnabled
|
||||
{
|
||||
|
|
@ -53,6 +71,7 @@ internal static class LauncherSettings
|
|||
}
|
||||
|
||||
using JsonDocument document = JsonDocument.Parse(File.ReadAllBytes(settingsPath));
|
||||
_fixPaletteLeak = ReadFixPaletteLeak(document.RootElement);
|
||||
if (!document.RootElement.TryGetProperty("AllowMultipleClients", out JsonElement property) ||
|
||||
(property.ValueKind != JsonValueKind.True && property.ValueKind != JsonValueKind.False))
|
||||
{
|
||||
|
|
|
|||
96
src/RynthCore.Engine/Compatibility/PaletteLeakFix.cs
Normal file
96
src/RynthCore.Engine/Compatibility/PaletteLeakFix.cs
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace RynthCore.Engine.Compatibility;
|
||||
|
||||
/// <summary>
|
||||
/// Fixes the end-of-retail client's palette memory leak (PaletteLeakSites has the two sites and the byte
|
||||
/// rules). Every custom palette (the colour swaps of creatures, armour and items) is 8 KB that is never
|
||||
/// freed: about 3,000 an hour on a character hunting outdoors, ~460 MB on a client up 20 hours. Found and
|
||||
/// published by eriknihlen (github.com/eriknihlen/ac-eor-palette-leak-fix, MIT); here each inc
|
||||
/// [reg+0x24] becomes test [reg+0x24], reg by changing one byte (FF -> 85), after the bytes round it
|
||||
/// are checked.
|
||||
///
|
||||
/// Off unless the launcher's "Fix AC's palette memory leak" is checked (appsettings.json
|
||||
/// FixPaletteLeak; a missing key is off, since many clients already have the fix from a patched
|
||||
/// acclient or the original patch). Read once at engine load. Off, nothing is touched. On, a site
|
||||
/// already fixed (85 xx 24) or NOP'd (90 90 90) is left as it is and counted as fixed; a site whose
|
||||
/// bytes are anything else is left alone and said once. Palettes that leaked before the fix stay
|
||||
/// leaked until the client restarts.
|
||||
/// </summary>
|
||||
internal static class PaletteLeakFix
|
||||
{
|
||||
private const uint PAGE_EXECUTE_READWRITE = 0x40;
|
||||
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
private static extern bool VirtualProtect(IntPtr lpAddress, UIntPtr dwSize, uint flNewProtect, out uint lpflOldProtect);
|
||||
[DllImport("kernel32.dll")]
|
||||
private static extern IntPtr GetCurrentProcess();
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
private static extern bool FlushInstructionCache(IntPtr hProcess, IntPtr lpBaseAddress, UIntPtr dwSize);
|
||||
|
||||
public static string StatusMessage { get; private set; } = "Not applied yet.";
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
if (!LauncherSettings.FixPaletteLeakEnabled)
|
||||
{
|
||||
StatusMessage = "off (the launcher's \"Fix AC's palette memory leak\" is unchecked).";
|
||||
return;
|
||||
}
|
||||
|
||||
int patched = 0, fixedBefore = 0, leftAlone = 0;
|
||||
foreach (PaletteLeakSites.Site s in PaletteLeakSites.Sites)
|
||||
{
|
||||
byte[]? bytes = ReadBytes(s.Start, s.Context.Length);
|
||||
PaletteLeakSites.SiteState state = bytes == null
|
||||
? PaletteLeakSites.SiteState.Unknown
|
||||
: PaletteLeakSites.Classify(s, bytes);
|
||||
switch (state)
|
||||
{
|
||||
case PaletteLeakSites.SiteState.AlreadyFixed:
|
||||
case PaletteLeakSites.SiteState.AlreadyNopped:
|
||||
fixedBefore++;
|
||||
RynthLog.Compat($"Compat: palette leak fix - {s.Name} @ 0x{s.Va:X8} already fixed " +
|
||||
$"({(state == PaletteLeakSites.SiteState.AlreadyNopped ? "NOP'd" : "test")}); left as it is.");
|
||||
break;
|
||||
case PaletteLeakSites.SiteState.Unknown:
|
||||
leftAlone++;
|
||||
RynthLog.Compat($"Compat: palette leak fix - {s.Name} @ 0x{s.Va:X8} does not look like the end-of-retail client; left alone.");
|
||||
break;
|
||||
default:
|
||||
if (WriteByte(s.Va, PaletteLeakSites.FixedByte)) patched++;
|
||||
else leftAlone++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
StatusMessage = PaletteLeakSites.Summary(patched, fixedBefore, leftAlone);
|
||||
RynthLog.Info(StatusMessage);
|
||||
}
|
||||
|
||||
private static byte[]? ReadBytes(int start, int count)
|
||||
{
|
||||
try
|
||||
{
|
||||
var b = new byte[count];
|
||||
for (int i = 0; i < count; i++) b[i] = Marshal.ReadByte(new IntPtr(start + i));
|
||||
return b;
|
||||
}
|
||||
catch { return null; }
|
||||
}
|
||||
|
||||
private static bool WriteByte(int va, byte value)
|
||||
{
|
||||
IntPtr at = new(va);
|
||||
if (!VirtualProtect(at, (UIntPtr)1u, PAGE_EXECUTE_READWRITE, out uint old))
|
||||
{
|
||||
RynthLog.Compat($"Compat: palette leak fix - VirtualProtect 0x{va:X8} failed (error {Marshal.GetLastWin32Error()}); left alone.");
|
||||
return false;
|
||||
}
|
||||
try { Marshal.WriteByte(at, value); }
|
||||
finally { VirtualProtect(at, (UIntPtr)1u, old, out _); }
|
||||
FlushInstructionCache(GetCurrentProcess(), at, (UIntPtr)1u);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
82
src/RynthCore.Engine/Compatibility/PaletteLeakSites.cs
Normal file
82
src/RynthCore.Engine/Compatibility/PaletteLeakSites.cs
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
using System;
|
||||
|
||||
namespace RynthCore.Engine.Compatibility;
|
||||
|
||||
/// <summary>
|
||||
/// The two places in the end-of-retail client that PaletteLeakFix changes, and how the bytes there are
|
||||
/// read. Pure (no memory access), so tools\PaletteLeakFixTests can check it on fake bytes.
|
||||
///
|
||||
/// Palette::makeModifiedPalette adds a reference (inc [reg+0x24]) to a palette whose count DBObj's
|
||||
/// constructor already set to 1, so every custom palette starts at 2 and is never freed. Found and
|
||||
/// published by eriknihlen (github.com/eriknihlen/ac-eor-palette-leak-fix, MIT), who NOPs both
|
||||
/// increments. RynthCore changes ONE byte a site, FF -> 85 (inc -> test [reg+0x24], reg): a one-byte
|
||||
/// write is atomic, and the flags it sets are never read (a ret follows one site, a call the other).
|
||||
/// 0x0053EFFE Palette::makeModifiedPalette() FF 40 24 inc [eax+0x24]
|
||||
/// 0x0053F19C Palette::makeModifiedPalette(DataID, Subpalette*) FF 46 24 inc [esi+0x24]
|
||||
/// </summary>
|
||||
internal static class PaletteLeakSites
|
||||
{
|
||||
public const byte StockByte = 0xFF, FixedByte = 0x85, Nop = 0x90;
|
||||
|
||||
/// <summary>What the bytes at a site say.</summary>
|
||||
public enum SiteState
|
||||
{
|
||||
/// <summary>The stock inc: the leak is there, and the fix may change the byte.</summary>
|
||||
Stock,
|
||||
/// <summary>Already test [reg+0x24] (85 xx 24): fixed before, by this engine or another patch.</summary>
|
||||
AlreadyFixed,
|
||||
/// <summary>The inc NOP'd out (90 90 90), as eriknihlen's patch does: fixed by something else.</summary>
|
||||
AlreadyNopped,
|
||||
/// <summary>Not the end-of-retail client's code: left alone.</summary>
|
||||
Unknown,
|
||||
}
|
||||
|
||||
/// <param name="Va">The address of the inc's first byte (the one changed).</param>
|
||||
/// <param name="Context">The bytes around it, from <see cref="Offset"/> back; null = any (a call's rel32).
|
||||
/// The three bytes from <see cref="Offset"/> are the inc itself (FF, then its ModRM and disp8).</param>
|
||||
public readonly record struct Site(int Va, string Name, byte?[] Context, int Offset)
|
||||
{
|
||||
public int Start => Va - Offset;
|
||||
}
|
||||
|
||||
public static readonly Site[] Sites =
|
||||
[
|
||||
// call Palette::Palette; test eax,eax; je +3; [inc dword ptr [eax+24h]]; ret
|
||||
new(0x0053EFFE, "Palette::makeModifiedPalette()",
|
||||
[0xE8, null, null, null, null, 0x85, 0xC0, 0x74, 0x03, 0xFF, 0x40, 0x24, 0xC3], 9),
|
||||
// call Palette::Palette; mov esi,eax; test esi,esi; je +3Ch; [inc dword ptr [esi+24h]]; mov eax,[esi]
|
||||
new(0x0053F19C, "Palette::makeModifiedPalette(DataID, Subpalette*)",
|
||||
[0xE8, null, null, null, null, 0x8B, 0xF0, 0x85, 0xF6, 0x74, 0x3C, 0xFF, 0x46, 0x24, 0x8B, 0x06], 11),
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// Reads <paramref name="bytes"/> (the client's bytes from <see cref="Site.Start"/>, at least the
|
||||
/// context's length). Everything outside the inc must match; the inc is stock (FF xx 24), already
|
||||
/// fixed (85 xx 24) or NOP'd (90 90 90). Anything else is Unknown.
|
||||
/// </summary>
|
||||
public static SiteState Classify(Site site, ReadOnlySpan<byte> bytes)
|
||||
{
|
||||
byte?[] ctx = site.Context;
|
||||
if (bytes.Length < ctx.Length) return SiteState.Unknown;
|
||||
int op = site.Offset;
|
||||
for (int i = 0; i < ctx.Length; i++)
|
||||
{
|
||||
if (i >= op && i < op + 3) continue; // the inc, read below
|
||||
if (ctx[i] is byte want && bytes[i] != want) return SiteState.Unknown;
|
||||
}
|
||||
byte modrm = ctx[op + 1]!.Value, disp = ctx[op + 2]!.Value;
|
||||
if (bytes[op + 1] == modrm && bytes[op + 2] == disp)
|
||||
{
|
||||
if (bytes[op] == StockByte) return SiteState.Stock;
|
||||
if (bytes[op] == FixedByte) return SiteState.AlreadyFixed;
|
||||
return SiteState.Unknown;
|
||||
}
|
||||
if (bytes[op] == Nop && bytes[op + 1] == Nop && bytes[op + 2] == Nop) return SiteState.AlreadyNopped;
|
||||
return SiteState.Unknown;
|
||||
}
|
||||
|
||||
/// <summary>The one log line: on, and what was done at each site.</summary>
|
||||
public static string Summary(int patched, int alreadyFixed, int leftAlone) =>
|
||||
$"Compat: palette leak fix on - {patched} site(s) patched, {alreadyFixed} already fixed, " +
|
||||
$"{leftAlone} left alone (of {Sites.Length}).";
|
||||
}
|
||||
59
src/RynthCore.Engine/Compatibility/PanelSwapPolicy.cs
Normal file
59
src/RynthCore.Engine/Compatibility/PanelSwapPolicy.cs
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
// ============================================================================
|
||||
// RynthCore.Engine - Compatibility/PanelSwapPolicy.cs
|
||||
//
|
||||
// Pure decisions for AcPanels' repair of AC's panel container after a close
|
||||
// (no AC memory here; tools/PanelSwapPolicyTests runs them offline).
|
||||
//
|
||||
// What goes wrong in AC (acclient 4,841,472 bytes; Ghidra + disassembly):
|
||||
// gmPanelUI::RecvNotice_SetPanelVisibility (0x004BD380), closing the panel
|
||||
// the container shows (+0x10 of its notice handler, element +0x608) that
|
||||
// was opened over another one (+0x14, element +0x60C: "previous", set when
|
||||
// the new panel has attribute 0x10000049 and the old one hasn't; vitae,
|
||||
// book, effects, character information... in layout 0x2100006E):
|
||||
// 0x004BD4A3 current.SetVisible(0)
|
||||
// 0x004BD4A6 re-reads previous; if set: open it again (notice), clear it
|
||||
// 0x004BD4DA else: current = 0, the container is hidden.
|
||||
// UIElement::SetVisible (0x00462390) tells the panel's parents at once
|
||||
// (element message 0x18, UIElementManager::BroadcastElementMessage
|
||||
// 0x0045AC50, synchronous unless a UI message is already being handled),
|
||||
// and the container's gmPanelUI::ListenToElementMessage (0x004BD300) sends
|
||||
// the same close notice again from inside the first. That inner close
|
||||
// reopens the previous panel and clears "previous"; the outer one then
|
||||
// reads "no previous", clears current and hides the container. Left: the
|
||||
// container hidden with no current panel and the previous panel (the pack)
|
||||
// still shown inside it. The next panel AC opens there (gmVitaeUI pops the
|
||||
// vitae panel when vitae drops, 0x004A7B48) finds no current panel to
|
||||
// close, shows itself and the container - and the pack shows with it,
|
||||
// under it, its paper doll's 3D figure drawn over both (the doll is its own
|
||||
// render object, linked last: RenderUI::RenderObjects 0x004488A0).
|
||||
// A close from a panel's own button runs inside a UI message, so the
|
||||
// inner notice waits and AC's swap is right; a close from outside one
|
||||
// (RynthCore's bar and /rc panels on the game tick, keys) hits it.
|
||||
//
|
||||
// The repair: before AC handles a close notice, note each container whose
|
||||
// current panel is the one closing and which has a previous panel; after,
|
||||
// if AC left that container with no current panel while the previous panel
|
||||
// still shows, send the open notice for the previous panel (what AC meant):
|
||||
// the container shows it, as when the panel's own button closes it.
|
||||
// Unknown inputs (0 pointers) never act.
|
||||
// ============================================================================
|
||||
|
||||
namespace RynthCore.Engine.Compatibility;
|
||||
|
||||
internal static class PanelSwapPolicy
|
||||
{
|
||||
/// <summary>
|
||||
/// Before AC handles a panel notice for one container: the panel AC should bring back when it
|
||||
/// closes <paramref name="closing"/> (the container's previous panel), or 0 when there is none to watch.
|
||||
/// </summary>
|
||||
public static nint PreviousToWatch(bool open, nint closing, nint current, nint previous) =>
|
||||
!open && closing != 0 && closing == current && previous != 0 && previous != closing ? previous : 0;
|
||||
|
||||
/// <summary>
|
||||
/// After AC handled the close: whether to open <paramref name="watched"/> again, because AC left its
|
||||
/// container with no current panel while it still shows (the inner/outer close race). Never a panel a
|
||||
/// plugin claimed (its window opens in place of AC's; AC's would pop up).
|
||||
/// </summary>
|
||||
public static bool ShouldReopen(nint watched, nint currentAfter, bool watchedShows, bool claimed) =>
|
||||
watched != 0 && currentAfter == 0 && watchedShows && !claimed;
|
||||
}
|
||||
|
|
@ -1266,6 +1266,8 @@ internal static class RynthCoreChatCommands
|
|||
/// <summary>
|
||||
/// "/rc sense compact on|off | collapse on|off | view full|compact|collapsed": the Sense panel's
|
||||
/// look (saved in sense.txt), and the look now; alone, compact / collapse / view say the look now.
|
||||
/// "/rc sense addselected" adds the selected object's name; "/rc sense import [file]" brings a
|
||||
/// Virindi Sense list over (its result is a second line when the file has been read).
|
||||
/// </summary>
|
||||
private static void SenseLayoutCommand(string args)
|
||||
{
|
||||
|
|
@ -1278,7 +1280,23 @@ internal static class RynthCoreChatCommands
|
|||
if (!UI.Data.SenseStore.Loaded)
|
||||
{
|
||||
UI.Data.SenseStore.EnsureLoadQueued();
|
||||
Fail("Can't change the Sense view yet: its settings are still loading. Try again in a moment.");
|
||||
Fail("Can't change the Sense list or view yet: its settings are still loading. Try again in a moment.");
|
||||
return;
|
||||
}
|
||||
// The list (2026-11-22): the selected object's name, and Virindi Sense's list brought over.
|
||||
if (UI.Data.SenseLayout.IsAddSelected(args))
|
||||
{
|
||||
bool added = UI.Data.SenseStore.AddSelected(out string message);
|
||||
Answer(added, "Sense: " + message, "Sense: " + message);
|
||||
return;
|
||||
}
|
||||
if (UI.Data.SenseLayout.IsImport(args, out string importFile))
|
||||
{
|
||||
bool okToChat = ChatCommandReplies.ToChat(ChatReplyKind.Ok, _origin);
|
||||
bool failToChat = ChatCommandReplies.ToChat(ChatReplyKind.Fail, _origin);
|
||||
Reply("Sense: reading the Virindi Sense list...");
|
||||
UI.Data.SenseStore.ImportVirindiSense(importFile, (text, ok) =>
|
||||
WriteReply("Sense: " + text, ok ? ChatReplyKind.Ok : ChatReplyKind.Fail, ok ? okToChat : failToChat));
|
||||
return;
|
||||
}
|
||||
UI.Data.SenseLayoutAnswer a = UI.Data.SenseLayout.Apply(args, UI.Data.SenseStore.Layout,
|
||||
|
|
@ -1877,6 +1895,16 @@ internal static class RynthCoreChatCommands
|
|||
private static void Reply(string text, ChatReplyKind kind, bool toChat)
|
||||
{
|
||||
_answered = true;
|
||||
WriteReply(text, kind, toChat);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The one writer of every reply (the log line, and chat unless a script sent the command).
|
||||
/// Also a command's second line that comes later, off AC's thread (/rc sense import's
|
||||
/// result): <paramref name="toChat"/> worked out when the command ran.
|
||||
/// </summary>
|
||||
private static void WriteReply(string text, ChatReplyKind kind, bool toChat)
|
||||
{
|
||||
RynthLog.Compat($"RynthCoreChatCommands: {text}{(toChat ? "" : " (log only: a script's command)")}");
|
||||
if (toChat)
|
||||
AcMainThreadQueue.EnqueueWriteToChat(ChatCommandReplies.ReplyPrefix + text, ChatCommandReplies.ChatType(kind));
|
||||
|
|
|
|||
|
|
@ -26,7 +26,10 @@
|
|||
// a read is asked for and Stale comes back: try again a moment later); one
|
||||
// raise at a time (Busy until the unassigned XP or the credits change, or 5 s;
|
||||
// while Busy each GetTrainingInfo asks for a read at the next tick, so the
|
||||
// answer is seen as soon as it lands). Any thread.
|
||||
// answer is seen as soon as it lands). In a world transition (portal space, a
|
||||
// death, the 5 s after landing) a raise is queued and sent once it ends
|
||||
// (AcMainThreadQueue keeps Train entries through it), and Busy lasts until 5 s
|
||||
// after that. Any thread.
|
||||
// ============================================================================
|
||||
|
||||
using System;
|
||||
|
|
@ -170,6 +173,10 @@ internal static unsafe class TrainingApi
|
|||
_busyUntilMs = 0;
|
||||
return false;
|
||||
}
|
||||
// Portal space, a death, the seconds after landing: the raise waits in AcMainThreadQueue and
|
||||
// isn't sent yet, so Busy lasts until 5 s after the queue lets it go (a press made meanwhile
|
||||
// is the caller's to hold; the DreamWeave panel holds it).
|
||||
_busyUntilMs = WorldTransitionState.HoldDeadline(_busyUntilMs, now, PlayerLifecycleLog.InWorldTransition, BusyMs);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@
|
|||
// off, a motion off, StopMovement, StopCompletely, CancelAttack, a container close),
|
||||
// which still run, in queue order, as one group. A dropped stop can leave the
|
||||
// character running or turning, and AcMainThreadQueue never drops stops.
|
||||
// Raises (AcMainThreadQueue's Train: the player's own click on a Skills window, a
|
||||
// CM_Train game action that touches no world object) are kept the same way: held,
|
||||
// then sent (2026-11-20: dropped, a raise clicked in portal space was lost unseen).
|
||||
//
|
||||
// Walking across a landblock boundary is not a transition: it happens constantly in a
|
||||
// fight, AC streams the neighbour in without tearing the player's world down, and a 5 s
|
||||
|
|
@ -177,6 +180,17 @@ internal sealed class WorldTransitionState
|
|||
|
||||
public enum Verdict { Run, Hold, Drop }
|
||||
|
||||
/// <summary>
|
||||
/// A wait for the server's answer to something the player queued (a raise: the Skills panels'
|
||||
/// 5 s lock, TrainingApi's Busy) can't run out while a transition holds the queue: nothing has
|
||||
/// been sent yet. While <paramref name="inTransition"/>, a wait still running
|
||||
/// (<paramref name="untilMs"/> after <paramref name="nowMs"/>) is pushed to at least
|
||||
/// <paramref name="windowMs"/> from now, so its full window starts once the queue lets the action
|
||||
/// go. Anything else is returned as it is (no wait, a wait already over, or no transition).
|
||||
/// </summary>
|
||||
public static long HoldDeadline(long untilMs, long nowMs, bool inTransition, long windowMs)
|
||||
=> inTransition && untilMs > nowMs ? Math.Max(untilMs, nowMs + windowMs) : untilMs;
|
||||
|
||||
/// <summary>
|
||||
/// A drain's check for the head of a queue: true = hold everything queued now. Records the
|
||||
/// moment, so work queued up to here is judged by <see cref="Decide"/> once it ends.
|
||||
|
|
|
|||
246
src/RynthCore.Engine/D3D9/AcGameDevice.cs
Normal file
246
src/RynthCore.Engine/D3D9/AcGameDevice.cs
Normal file
|
|
@ -0,0 +1,246 @@
|
|||
// ============================================================================
|
||||
// RynthCore.Engine - D3D9/AcGameDevice.cs
|
||||
// AC's own IDirect3DDevice9, read from AC's memory, so the EndScene hook is
|
||||
// taken from the device AC draws with and the engine creates no D3D9 device
|
||||
// of its own (2026-11-19).
|
||||
//
|
||||
// Why: the EndScene address used to come from a throwaway device (D3D9VTable
|
||||
// .GetDeviceVTable: Direct3DCreate9 + CreateDevice NULLREF, then HAL, on a
|
||||
// hidden 1x1 window) at every login and every engine hot reload. A second
|
||||
// device created while AC's device holds exclusive full screen can make AC's
|
||||
// device lost; when AC's Reset then fails, AC shows "Could not initialize
|
||||
// Direct3D. Please ensure that DirectX 9.0 is installed" and quits (full
|
||||
// screen at the monitor's native resolution, with RynthCore only).
|
||||
//
|
||||
// Where AC keeps it (read offline from our client, 4,841,472 bytes; both
|
||||
// copies, C:\Turbine and C:\Games\RynthCore\AcClient):
|
||||
// - The render device global (0x00870340 here; AcCellSight reads its frame
|
||||
// stamp) points at AC's RenderDeviceD3D. PrimD3DRender::UpdateLightsInternal
|
||||
// loads it into ecx and calls RenderDeviceD3D::SetFFAmbientColor32
|
||||
// (0x005A3EB0) with it (0x0059C15E: mov ecx,[0x00870340] ... call
|
||||
// 0x005A3EB0): the global's object is that function's `this`.
|
||||
// - SetFFAmbientColor32 reads the device at this+0x468 (mov eax,[esi+468h];
|
||||
// mov ecx,[eax]; push edi; push 8Bh; push eax; call [ecx+0E4h] =
|
||||
// SetRenderState(D3DRS_AMBIENT)). The constructor zeroes +0x468
|
||||
// (0x005A3395), device creation hands &this->+0x468 to IDirect3D9::
|
||||
// CreateDevice as ppReturnedDeviceInterface (0x005A3A4B; the IDirect3D9 is
|
||||
// [[0x0086734C]+0x1C]), and teardown releases it (0x005A352F).
|
||||
// Both are found by pattern (HookResolver; tools\pe_pattern.py CHECK covers
|
||||
// them), the device offset is read out of the matched code, and the global's
|
||||
// call site must call the SetFFAmbientColor32 the other pattern found.
|
||||
//
|
||||
// Before a device is used: every pointer on the way is probed (MemoryProbe),
|
||||
// and its vtable's EndScene, Reset and Present slots must all be in the loaded
|
||||
// d3d9.dll (AcGameDevicePolicy.JudgeDevice). Anything else = not found: the
|
||||
// bootstrapper logs why and falls back to the throwaway-device discovery.
|
||||
// Read only: nothing here writes AC memory or calls into AC or the device.
|
||||
// ============================================================================
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using RynthCore.Engine.Compatibility;
|
||||
|
||||
namespace RynthCore.Engine.D3D9;
|
||||
|
||||
internal static unsafe class AcGameDevice
|
||||
{
|
||||
// RenderDeviceD3D::SetFFAmbientColor32 on the 4,841,472-byte client. Pattern is the source of truth.
|
||||
private const int SetAmbientVa = 0x005A3EB0;
|
||||
|
||||
// AmbientLight's pattern for the same function, with the device offset (bytes 28-31) wildcarded
|
||||
// and read back from the match: push esi; mov esi,ecx; mov al,[esi+470h]; test al,al; push edi;
|
||||
// mov edi,[esp+0Ch]; jnz +8; cmp [esi+4A0h],edi; jz +1Bh; mov eax,[esi+DEVICE]; mov ecx,[eax];
|
||||
// push edi; push 8Bh (D3DRS_AMBIENT). Unique on both client copies (2026-11-19).
|
||||
private static readonly byte?[] SetAmbientDevicePattern =
|
||||
[
|
||||
0x56,
|
||||
0x8B, 0xF1,
|
||||
0x8A, 0x86, 0x70, 0x04, 0x00, 0x00,
|
||||
0x84, 0xC0,
|
||||
0x57,
|
||||
0x8B, 0x7C, 0x24, 0x0C,
|
||||
0x75, 0x08,
|
||||
0x39, 0xBE, 0xA0, 0x04, 0x00, 0x00,
|
||||
0x74, 0x1B,
|
||||
0x8B, 0x86, null, null, null, null,
|
||||
0x8B, 0x08,
|
||||
0x57,
|
||||
0x68, 0x8B, 0x00, 0x00, 0x00,
|
||||
];
|
||||
|
||||
// The render device global (RenderDevice* render_device) on the 4,841,472-byte client.
|
||||
private const int RenderDeviceGlobalVa = 0x00870340;
|
||||
|
||||
// PrimD3DRender::UpdateLightsInternal at 0x0059C15E: mov ecx,[render device global]; shl eax,8;
|
||||
// or eax,ebx; shl eax,8; or eax,edi; shl eax,8; push ebp; or eax,esi; push eax;
|
||||
// call RenderDeviceD3D::SetFFAmbientColor32. The global (bytes 2-5) is wildcarded and read back;
|
||||
// the call (byte 23, E8 rel32) must land on the SetFFAmbientColor32 found above. Unique on both
|
||||
// client copies (2026-11-19).
|
||||
private static readonly byte?[] RenderDeviceGlobalXref =
|
||||
[
|
||||
0x8B, 0x0D, null, null, null, null,
|
||||
0xC1, 0xE0, 0x08,
|
||||
0x0B, 0xC3,
|
||||
0xC1, 0xE0, 0x08,
|
||||
0x0B, 0xC7,
|
||||
0xC1, 0xE0, 0x08,
|
||||
0x55,
|
||||
0x0B, 0xC6,
|
||||
0x50,
|
||||
0xE8,
|
||||
];
|
||||
private const int XrefCallAt = 23;
|
||||
|
||||
private static readonly object Sync = new();
|
||||
private static bool _resolveTried;
|
||||
private static IntPtr _global; // address of the RenderDevice* global (0 = unresolved)
|
||||
private static int _deviceOffset; // RenderDeviceD3D's IDirect3DDevice9* field
|
||||
private static string _resolveFailure = "not resolved";
|
||||
|
||||
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
|
||||
private static extern IntPtr GetModuleHandleW(string lpModuleName);
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
private static extern bool GetModuleHandleExW(uint flags, IntPtr address, out IntPtr module);
|
||||
|
||||
/// <summary>
|
||||
/// One look for AC's live device. Zero when it can't be used, with why in
|
||||
/// <paramref name="why"/>; <paramref name="worthRetry"/> says whether waiting could help (AC
|
||||
/// has no device yet) or not (the code wasn't found, the device isn't d3d9's).
|
||||
/// </summary>
|
||||
public static IntPtr TryFind(out string why, out bool worthRetry)
|
||||
{
|
||||
worthRetry = false;
|
||||
try
|
||||
{
|
||||
if (!EnsureResolved(out why))
|
||||
return IntPtr.Zero;
|
||||
|
||||
IntPtr g = _global;
|
||||
if (!MemoryProbe.IsReadable(g, 4)) { why = $"the render device global 0x{g.ToInt32():X8} is unreadable"; return IntPtr.Zero; }
|
||||
IntPtr renderDevice = *(IntPtr*)g;
|
||||
if (renderDevice == IntPtr.Zero) { why = "AC has no render device yet"; worthRetry = true; return IntPtr.Zero; }
|
||||
|
||||
IntPtr field = renderDevice + _deviceOffset;
|
||||
if (!MemoryProbe.IsReadable(field, 4)) { why = $"RenderDeviceD3D 0x{renderDevice.ToInt32():X8}+0x{_deviceOffset:X} is unreadable"; return IntPtr.Zero; }
|
||||
IntPtr device = *(IntPtr*)field;
|
||||
if (device == IntPtr.Zero) { why = "AC's render device has no D3D device yet"; worthRetry = true; return IntPtr.Zero; }
|
||||
|
||||
if (!MemoryProbe.IsReadable(device, 4)) { why = $"device 0x{device.ToInt32():X8} is unreadable"; return IntPtr.Zero; }
|
||||
IntPtr vtable = *(IntPtr*)device;
|
||||
int slots = DeviceVTableIndex.EndScene + 1;
|
||||
if (!MemoryProbe.IsReadable(vtable, slots * IntPtr.Size)) { why = $"device 0x{device.ToInt32():X8}'s vtable 0x{vtable.ToInt32():X8} is unreadable"; return IntPtr.Zero; }
|
||||
IntPtr* vt = (IntPtr*)vtable;
|
||||
IntPtr endScene = vt[DeviceVTableIndex.EndScene];
|
||||
IntPtr reset = vt[DeviceVTableIndex.Reset];
|
||||
IntPtr present = vt[17];
|
||||
|
||||
long d3d9 = GetModuleHandleW("d3d9.dll").ToInt64();
|
||||
string? bad = AcGameDevicePolicy.JudgeDevice(d3d9, ModuleOf(endScene), ModuleOf(reset), ModuleOf(present));
|
||||
string where = $"device 0x{device.ToInt32():X8} ([0x{g.ToInt32():X8}] = RenderDeviceD3D 0x{renderDevice.ToInt32():X8}, +0x{_deviceOffset:X}): " +
|
||||
$"vtable {DecalD3D9.Describe(vtable)}, EndScene {DecalD3D9.Describe(endScene)}, Reset {DecalD3D9.Describe(reset)}, Present {DecalD3D9.Describe(present)}";
|
||||
if (bad != null)
|
||||
{
|
||||
why = $"{bad} ({where})";
|
||||
return IntPtr.Zero;
|
||||
}
|
||||
why = where;
|
||||
return device;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
why = $"{ex.GetType().Name}: {ex.Message}";
|
||||
return IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks for AC's device until <paramref name="timeoutMs"/> runs out while waiting could help
|
||||
/// (bootstrap thread; stops when the engine shuts down). Zero = not found, why in <paramref name="why"/>.
|
||||
/// </summary>
|
||||
public static IntPtr WaitFor(int timeoutMs, int pollMs, out string why)
|
||||
{
|
||||
long deadline = Environment.TickCount64 + timeoutMs;
|
||||
while (true)
|
||||
{
|
||||
IntPtr device = TryFind(out why, out bool worthRetry);
|
||||
if (device != IntPtr.Zero || !worthRetry || Environment.TickCount64 >= deadline)
|
||||
return device;
|
||||
if (!EngineThreads.Sleep(pollMs))
|
||||
{
|
||||
why = "the engine is shutting down";
|
||||
return IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static long ModuleOf(IntPtr address)
|
||||
{
|
||||
const uint FROM_ADDRESS = 0x4, UNCHANGED_REFCOUNT = 0x2;
|
||||
if (address == IntPtr.Zero)
|
||||
return 0;
|
||||
return GetModuleHandleExW(FROM_ADDRESS | UNCHANGED_REFCOUNT, address, out IntPtr module) ? module.ToInt64() : 0;
|
||||
}
|
||||
|
||||
private static bool EnsureResolved(out string why)
|
||||
{
|
||||
lock (Sync)
|
||||
{
|
||||
if (!_resolveTried)
|
||||
{
|
||||
_resolveTried = true;
|
||||
Resolve();
|
||||
}
|
||||
why = _resolveFailure;
|
||||
return _global != IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
private static void Resolve()
|
||||
{
|
||||
if (!AcClientModule.TryReadTextSection(out AcClientTextSection text))
|
||||
{
|
||||
_resolveFailure = "acclient.exe not available";
|
||||
return;
|
||||
}
|
||||
|
||||
HookResolver.ResolveResult fn = HookResolver.Resolve(text, "AcGameDevice.RenderDeviceD3D::SetFFAmbientColor32", SetAmbientDevicePattern, SetAmbientVa);
|
||||
if (!fn.Success)
|
||||
{
|
||||
_resolveFailure = "RenderDeviceD3D::SetFFAmbientColor32 not found";
|
||||
return;
|
||||
}
|
||||
int offset = AcGameDevicePolicy.DeviceOffsetFromSetAmbient(text.Bytes, fn.Address.ToInt32() - text.TextBaseVa);
|
||||
if (offset < 0)
|
||||
{
|
||||
_resolveFailure = $"no device field in the code at 0x{fn.Address.ToInt32():X8} ({fn.Detail})";
|
||||
return;
|
||||
}
|
||||
|
||||
HookResolver.ResolveResult g = HookResolver.ResolveData(text, "AcGameDevice.render_device", RenderDeviceGlobalXref, 2, RenderDeviceGlobalVa);
|
||||
int global = g.Address.ToInt32();
|
||||
long moduleBase = text.ModuleBase.ToInt64();
|
||||
if (global < moduleBase || global >= moduleBase + text.ImageSize)
|
||||
{
|
||||
_resolveFailure = $"the render device global 0x{global:X8} is outside acclient.exe";
|
||||
return;
|
||||
}
|
||||
if (g.Source == HookResolver.ResolveSource.PatternScan)
|
||||
{
|
||||
// The site that loads the global must call the SetFFAmbientColor32 found above: then the
|
||||
// global's object is that function's `this`, a RenderDeviceD3D.
|
||||
int site = PatternScanner.FindPattern(text.Bytes, RenderDeviceGlobalXref);
|
||||
int callAt = site + XrefCallAt;
|
||||
if (site < 0 || !AcGameDevicePolicy.CallLandsOn(text.Bytes, callAt, text.TextBaseVa + callAt, fn.Address.ToInt32()))
|
||||
{
|
||||
_resolveFailure = $"the render device global's call site doesn't call SetFFAmbientColor32 at 0x{fn.Address.ToInt32():X8}";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
_deviceOffset = offset;
|
||||
_global = new IntPtr(global);
|
||||
_resolveFailure = "";
|
||||
RynthLog.D3D9($"AcGameDevice: AC's device is [[0x{global:X8}]+0x{offset:X}] (render device global via {g.Detail}, " +
|
||||
$"SetFFAmbientColor32 @ 0x{fn.Address.ToInt32():X8} via {fn.Detail}).");
|
||||
}
|
||||
}
|
||||
76
src/RynthCore.Engine/D3D9/AcGameDevicePolicy.cs
Normal file
76
src/RynthCore.Engine/D3D9/AcGameDevicePolicy.cs
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
// ============================================================================
|
||||
// RynthCore.Engine - D3D9/AcGameDevicePolicy.cs
|
||||
// The pure part of AcGameDevice (finding AC's own IDirect3DDevice9 so the
|
||||
// EndScene hook needs no device of its own): where in RenderDeviceD3D the
|
||||
// device pointer sits, read from SetFFAmbientColor32's code, and whether a
|
||||
// device found there is one to hook. No AC, no Win32; tools/AcGameDeviceTests.
|
||||
// ============================================================================
|
||||
using System;
|
||||
|
||||
namespace RynthCore.Engine.D3D9;
|
||||
|
||||
internal static class AcGameDevicePolicy
|
||||
{
|
||||
/// <summary>Where the device offset's 4 bytes sit in RenderDeviceD3D::SetFFAmbientColor32
|
||||
/// (mov eax,[esi+disp32] at +0x1A: 8B 86 disp32).</summary>
|
||||
public const int DeviceOperandInSetAmbient = 28;
|
||||
|
||||
/// <summary>The offset on the 4,841,472-byte client (RenderDeviceD3D+0x468).</summary>
|
||||
public const int DeviceOffsetFallback = 0x468;
|
||||
|
||||
/// <summary>A RenderDeviceD3D is a few KB: an offset outside this is not the device field.</summary>
|
||||
public const int MinDeviceOffset = 0x10, MaxDeviceOffset = 0x4000;
|
||||
|
||||
/// <summary>
|
||||
/// The device field's offset from the bytes of SetFFAmbientColor32 at <paramref name="at"/>:
|
||||
/// "mov eax,[esi+disp32]; mov ecx,[eax]; push edi; push 8Bh (D3DRS_AMBIENT)" must be where the
|
||||
/// pattern puts it, and the offset plausible and 4-aligned. -1 when the code isn't that.
|
||||
/// </summary>
|
||||
public static int DeviceOffsetFromSetAmbient(ReadOnlySpan<byte> code, int at)
|
||||
{
|
||||
int op = at + DeviceOperandInSetAmbient;
|
||||
if (at < 0 || op + 9 > code.Length)
|
||||
return -1;
|
||||
if (code[op - 2] != 0x8B || code[op - 1] != 0x86) // mov eax,[esi+disp32]
|
||||
return -1;
|
||||
if (code[op + 4] != 0x8B || code[op + 5] != 0x08 || code[op + 6] != 0x57 // mov ecx,[eax]; push edi
|
||||
|| code[op + 7] != 0x68 || code[op + 8] != 0x8B) // push 8Bh (D3DRS_AMBIENT)
|
||||
return -1;
|
||||
int offset = code[op] | code[op + 1] << 8 | code[op + 2] << 16 | code[op + 3] << 24;
|
||||
return IsPlausibleOffset(offset) ? offset : -1;
|
||||
}
|
||||
|
||||
public static bool IsPlausibleOffset(int offset) =>
|
||||
offset >= MinDeviceOffset && offset <= MaxDeviceOffset && (offset & 3) == 0;
|
||||
|
||||
/// <summary>
|
||||
/// The rel32 call at <paramref name="callAt"/> (E8 rel32) lands on <paramref name="targetVa"/>.
|
||||
/// <paramref name="callVa"/> is the VA of the E8 byte.
|
||||
/// </summary>
|
||||
public static bool CallLandsOn(ReadOnlySpan<byte> code, int callAt, int callVa, int targetVa)
|
||||
{
|
||||
if (callAt < 0 || callAt + 5 > code.Length || code[callAt] != 0xE8)
|
||||
return false;
|
||||
int rel = code[callAt + 1] | code[callAt + 2] << 8 | code[callAt + 3] << 16 | code[callAt + 4] << 24;
|
||||
return unchecked(callVa + 5 + rel) == targetVa;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether a device AC holds is one the EndScene hook can be taken from: its EndScene, Reset and
|
||||
/// Present slots all in the loaded d3d9.dll (whichever d3d9.dll the process loaded: Windows' own,
|
||||
/// DXVK, a wrapper). Each argument is the module (HMODULE) that holds that address, 0 = none.
|
||||
/// Null = good; otherwise why not (logged, then the throwaway-device discovery is the last resort).
|
||||
/// </summary>
|
||||
public static string? JudgeDevice(long d3d9Module, long endSceneModule, long resetModule, long presentModule)
|
||||
{
|
||||
if (d3d9Module == 0)
|
||||
return "d3d9.dll is not loaded";
|
||||
if (endSceneModule != d3d9Module)
|
||||
return endSceneModule == 0 ? "its EndScene slot is in no module" : "its EndScene slot is outside d3d9.dll";
|
||||
if (resetModule != d3d9Module)
|
||||
return "its Reset slot is outside d3d9.dll";
|
||||
if (presentModule != d3d9Module)
|
||||
return "its Present slot is outside d3d9.dll";
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -72,16 +72,14 @@ internal static class D3D9Bootstrapper
|
|||
return;
|
||||
}
|
||||
|
||||
// This runs after character login, so d3d9.dll and the game's
|
||||
// device are fully initialized. Use the NULLREF throwaway device
|
||||
// for vtable discovery — it's safe post-login because the
|
||||
// d3d9-on-d3d12 wrapper has finished all its one-time init work.
|
||||
// This runs after character login (or on a hot reload, in the world), so d3d9.dll
|
||||
// and the game's device are fully initialized: take EndScene from AC's own device
|
||||
// and create none (AcGameDevice). A throwaway device here could make AC's exclusive
|
||||
// full-screen device lost, and AC quits when its Reset fails (2026-11-19).
|
||||
IntPtr earlyModule = GetModuleHandleA("d3d9.dll");
|
||||
if (earlyModule != IntPtr.Zero)
|
||||
{
|
||||
RynthLog.D3D9("D3D9Bootstrapper: d3d9.dll loaded — discovering EndScene via NULLREF device.");
|
||||
Compatibility.MemoryUse.Mark("D3D9 bootstrap: NULLREF device for the vtable");
|
||||
EndSceneHook.Install("post-login-vtable");
|
||||
InstallFromAcDeviceOrThrowaway("post-login");
|
||||
Compatibility.MemoryUse.Mark("EndScene hook installed");
|
||||
return;
|
||||
}
|
||||
|
|
@ -103,7 +101,7 @@ internal static class D3D9Bootstrapper
|
|||
{
|
||||
RynthLog.D3D9("D3D9Bootstrapper: Real CreateDevice path was not observed in time. Falling back to shared vtable discovery.");
|
||||
RemoveBootstrapHooks();
|
||||
EndSceneHook.Install();
|
||||
InstallFromAcDeviceOrThrowaway("fallback");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -118,11 +116,46 @@ internal static class D3D9Bootstrapper
|
|||
{
|
||||
RynthLog.D3D9("D3D9Bootstrapper: Attempting fallback EndScene install after bootstrap failure.");
|
||||
RemoveBootstrapHooks();
|
||||
EndSceneHook.Install();
|
||||
InstallFromAcDeviceOrThrowaway("fallback");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// How long the post-login install waits for AC's device when AC has none yet (it always has one
|
||||
// after login; this covers an odd moment such as a device being re-created).
|
||||
private const int AcDeviceWaitMs = 5000;
|
||||
private const int AcDevicePollMs = 100;
|
||||
|
||||
/// <summary>
|
||||
/// The EndScene hook from AC's own device (AcGameDevice): no D3D9 object is created. Only when AC's
|
||||
/// device can't be found or used does it fall back, with a log line saying why, to the
|
||||
/// throwaway-device discovery (EndSceneHook.Install), which can make an exclusive full-screen
|
||||
/// device lost.
|
||||
/// </summary>
|
||||
private static void InstallFromAcDeviceOrThrowaway(string stage)
|
||||
{
|
||||
IntPtr device = AcGameDevice.WaitFor(AcDeviceWaitMs, AcDevicePollMs, out string why);
|
||||
if (device != IntPtr.Zero)
|
||||
{
|
||||
RynthLog.D3D9($"D3D9Bootstrapper: hooking EndScene from AC's own {why} - no device created.");
|
||||
EndSceneHook.InstallFromDevice(device, $"{stage}-ac-device");
|
||||
if (EndSceneHook.IsInstalled())
|
||||
return;
|
||||
RynthLog.D3D9("D3D9Bootstrapper: the EndScene hook from AC's device didn't install.");
|
||||
}
|
||||
else
|
||||
{
|
||||
RynthLog.D3D9($"D3D9Bootstrapper: AC's own device wasn't usable: {why}.");
|
||||
}
|
||||
|
||||
if (EngineLifecycle.IsShuttingDown)
|
||||
return;
|
||||
RynthLog.D3D9("D3D9Bootstrapper: LAST RESORT - discovering EndScene via a throwaway device " +
|
||||
"(it can make an exclusive full-screen device lost).");
|
||||
Compatibility.MemoryUse.Mark("D3D9 bootstrap: throwaway device for the vtable");
|
||||
EndSceneHook.Install($"{stage}-vtable");
|
||||
}
|
||||
|
||||
private static void TryHookDirect3DCreate9(IntPtr d3d9Module)
|
||||
{
|
||||
if (_d3dCreateHookInstalled)
|
||||
|
|
|
|||
|
|
@ -95,6 +95,8 @@ internal static class SwapChain9VTableIndex
|
|||
internal static class Surface9VTableIndex
|
||||
{
|
||||
public const int Release = 2;
|
||||
// IDirect3DResource9 3-10, then IDirect3DSurface9: 11=GetContainer, 12=GetDesc.
|
||||
public const int GetDesc = 12;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -70,8 +70,9 @@ internal static class DeviceResetHook
|
|||
try
|
||||
{
|
||||
int released = ImGuiPopOuts.ReleaseDeviceResources();
|
||||
int overlay = OverlayTextureRenderer.ReleaseDefaultPoolResources();
|
||||
if (n <= 20)
|
||||
RynthLog.D3D9($"DeviceResetHook: device Reset #{n}: released {released} pop-out surface set(s) first.");
|
||||
RynthLog.D3D9($"DeviceResetHook: device Reset #{n}: released {released} pop-out surface set(s){(overlay > 0 ? " and the overlay's shared texture" : "")} first.");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -140,8 +140,10 @@ internal static class EndSceneHook
|
|||
|
||||
ResetInstallState(installSource);
|
||||
|
||||
// Vtable discovery uses a NULLREF device to avoid GPU contention
|
||||
// with the game's render thread. Retry once on failure.
|
||||
// LAST RESORT since 2026-11-19 (D3D9Bootstrapper takes EndScene from AC's own
|
||||
// device, AcGameDevice): this creates a second D3D9 device, which can make AC's
|
||||
// exclusive full-screen device lost. Vtable discovery uses a NULLREF device to
|
||||
// avoid GPU contention with the game's render thread. Retry once on failure.
|
||||
const int maxAttempts = 2;
|
||||
for (int attempt = 1; attempt <= maxAttempts; attempt++)
|
||||
{
|
||||
|
|
@ -189,7 +191,7 @@ internal static class EndSceneHook
|
|||
InstallFromEndSceneAddress(DecalD3D9.ResolvedEndScene);
|
||||
}
|
||||
|
||||
public static void InstallFromDevice(IntPtr pDevice)
|
||||
public static void InstallFromDevice(IntPtr pDevice, string installSource = "real-device")
|
||||
{
|
||||
if (_installed)
|
||||
return;
|
||||
|
|
@ -200,7 +202,7 @@ internal static class EndSceneHook
|
|||
return;
|
||||
}
|
||||
|
||||
ResetInstallState("real-device");
|
||||
ResetInstallState(installSource);
|
||||
|
||||
IntPtr deviceVTable = Marshal.ReadIntPtr(pDevice);
|
||||
IntPtr endSceneAddress = Marshal.ReadIntPtr(deviceVTable, DeviceVTableIndex.EndScene * IntPtr.Size);
|
||||
|
|
|
|||
|
|
@ -249,6 +249,21 @@ internal static unsafe class OverlayTextureRenderer
|
|||
$"(handle=0x{descriptor.Value.SharedHandle:X8}, size={descriptor.Value.Width}x{descriptor.Value.Height}, adapterLuid=0x{descriptor.Value.AdapterLuid:X}).");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DeviceResetHook, just before AC resets its device (AC's main thread): an opened shared
|
||||
/// texture is D3DPOOL_DEFAULT, and a plain D3D9 device can't be Reset while one is alive (AC then
|
||||
/// quits with "Could not initialize Direct3D"). The managed software texture survives a Reset
|
||||
/// and is kept. The shared one is opened again from the next frame the overlay sends.
|
||||
/// Returns how many textures it released.
|
||||
/// </summary>
|
||||
public static int ReleaseDefaultPoolResources()
|
||||
{
|
||||
if (_texture == IntPtr.Zero || _sharedTextureHandle == IntPtr.Zero)
|
||||
return 0;
|
||||
ReleaseTexture();
|
||||
return 1;
|
||||
}
|
||||
|
||||
public static void Shutdown()
|
||||
{
|
||||
ReleaseTexture();
|
||||
|
|
|
|||
|
|
@ -338,6 +338,9 @@ public static class EntryPoint
|
|||
// Before AC's main thread resumes, so no dat or network unpack runs the stock
|
||||
// signed padding; a hot reload finds every site already patched.
|
||||
RunInitStep("large-address alignment fix", LargeAddressAlignmentPatch.Initialize);
|
||||
// Palette::makeModifiedPalette's extra reference (eriknihlen's EoR palette leak fix), one
|
||||
// byte per site; only with the launcher's "Fix AC's palette memory leak" checked.
|
||||
RunInitStep("palette leak fix", PaletteLeakFix.Initialize);
|
||||
// DatFileShareHooks force-shares AC's data files at the CreateFile
|
||||
// layer so we can coexist with Decal-injected clients that other
|
||||
// launchers (Thwargle etc.) have already opened against the same
|
||||
|
|
|
|||
|
|
@ -469,6 +469,43 @@ internal static unsafe class DX9Backend
|
|||
height = (int)vp.Height;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
private struct D3DSURFACE_DESC
|
||||
{
|
||||
public uint Format, Type, Usage, Pool, MultiSampleType, MultiSampleQuality, Width, Height;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The size of the device's back buffer (swap chain 0): the resolution AC draws at, whatever the
|
||||
/// window's size (a bigger or smaller window only stretches it). False when it can't be read.
|
||||
/// Call on the render thread (inside EndScene). 2026-11-21, AcWindowChrome.
|
||||
/// </summary>
|
||||
public static bool TryGetBackBufferSize(IntPtr pDevice, out int width, out int height)
|
||||
{
|
||||
width = 0; height = 0;
|
||||
if (pDevice == IntPtr.Zero) return false;
|
||||
_getBackBuffer ??= Get<GetBackBufferD>(Marshal.ReadIntPtr(pDevice), DeviceVTableIndex.GetBackBuffer);
|
||||
|
||||
IntPtr backBuffer = IntPtr.Zero;
|
||||
try
|
||||
{
|
||||
if (_getBackBuffer(pDevice, 0, 0, D3DBACKBUFFER_TYPE_MONO, out backBuffer) < 0 || backBuffer == IntPtr.Zero)
|
||||
return false;
|
||||
IntPtr vtable = Marshal.ReadIntPtr(backBuffer);
|
||||
var getDesc = (delegate* unmanaged[Stdcall]<IntPtr, D3DSURFACE_DESC*, int>)
|
||||
Marshal.ReadIntPtr(vtable, Surface9VTableIndex.GetDesc * IntPtr.Size);
|
||||
D3DSURFACE_DESC desc;
|
||||
if (getDesc(backBuffer, &desc) < 0) return false;
|
||||
width = (int)desc.Width;
|
||||
height = (int)desc.Height;
|
||||
return width > 0 && height > 0;
|
||||
}
|
||||
finally
|
||||
{
|
||||
ReleaseComObject(backBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
public static IntPtr GetDeviceWindow(IntPtr pDevice)
|
||||
{
|
||||
if (pDevice == IntPtr.Zero) return IntPtr.Zero;
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ internal static class EngineFrameController
|
|||
|
||||
// Settings > Game Client: borderless windowed + AC window placement. Throttled; reads only
|
||||
// here - the window itself is changed from the game WndProc (AcWindowChrome).
|
||||
try { UI.AcWindowChrome.Tick(_gameHwnd); }
|
||||
try { UI.AcWindowChrome.Tick(_gameHwnd, pDevice); }
|
||||
catch (Exception ex) { RynthLog.UI($"AcWindowChrome.Tick threw {ex.GetType().Name}: {ex.Message}"); }
|
||||
|
||||
// Panel layout per character: switches to the character's layout (or back to the
|
||||
|
|
|
|||
|
|
@ -1248,7 +1248,8 @@ internal static class ImGuiPanelHost
|
|||
// Popped out, a panel is always interactive (like the Avalonia pop-out was).
|
||||
if (!popped) try { clickThrough = entry.Instance?.ClickThrough ?? false; } catch { }
|
||||
// Under AC's UI: where an AC window covers the cursor the click is AC's (unless a press that
|
||||
// began on this panel is still held, so a drag over an AC window isn't dropped).
|
||||
// began on this panel is still held, so a drag over an AC window isn't dropped). In portal space
|
||||
// AC's portal-space view covers the 3D view; AcMouseOver counts it as the world, not a window.
|
||||
bool underUi = spec.UnderUi && !popped;
|
||||
if (underUi && !clickThrough && !ImGuiNET.ImGui.IsMouseDown(ImGuiMouseButton.Left)
|
||||
&& Compatibility.AcMouseOver.Current() == Compatibility.AcMouseTarget.AcWindow)
|
||||
|
|
|
|||
|
|
@ -77,6 +77,8 @@ internal sealed class ChatFace : IImGuiPanel
|
|||
private bool _coloursDirty;
|
||||
/// <summary>The Chat history slider's value while it's held (0: not held).</summary>
|
||||
private int _historyEdit;
|
||||
/// <summary>The Player chat history slider's value while it's held (0: not held).</summary>
|
||||
private int _playerHistoryEdit;
|
||||
|
||||
public bool ClickThrough => ChatModel.CtrlGatedClickThrough && !ImGuiNET.ImGui.GetIO().KeyCtrl;
|
||||
|
||||
|
|
@ -391,8 +393,27 @@ internal sealed class ChatFace : IImGuiPanel
|
|||
_historyEdit = 0;
|
||||
}
|
||||
ImGuiNET.ImGui.SetItemTooltip("How many lines the chat keeps, all tabs together (default 2000).\n" +
|
||||
"About 2 MB of memory per 1000 lines. Lowering it drops the oldest lines.");
|
||||
"About 2 MB of memory per 1000 lines. Lowering it drops the oldest lines.\n" +
|
||||
"Player chat is kept longer: see Player chat history.");
|
||||
// Player chat kept past that (ChatHistory.MergeKeep), applied when let go like the one above.
|
||||
int playerHistory = _playerHistoryEdit > 0 ? _playerHistoryEdit : ChatModel.PlayerHistoryLines;
|
||||
if (ImGuiNET.ImGui.SliderInt("Player chat history", ref playerHistory, ChatHistory.MinPlayerLines, ChatHistory.MaxPlayerLines, "%d lines"))
|
||||
_playerHistoryEdit = ChatHistory.ClampPlayer(playerHistory);
|
||||
if (ImGuiNET.ImGui.IsItemDeactivated() && _playerHistoryEdit > 0)
|
||||
{
|
||||
ChatModel.SetPlayerHistoryLines(_playerHistoryEdit);
|
||||
_playerHistoryEdit = 0;
|
||||
}
|
||||
ImGuiNET.ImGui.SetItemTooltip("How many lines of player chat the chat keeps (default 5000): tells, say,\n" +
|
||||
"emotes, fellowship, allegiance and the channels. They stay this long even when\n" +
|
||||
"combat and system lines fill Chat history, in every tab that shows them.");
|
||||
ImGuiNET.ImGui.PopItemWidth();
|
||||
bool allChat = ChatModel.ChannelsAllPlayerChat;
|
||||
if (ImGuiNET.ImGui.Checkbox("Channels shows all player chat", ref allChat))
|
||||
ChatModel.SetChannelsAllPlayerChat(allChat);
|
||||
ImGuiNET.ImGui.SetItemTooltip("On: the Channels tab has every line players type: tells (yours too), say,\n" +
|
||||
"emotes, fellowship, allegiance and General / Trade / LFG and the other channels.\n" +
|
||||
"Off: only the channel lines; tells, say and the rest are under Chat.");
|
||||
|
||||
bool across = ChatModel.TabsAcross;
|
||||
if (ImGuiNET.ImGui.Checkbox("Tabs across the top", ref across))
|
||||
|
|
|
|||
|
|
@ -393,21 +393,7 @@ internal sealed class ChatView
|
|||
_seenLinesVersion = snap.Version;
|
||||
|
||||
// Drop lines the source no longer keeps, then add the new ones.
|
||||
long oldest = lines.Length > 0 ? lines[0].Id : long.MaxValue;
|
||||
int drop = 0;
|
||||
while (drop < _vis.Count && _vis[drop].Id < oldest) drop++;
|
||||
if (drop > 0 && !_selDragging)
|
||||
{
|
||||
if (!Following)
|
||||
for (int i = 0; i < drop; i++) _droppedAbove += _h[i];
|
||||
_vis.RemoveRange(0, drop);
|
||||
_h.RemoveRange(0, drop);
|
||||
_lay.RemoveRange(0, drop);
|
||||
_heightsFrom = Math.Max(0, _heightsFrom - drop);
|
||||
_measuredFrom = Math.Max(0, _measuredFrom - drop);
|
||||
if (_selAnchor >= 0) { _selAnchor -= drop; _selEnd -= drop; if (_selAnchor < 0 || _selEnd < 0) ClearSelection(); }
|
||||
_topsDirty = true;
|
||||
}
|
||||
if (!_selDragging) DropGone(lines);
|
||||
foreach (ChatLine line in lines)
|
||||
{
|
||||
if (line.Id <= _lastId) continue;
|
||||
|
|
@ -421,6 +407,65 @@ internal sealed class ChatView
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Takes out the shown lines the source no longer keeps. Until 2026-11-22 those were always the
|
||||
/// oldest (a prefix below the source's first Id). Since player chat is kept longer than the rest
|
||||
/// (ChatHistory.MergeKeep), the source can keep an old tell and drop the combat line after it,
|
||||
/// so the check is by Id, both lists in Id order: one walk, as long as the source.
|
||||
/// Scrolled up, the view moves up by the height of what left above it, so the lines being read
|
||||
/// stay put.
|
||||
/// </summary>
|
||||
private void DropGone(ChatLine[] lines)
|
||||
{
|
||||
int n = _vis.Count;
|
||||
if (n == 0) return;
|
||||
ChatHistory.FindGone(_vis, lines, LineId, _gone);
|
||||
if (_gone.Count == 0) return;
|
||||
int write = 0, g = 0;
|
||||
float y = 0f, viewTop = _lastScrollY;
|
||||
bool follow = Following, selGone = false;
|
||||
int selLo = Math.Min(_selAnchor, _selEnd), selHi = Math.Max(_selAnchor, _selEnd);
|
||||
int removedBeforeAnchor = 0, removedBeforeEnd = 0, removedBeforeHeights = 0, removedBeforeMeasured = 0;
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
float h = _h[i];
|
||||
if (g < _gone.Count && _gone[g] == i)
|
||||
{
|
||||
g++;
|
||||
if (!follow && y + h <= viewTop) _droppedAbove += h;
|
||||
if (_selAnchor >= 0)
|
||||
{
|
||||
if (i < _selAnchor) removedBeforeAnchor++;
|
||||
if (i < _selEnd) removedBeforeEnd++;
|
||||
if (i >= selLo && i <= selHi) selGone = true;
|
||||
}
|
||||
if (i < _heightsFrom) removedBeforeHeights++;
|
||||
if (i < _measuredFrom) removedBeforeMeasured++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (write != i) { _vis[write] = _vis[i]; _h[write] = h; _lay[write] = _lay[i]; }
|
||||
write++;
|
||||
}
|
||||
y += h;
|
||||
}
|
||||
int removed = n - write;
|
||||
_vis.RemoveRange(write, removed);
|
||||
_h.RemoveRange(write, removed);
|
||||
_lay.RemoveRange(write, removed);
|
||||
_heightsFrom = Math.Max(0, _heightsFrom - removedBeforeHeights);
|
||||
_measuredFrom = Math.Max(0, _measuredFrom - removedBeforeMeasured);
|
||||
if (_selAnchor >= 0)
|
||||
{
|
||||
if (selGone) ClearSelection();
|
||||
else { _selAnchor -= removedBeforeAnchor; _selEnd -= removedBeforeEnd; }
|
||||
}
|
||||
_topsDirty = true;
|
||||
}
|
||||
|
||||
private readonly List<int> _gone = new();
|
||||
private static readonly Func<ChatLine, long> LineId = l => l.Id;
|
||||
|
||||
/// <summary>The view follows the newest line (auto-scroll on and not scrolled away).</summary>
|
||||
private bool Following => ChatModel.AutoScroll && _stick;
|
||||
|
||||
|
|
|
|||
|
|
@ -130,12 +130,13 @@ internal sealed class ClassicLootTab : IClassicTab
|
|||
ImGuiNET.ImGui.SetCursorScreenPos(rp);
|
||||
if (ImGuiNET.ImGui.InvisibleButton("##row", new Vector2(listW - Px(22), rh))) _selected = i;
|
||||
if (ImGuiNET.ImGui.IsItemHovered() && !sel) dl.AddRectFilled(rp, p + new Vector2(listW, rh), Hover);
|
||||
SafeImGui.SetItemTooltip(rule.Name + "\n" + rule.Summary + (rule.Conditions > 0 ? $"\n{rule.Conditions} conditions" : ""));
|
||||
SafeImGui.SetItemTooltip(rule.Name + "\n" + rule.Summary + (rule.Conditions > 0 ? $"\n{rule.Conditions} conditions" : "")
|
||||
+ (rule.PerDayStatus.Length > 0 ? "\nKeep # per day: " + rule.PerDayStatus : ""));
|
||||
ImGuiNET.ImGui.PopID();
|
||||
float x = rp.X;
|
||||
uint badge = RynthTheme.Argb(LootEditVocabulary.BadgeArgb(rule.Action));
|
||||
dl.AddRectFilled(new Vector2(x, p.Y + Px(2)), new Vector2(x + badgeW - Px(4), p.Y + rh - Px(2)), badge, Px(2));
|
||||
TextClip(dl, x + Px(4), p.Y, rh, x + badgeW - Px(6), LootEditVocabulary.Badge(rule.Action, rule.KeepCount), White, 9);
|
||||
TextClip(dl, x + Px(4), p.Y, rh, x + badgeW - Px(6), LootEditVocabulary.Badge(rule.Action, rule.KeepCount, rule.PerDayHours), White, 9);
|
||||
x += badgeW;
|
||||
TextClip(dl, x, p.Y, rh, x + nameW - Px(4), rule.Name, rule.Enabled ? White : Faint, 10);
|
||||
x += nameW;
|
||||
|
|
|
|||
|
|
@ -73,6 +73,22 @@ internal sealed class ClassicRouteTab : IClassicTab
|
|||
y += fileH;
|
||||
}
|
||||
|
||||
// VirindiTank navs RynthAi found outside its NavProfiles folder (2026-11-22): one line; the
|
||||
// Nav panel says where they are and has the button that copies them in.
|
||||
if (nav != null && nav.StrayNavCount > 0 && !string.IsNullOrEmpty(nav.StrayNavText))
|
||||
{
|
||||
float hh = Px(16);
|
||||
string hint = nav.StrayNavCount == 1
|
||||
? "1 VirindiTank nav isn't in the list: the Nav panel copies it in"
|
||||
: $"{nav.StrayNavCount} VirindiTank navs aren't in the list: the Nav panel copies them in";
|
||||
ImGuiNET.ImGui.SetCursorScreenPos(new Vector2(o.X, y));
|
||||
if (ImGuiNET.ImGui.InvisibleButton("##cr_stray", new Vector2(w, hh)))
|
||||
PanelRouter.Toggle("Nav");
|
||||
SafeImGui.SetItemTooltip(nav.StrayNavText + "\nClick for the Nav panel and its Copy button.");
|
||||
TextMid(dl, o.X + Px(3), y, hh, hint, Amber, 10);
|
||||
y += hh;
|
||||
}
|
||||
|
||||
// Route type.
|
||||
{
|
||||
float gw = w / 4;
|
||||
|
|
|
|||
|
|
@ -660,7 +660,7 @@ internal sealed class LootEditorFace : IImGuiPanel
|
|||
|
||||
// Action badge
|
||||
const float badgeW = 64;
|
||||
string badge = LootEditVocabulary.Badge(r.Action, r.KeepCount);
|
||||
string badge = LootEditVocabulary.Badge(r.Action, r.KeepCount, r.PerDayHours);
|
||||
uint badgeCol = RynthTheme.Argb(LootEditVocabulary.BadgeArgb(r.Action));
|
||||
dl.AddRectFilled(new Vector2(x, p.Y + 3), new Vector2(x + badgeW, p.Y + RowH - 3), r.Enabled ? badgeCol : Faded(badgeCol), 3);
|
||||
ImFontPtr f9 = ImGuiFonts.Get(UiFont.Ui9);
|
||||
|
|
@ -715,7 +715,8 @@ internal sealed class LootEditorFace : IImGuiPanel
|
|||
{
|
||||
ImGuiNET.ImGui.SetMouseCursor(ImGuiMouseCursor.Hand);
|
||||
dl.AddRect(new Vector2(x - 2, p.Y), new Vector2(x + textW, p.Y + RowH), BtnBord, 2);
|
||||
SafeImGui.SetTooltip((r.Name.Length == 0 ? "(no name)" : r.Name) + "\n" + r.Summary);
|
||||
SafeImGui.SetTooltip((r.Name.Length == 0 ? "(no name)" : r.Name) + "\n" + r.Summary
|
||||
+ (r.PerDayStatus.Length > 0 ? "\nKeep # per day: " + r.PerDayStatus : string.Empty));
|
||||
}
|
||||
ImGuiNET.ImGui.PopID();
|
||||
|
||||
|
|
@ -825,6 +826,7 @@ internal sealed class LootEditorFace : IImGuiPanel
|
|||
_fields.Clear();
|
||||
_nameField.Shown = null;
|
||||
_keepField.Shown = null;
|
||||
_hoursField.Shown = null;
|
||||
}
|
||||
|
||||
private void Apply()
|
||||
|
|
@ -952,6 +954,10 @@ internal sealed class LootEditorFace : IImGuiPanel
|
|||
r.Enabled = !r.Enabled;
|
||||
NextLine(p, h + 8);
|
||||
|
||||
// Keep # per day (RynthAi 2026-11-22). Null from an older RynthAi: not offered.
|
||||
if (r.Action == LootEditVocabulary.KeepUpTo && r.PerDayHours != null)
|
||||
PerDayRows(r, w, ro, labelW, h);
|
||||
|
||||
// Conditions
|
||||
ImFontPtr bold = ImGuiFonts.Get(UiFont.UiBold11);
|
||||
p = ImGuiNET.ImGui.GetCursorScreenPos();
|
||||
|
|
@ -986,6 +992,103 @@ internal sealed class LootEditorFace : IImGuiPanel
|
|||
NextLine(p, h + 4);
|
||||
}
|
||||
|
||||
private const string PerDayTip =
|
||||
"Keep # per day: count what this character picked up, not what the pack holds.\n" +
|
||||
"For items with a pick-up timer that get used or sold (treasure maps, two a day).\n" +
|
||||
"Rolling window: each pickup frees its place that many hours after it was made.\n" +
|
||||
"Counted per character and server; the counts survive reloads and relogs. Also: /ra loot today\n" +
|
||||
"VTank skips the option and reads the rule as a plain Keep #.";
|
||||
|
||||
// The help line, built when the count or window changes (not every frame).
|
||||
private (int Count, int Hours) _perDayHelpKey = (-1, -1);
|
||||
private string _perDayHelp = string.Empty;
|
||||
private string _hoursText = "24";
|
||||
private int _hoursTextValue = -1;
|
||||
private readonly FieldBuffer _hoursField = new();
|
||||
|
||||
/// <summary>
|
||||
/// Keep # per day: [x] Per day in any [- 24 +] hours; a help line; today's count from RynthAi
|
||||
/// with Reset count (which only forgets this character's pickups: no profile edit).
|
||||
/// </summary>
|
||||
private void PerDayRows(LootEditRuleDto r, float w, bool ro, float labelW, float h)
|
||||
{
|
||||
var dl = ImGuiNET.ImGui.GetWindowDrawList();
|
||||
Vector2 p = ImGuiNET.ImGui.GetCursorScreenPos();
|
||||
float ty = p.Y + (h - ImGuiNET.ImGui.GetFontSize()) * 0.5f;
|
||||
int hours = r.PerDayHours ?? 0;
|
||||
bool on = hours > 0;
|
||||
float x = p.X + labelW;
|
||||
string box = (on ? PhosphorIcons.CheckSquare : PhosphorIcons.Square) + " Per day";
|
||||
float boxW = ButtonWidth(box);
|
||||
if (Button("##perday", box, new Vector2(x, p.Y), new Vector2(boxW, h), on ? Teal : Mute, BtnFill, !ro))
|
||||
{
|
||||
r.PerDayHours = on ? 0 : LootEditVocabulary.PerDayDefaultHours;
|
||||
_hoursField.Shown = null;
|
||||
}
|
||||
SafeImGui.SetItemTooltip(PerDayTip);
|
||||
x += boxW + 8;
|
||||
if (on)
|
||||
{
|
||||
dl.AddText(new Vector2(x, ty), Mute, "in any");
|
||||
x += ImGuiNET.ImGui.CalcTextSize("in any").X + 6;
|
||||
if (_hoursTextValue != hours || _hoursText.Length == 0)
|
||||
{
|
||||
_hoursTextValue = hours;
|
||||
_hoursText = hours.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
if (IconButton("##pd_dec", PhosphorIcons.Minus, new Vector2(x, p.Y), new Vector2(h, h), Teal, BtnFill,
|
||||
!ro && hours > LootEditVocabulary.PerDayMinHours, font: UiFont.Ui11))
|
||||
{ r.PerDayHours = Math.Max(LootEditVocabulary.PerDayMinHours, hours - 1); _hoursField.Shown = null; }
|
||||
x += h + 2;
|
||||
if (Field("##pd_hours", _hoursField, _hoursText, new Vector2(x, p.Y), 44, "24", ro, out string typed, h)
|
||||
&& int.TryParse(typed.Trim(), NumberStyles.Integer, CultureInfo.InvariantCulture, out int th) && th > 0)
|
||||
r.PerDayHours = Math.Clamp(th, LootEditVocabulary.PerDayMinHours, LootEditVocabulary.PerDayMaxHours);
|
||||
x += 46;
|
||||
if (IconButton("##pd_inc", PhosphorIcons.Plus, new Vector2(x, p.Y), new Vector2(h, h), Teal, BtnFill,
|
||||
!ro && hours < LootEditVocabulary.PerDayMaxHours, font: UiFont.Ui11))
|
||||
{ r.PerDayHours = Math.Min(LootEditVocabulary.PerDayMaxHours, hours + 1); _hoursField.Shown = null; }
|
||||
x += h + 6;
|
||||
dl.AddText(new Vector2(x, ty), Mute, "hours (24 = a day)");
|
||||
}
|
||||
else
|
||||
dl.AddText(new Vector2(x, ty), Mute, "off: counts what the pack holds");
|
||||
NextLine(p, h + 4);
|
||||
|
||||
// Help line (wrapped).
|
||||
if (_perDayHelpKey != (r.KeepCount, hours))
|
||||
{
|
||||
_perDayHelpKey = (r.KeepCount, hours);
|
||||
_perDayHelp = on
|
||||
? $"Loots at most {r.KeepCount.ToString(CultureInfo.InvariantCulture)} picked up in any {hours.ToString(CultureInfo.InvariantCulture)} h, counted per character; each pickup frees its place {hours.ToString(CultureInfo.InvariantCulture)} h after it was made. Over the count, matching items are left. VTank reads this rule as a plain Keep #."
|
||||
: "Per day counts what this character picked up instead of the pack, for items that get used or sold (treasure maps, two a day).";
|
||||
}
|
||||
p = ImGuiNET.ImGui.GetCursorScreenPos();
|
||||
ImGuiNET.ImGui.SetCursorScreenPos(new Vector2(p.X + labelW, p.Y));
|
||||
ImGuiNET.ImGui.PushTextWrapPos(ImGuiNET.ImGui.GetCursorPos().X + Math.Max(60, w - labelW));
|
||||
Label(_perDayHelp, Mute);
|
||||
ImGuiNET.ImGui.PopTextWrapPos();
|
||||
|
||||
// Today's count (the latest from RynthAi, even while this view has unapplied edits).
|
||||
string status = _ruleSeen?.PerDayStatus ?? r.PerDayStatus;
|
||||
if (on && (_editBase?.PerDayHours ?? 0) > 0 && status.Length > 0)
|
||||
{
|
||||
p = ImGuiNET.ImGui.GetCursorScreenPos();
|
||||
float sx = p.X + labelW;
|
||||
string reset = PhosphorIcons.ArrowCounterClockwise + " Reset count";
|
||||
float resetW = ButtonWidth(reset);
|
||||
float right = p.X + w - resetW;
|
||||
dl.PushClipRect(new Vector2(sx, p.Y), new Vector2(Math.Max(sx + 1, right - 6), p.Y + h), true);
|
||||
dl.AddText(new Vector2(sx, p.Y + (h - ImGuiNET.ImGui.GetFontSize()) * 0.5f), Teal, status);
|
||||
dl.PopClipRect();
|
||||
if (ImGuiNET.ImGui.IsMouseHoveringRect(new Vector2(sx, p.Y), new Vector2(right - 6, p.Y + h))) SafeImGui.SetTooltip(status);
|
||||
if (Button("##pd_reset", reset, new Vector2(right, p.Y), new Vector2(resetW, h), Text, BtnFill))
|
||||
LootEditCommands.Simple("perday_reset", _editIndex, expect: _expect);
|
||||
SafeImGui.SetItemTooltip("Forget this character's pickups for this rule (it counts from 0 again).\nThe profile is not changed. Also: /ra loot today clear <rule>");
|
||||
NextLine(p, h + 4);
|
||||
}
|
||||
ImGuiNET.ImGui.Dummy(new Vector2(0, 4));
|
||||
}
|
||||
|
||||
private static void FieldLabel(ImDrawListPtr dl, Vector2 p, float h, string text) =>
|
||||
dl.AddText(new Vector2(p.X, p.Y + (h - ImGuiNET.ImGui.GetFontSize()) * 0.5f), Mute, text);
|
||||
|
||||
|
|
|
|||
|
|
@ -125,6 +125,22 @@ internal sealed class NavFace : IImGuiPanel
|
|||
NextLine(p, 26);
|
||||
}
|
||||
|
||||
// VirindiTank navs in a folder the list doesn't show (RynthAi's StrayNavs, 2026-11-22: they
|
||||
// were put in RynthNav's NavData, "the nav folder"): where they are, and a button to copy them in.
|
||||
if (d.StrayNavCount > 0 && !string.IsNullOrEmpty(d.StrayNavText))
|
||||
{
|
||||
ImGuiNET.ImGui.PushTextWrapPos(ImGuiNET.ImGui.GetCursorPosX() + w);
|
||||
Label(d.StrayNavText, Amber);
|
||||
ImGuiNET.ImGui.PopTextWrapPos();
|
||||
p = ImGuiNET.ImGui.GetCursorScreenPos();
|
||||
string copyLabel = d.StrayNavCount == 1 ? "Copy it into NavProfiles" : $"Copy them into NavProfiles ({d.StrayNavCount})";
|
||||
if (Button("##straynavs", copyLabel, p, new Vector2(Math.Min(w, ButtonWidth(copyLabel) + 8), 22), Text, BtnFill))
|
||||
NavCommands.Send(new NavCmd { Cmd = "copyStrayNavs" });
|
||||
SafeImGui.SetItemTooltip("Copies them into RynthAi's NavProfiles folder, where the nav list shows them.\n" +
|
||||
"Never over a nav of the same name; the originals stay where they are (/ra nav import does the same).");
|
||||
NextLine(p, 26);
|
||||
}
|
||||
|
||||
// Active nav + status
|
||||
ImGuiNET.ImGui.PushFont(ImGuiFonts.Get(UiFont.UiBold11));
|
||||
Label(_activeLabel, Amber);
|
||||
|
|
|
|||
|
|
@ -351,9 +351,24 @@ internal sealed class RadarFace : IImGuiPanel
|
|||
if (anyName)
|
||||
{
|
||||
ImFontPtr nameFont = ImGuiFonts.Get(UiFont.UiBold11);
|
||||
// Monster names Up To (RadarSettingsStore.MonsterNamesUpTo): too many monsters on the picture, no monster names.
|
||||
bool monsterNames = true;
|
||||
if (RadarSettingsStore.MonsterNamesUpTo > 0 && markers.NameShown(RadarKind.Monster) && RadarSettingsStore.ShowKind(RadarKind.Monster))
|
||||
{
|
||||
int monsters = 0;
|
||||
foreach (RadarMarker m in live.Markers)
|
||||
{
|
||||
if (m.Kind != RadarKind.Monster) continue;
|
||||
Vector2 mp = proj.P(m.X, m.Y);
|
||||
if (_round ? _mask.Contains(mp) : (mp.X >= clipMin.X && mp.X <= clipMax.X && mp.Y >= clipMin.Y && mp.Y <= clipMax.Y))
|
||||
monsters++;
|
||||
}
|
||||
monsterNames = RadarSettingsStore.MonsterNamesFor(monsters);
|
||||
}
|
||||
foreach (RadarMarker m in live.Markers)
|
||||
{
|
||||
if (!markers.NameShown(m.Kind) || !RadarSettingsStore.ShowKind(m.Kind)) continue;
|
||||
if (m.Kind == RadarKind.Monster && !monsterNames) continue;
|
||||
if (m == _sel && RadarSettingsStore.ShowSelectedLabel) continue; // its label has the name
|
||||
Vector2 pp = proj.P(m.X, m.Y);
|
||||
if (pp.X < clipMin.X - 8 || pp.X > clipMax.X || pp.Y < clipMin.Y - 8 || pp.Y > clipMax.Y + 8) continue;
|
||||
|
|
@ -1071,6 +1086,20 @@ internal sealed class RadarFace : IImGuiPanel
|
|||
RadarSettingsStore.MinText, RadarSettingsStore.MaxText, "%.0f px", xText);
|
||||
changed |= MarkerStyleEditor.SliderRow("Coordinates", ref RadarSettingsStore.CoordSize,
|
||||
RadarSettingsStore.MinText, RadarSettingsStore.MaxText, "%.0f px", xText);
|
||||
// Monster names only while the radar isn't crowded (0 = always).
|
||||
ImGuiNET.ImGui.TextUnformatted("Monster names up to");
|
||||
ImGuiNET.ImGui.SameLine(xSize);
|
||||
ImGuiNET.ImGui.SetNextItemWidth(140 * scale);
|
||||
int upTo = RadarSettingsStore.MonsterNamesUpTo;
|
||||
if (ImGuiNET.ImGui.SliderInt("##mnupto", ref upTo, 0, RadarSettingsStore.MaxMonsterNamesUpTo,
|
||||
upTo == 0 ? "always" : "%d monsters"))
|
||||
{
|
||||
RadarSettingsStore.MonsterNamesUpTo = Math.Clamp(upTo, 0, RadarSettingsStore.MaxMonsterNamesUpTo);
|
||||
changed = true;
|
||||
}
|
||||
if (ImGuiNET.ImGui.IsItemHovered())
|
||||
ImGuiNET.ImGui.SetTooltip("With more monsters than this on the radar, their names are hidden (the markers stay);\n" +
|
||||
"0 = always show them. Other names (NPCs, players, portals...) are not affected.");
|
||||
// The picker reports every drag step: save once no colour edit is in progress.
|
||||
if (_colorDirty && !ImGuiNET.ImGui.IsAnyItemActive())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -136,10 +136,11 @@ internal sealed class RynthNavArrowFace : IImGuiPanel
|
|||
ImGuiPanelHost.Close(Title);
|
||||
ImGuiNET.ImGui.SetItemTooltip("Hide the arrow (the RynthNav panel's Arrow tab shows it again)");
|
||||
|
||||
// Bottom row: where to go, Plan, Go, Stop, the route's steps.
|
||||
// Bottom row: where to go, Plan, Go, Pause, Stop, the route's steps.
|
||||
var routePos = new Vector2(right - b, rowY);
|
||||
var stopPos = routePos - new Vector2(b + gap, 0);
|
||||
var goPos = stopPos - new Vector2(b + gap, 0);
|
||||
var pausePos = stopPos - new Vector2(b + gap, 0);
|
||||
var goPos = pausePos - new Vector2(b + gap, 0);
|
||||
var planPos = goPos - new Vector2(b + gap, 0);
|
||||
float inputX = origin.X + pad, inputW = planPos.X - gap - inputX;
|
||||
string typed = TypedTarget();
|
||||
|
|
@ -163,9 +164,15 @@ internal sealed class RynthNavArrowFace : IImGuiPanel
|
|||
if (typed.Length > 0) RynthNavCommands.Command("go " + typed);
|
||||
else if (st?.Arrow is RynthNavArrow ar) RynthNavCommands.Go(ar.Final, ar.FinalNs, ar.FinalEw);
|
||||
}
|
||||
bool walking = st?.Goto == true, paused = walking && st!.Paused;
|
||||
if (IconButton("##rna_pause", paused ? PhosphorIcons.Play : PhosphorIcons.Pause, pausePos, new Vector2(b, b), paused ? Amber : Text,
|
||||
paused ? Selected : BtnFill, enabled: walking, border: paused ? Amber : 0, font: UiFont.Ui11) && walking)
|
||||
RynthNavCommands.Command(paused ? "resume" : "pause");
|
||||
SafeImGui.SetItemTooltip(!walking ? "Pause: while RynthNav walks a trip, stop and keep the route on the map"
|
||||
: paused ? "Resume: carry on with the trip from here" : "Pause: stop walking and keep the route on the map (drive by hand meanwhile)");
|
||||
if (IconButton("##rna_stop", PhosphorIcons.Stop, stopPos, new Vector2(b, b), Red, BtnFill, font: UiFont.Ui11))
|
||||
RynthNavCommands.Move(5);
|
||||
ImGuiNET.ImGui.SetItemTooltip("Stop walking");
|
||||
ImGuiNET.ImGui.SetItemTooltip("Stop walking (ends the trip)");
|
||||
if (IconButton("##rna_route", _showRoute ? PhosphorIcons.CaretUp : PhosphorIcons.CaretDown, routePos, new Vector2(b, b), _showRoute ? Teal : Mute,
|
||||
_showRoute ? Selected : BtnFill, enabled: hasRoute, font: UiFont.Ui11))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -193,9 +193,12 @@ internal sealed class RynthNavFace : IImGuiPanel
|
|||
const float h = 22;
|
||||
bool walking = st?.Goto == true;
|
||||
bool stop = walking && _tab != TabGo;
|
||||
float textRight = p.X + w - (stop ? 26 : 6);
|
||||
bool paused = walking && st!.Paused;
|
||||
// Pause sits left of Stop while a goto runs, on every tab (the Go tab's own Stop is in its row).
|
||||
float pauseX = p.X + w - (stop ? 46 : 22);
|
||||
float textRight = walking ? pauseX - 4 : p.X + w - 6;
|
||||
dl.AddRectFilled(p, p + new Vector2(w, h), PanelBg, 3);
|
||||
uint col = st == null ? Mute : !walking ? Text
|
||||
uint col = st == null ? Mute : !walking ? Text : paused ? Amber
|
||||
: st.GoPhase == "portal" ? Purple : st.GoPhase == "recall" ? Amber : st.GoPhase == "town" ? Teal : RunGreen;
|
||||
dl.AddCircleFilled(p + new Vector2(9, h * 0.5f), 3.5f, walking ? col : Mute);
|
||||
string text = st == null ? "RynthNav isn't answering (is it loaded?)" : st.StatusLine.Length > 0 ? st.StatusLine : "ready";
|
||||
|
|
@ -206,11 +209,20 @@ internal sealed class RynthNavFace : IImGuiPanel
|
|||
ImGuiNET.ImGui.SetCursorScreenPos(p);
|
||||
ImGuiNET.ImGui.InvisibleButton("##rnav_status", new Vector2(Math.Max(1, textRight - p.X), h));
|
||||
if (text.Length > 40) SafeImGui.SetItemTooltip(text);
|
||||
if (walking)
|
||||
{
|
||||
if (IconButton("##rnav_status_pause", paused ? PhosphorIcons.Play : PhosphorIcons.Pause, new Vector2(pauseX, p.Y + 1), new Vector2(20, 20),
|
||||
paused ? Amber : Text, paused ? Selected : BtnFill, border: paused ? Amber : 0, font: UiFont.Ui11))
|
||||
RynthNavCommands.Command(paused ? "resume" : "pause");
|
||||
ImGuiNET.ImGui.SetItemTooltip(paused
|
||||
? "Resume: carry on with the trip from here (/rnav resume)"
|
||||
: "Pause: stop walking and keep the route on the map; drive by hand meanwhile (/rnav pause)");
|
||||
}
|
||||
if (stop)
|
||||
{
|
||||
if (IconButton("##rnav_status_stop", PhosphorIcons.Stop, new Vector2(p.X + w - 22, p.Y + 1), new Vector2(20, 20), Text, StopBg, font: UiFont.Ui11))
|
||||
RynthNavCommands.Move(5);
|
||||
ImGuiNET.ImGui.SetItemTooltip("Stop walking");
|
||||
ImGuiNET.ImGui.SetItemTooltip("Stop walking (ends the trip)");
|
||||
}
|
||||
NextLine(p, h + 6);
|
||||
}
|
||||
|
|
@ -497,6 +509,7 @@ internal sealed class RynthNavFace : IImGuiPanel
|
|||
ImGuiNET.ImGui.PushFont(ImGuiFonts.Get(UiFont.UiBold11));
|
||||
Wrapped(st.RouteHeader, Text, cw);
|
||||
ImGuiNET.ImGui.PopFont();
|
||||
DrawOtherWays(st, cw);
|
||||
var dl = ImGuiNET.ImGui.GetWindowDrawList();
|
||||
for (int i = 0; i < st.Route.Length && i < st.RouteLines.Length; i++)
|
||||
{
|
||||
|
|
@ -600,6 +613,7 @@ internal sealed class RynthNavFace : IImGuiPanel
|
|||
if (st.InfoTiles.Length > 0) InfoRow("Tiles", st.InfoTiles, iw);
|
||||
InfoRow("Route graph", st.InfoGraph, iw);
|
||||
InfoRow("Town Network", st.InfoTownNet, iw);
|
||||
if (st.InfoTimes.Length > 0) InfoRow("Trip times", st.InfoTimes, iw); // what the trip planner costs teleports with
|
||||
InfoRow("Atlas", st.InfoAtlas, iw);
|
||||
InfoRow("Navmesh", st.InfoStatus, iw);
|
||||
}
|
||||
|
|
@ -767,6 +781,29 @@ internal sealed class RynthNavFace : IImGuiPanel
|
|||
/// Below the route: a name (the place's, to start with) and Save, which writes the trip as a
|
||||
/// RynthAi nav route into NavProfiles (/rnav saveroute). A name already taken: Replace.
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Another way (RynthNav from 11-19): the next of the ways there, cheapest first; a goto under way
|
||||
/// switches to it. Go this way walks the way shown (Go on the place plans the way chosen too).
|
||||
/// </summary>
|
||||
private static void DrawOtherWays(RynthNavStatus st, float cw)
|
||||
{
|
||||
if (st.RouteWays <= 1) return;
|
||||
Vector2 p = ImGuiNET.ImGui.GetCursorScreenPos();
|
||||
float bw = st.RouteActive ? cw : (cw - 4) * 0.5f;
|
||||
if (Button("##route_next", PhosphorIcons.ArrowRight + " Another way", p, new Vector2(bw, 22), Teal, BtnFill))
|
||||
RynthNavCommands.Command("route next");
|
||||
SafeImGui.SetItemTooltip($"Way {st.RouteWay} of {st.RouteWays}, cheapest first. Shows the next way there"
|
||||
+ (st.RouteActive ? ", and the walk switches to it." : "; Go this way walks it.")
|
||||
+ "\nEach leaves out a portal or recall the ways before it took.");
|
||||
if (!st.RouteActive)
|
||||
{
|
||||
if (Button("##route_go", PhosphorIcons.PersonSimpleRun + " Go this way", new Vector2(p.X + bw + 4, p.Y), new Vector2(bw, 22), Text, BtnFill))
|
||||
RynthNavCommands.Command("route go");
|
||||
SafeImGui.SetItemTooltip("Walk to " + st.RouteFor + " this way");
|
||||
}
|
||||
NextLine(p, 26);
|
||||
}
|
||||
|
||||
private void DrawSaveRoute(RynthNavStatus st, float cw)
|
||||
{
|
||||
if (!st.HasSave || !st.CanSave) return;
|
||||
|
|
|
|||
|
|
@ -4,14 +4,20 @@
|
|||
// the client knows about anywhere (not just in radar range) whose name
|
||||
// matches shows up here. Engine only, ImGui only.
|
||||
//
|
||||
// add row a text box (Enter adds), Add, the settings gear, the help mark
|
||||
// terms one chip per term: click it to switch it on/off, X removes it
|
||||
// add row a text box (Enter adds), Add, Add selected (the crosshair: the
|
||||
// selected object's name), Import (the file icon: Virindi Sense's
|
||||
// list, Documents\Decal Plugins\Virindi Sense\patterns.txt), the
|
||||
// look buttons, the settings gear, the help mark (2026-11-22)
|
||||
// terms one chip per term: click it to switch it on/off, X removes it;
|
||||
// past four rows of chips they scroll in a box (an imported list
|
||||
// can be a few hundred names). An empty list offers the import.
|
||||
// status how many matches among how many known objects (or why none)
|
||||
// rows direction arrow (relative to where you face), name, kind,
|
||||
// distance, compass point, map coordinates; nearest first; a new
|
||||
// match flashes. Click selects it in game, hover for details.
|
||||
// gear a chat line and/or the system beep when a new match appears
|
||||
// (both off by default; they work with the panel closed).
|
||||
// (both off by default; they work with the panel closed), and
|
||||
// Remove all names (two clicks).
|
||||
//
|
||||
// Compact (2026-10-31, the owner: "we should make a small version of it"; in
|
||||
// item-counter.lua's spirit): only the match rows, tighter, and docked no
|
||||
|
|
@ -38,6 +44,7 @@
|
|||
|
||||
using System;
|
||||
using System.Numerics;
|
||||
using System.Threading;
|
||||
using ImGuiNET;
|
||||
using RynthCore.Engine.Compatibility;
|
||||
using RynthCore.Engine.UI.Data;
|
||||
|
|
@ -77,6 +84,8 @@ internal sealed class SenseFace : IImGuiPanel
|
|||
"The distance shows when you and the object are both outdoors (or in surface buildings), or in the same dungeon. " +
|
||||
"Otherwise the row says elsewhere and gives the landblock.\n\n" +
|
||||
"Click a row to select it in game. Gear: a chat line or a beep when a new match appears.\n" +
|
||||
"The crosshair adds the selected monster's or item's name. The file icon imports your Virindi Sense list " +
|
||||
"(Documents\\Decal Plugins\\Virindi Sense\\patterns.txt).\n" +
|
||||
"The arrows-in button (or /rc sense compact on) shows just the matches, without the frame.\n" +
|
||||
"/rc sense opens and closes this panel.";
|
||||
|
||||
|
|
@ -87,6 +96,7 @@ internal sealed class SenseFace : IImGuiPanel
|
|||
private long _messageUntilMs;
|
||||
private bool _openSettings;
|
||||
private bool _flashing;
|
||||
private long _clearArmedUntilMs;
|
||||
|
||||
// Compact / collapsed: the mouse is over what the last frame drew (rows, the line, the
|
||||
// buttons), so the window takes input; elsewhere it lets clicks through. A press that began
|
||||
|
|
@ -121,6 +131,7 @@ internal sealed class SenseFace : IImGuiPanel
|
|||
|
||||
private void DrawFull()
|
||||
{
|
||||
TakePendingMessage();
|
||||
float w = Begin(out Vector2 origin, out Vector2 size);
|
||||
DrawAddRow(w);
|
||||
DrawTerms(w);
|
||||
|
|
@ -151,7 +162,7 @@ internal sealed class SenseFace : IImGuiPanel
|
|||
const float h = 22, iconW = 22;
|
||||
string addLabel = PhosphorIcons.Plus + " Add";
|
||||
float addW = ButtonWidth(addLabel);
|
||||
float boxW = Math.Max(60, w - addW - iconW * 4 - 20);
|
||||
float boxW = Math.Max(60, w - addW - iconW * 6 - 28);
|
||||
|
||||
bool enter = TextBox("##sense_input", _input, start, boxW,
|
||||
PhosphorIcons.MagnifyingGlass + " Name to watch for (* and ? wildcards)", out _,
|
||||
|
|
@ -162,6 +173,25 @@ internal sealed class SenseFace : IImGuiPanel
|
|||
if (enter || add) AddTerm();
|
||||
|
||||
float gx = start.X + boxW + 4 + addW + 4;
|
||||
// Add selected (2026-11-22): the selected monster's or item's name onto the list.
|
||||
bool haveSel = SenseStore.Loaded && ClientHelperHooks.GetSelectedItemId() != 0;
|
||||
if (IconButton("##sense_addsel", PhosphorIcons.Crosshair, new Vector2(gx, start.Y), new Vector2(iconW, h), Text, BtnFill,
|
||||
enabled: haveSel))
|
||||
{
|
||||
bool ok = SenseStore.AddSelected(out string message);
|
||||
ShowMessage(message, ok ? Mute : Amber);
|
||||
}
|
||||
SafeImGui.SetItemTooltip(haveSel
|
||||
? "Add selected: watch for the selected object's name (/rc sense addselected)"
|
||||
: "Add selected: select a monster or an item in game, then click here to watch for its name");
|
||||
gx += iconW + 4;
|
||||
// Import Virindi Sense's list (Documents\Decal Plugins\Virindi Sense\patterns.txt).
|
||||
if (IconButton("##sense_import", PhosphorIcons.FilePlus, new Vector2(gx, start.Y), new Vector2(iconW, h), Text, BtnFill,
|
||||
enabled: SenseStore.Loaded))
|
||||
ImportVirindiSense();
|
||||
SafeImGui.SetItemTooltip(_importTip ??= "Import your Virindi Sense list: its names are added here, switched on\n" +
|
||||
"(from " + SenseStore.VirindiSensePath + "; names already here are left alone).\n/rc sense import [file] does the same.");
|
||||
gx += iconW + 4;
|
||||
// The view switch: compact, then collapsed (one line).
|
||||
if (IconButton("##sense_compact", PhosphorIcons.ArrowsInLineVertical, new Vector2(gx, start.Y), new Vector2(iconW, h), Text, BtnFill,
|
||||
enabled: SenseStore.Loaded))
|
||||
|
|
@ -196,11 +226,29 @@ internal sealed class SenseFace : IImGuiPanel
|
|||
ShowMessage(message, ok ? Mute : Amber);
|
||||
}
|
||||
|
||||
private void ShowMessage(string text, uint color)
|
||||
private void ShowMessage(string text, uint color, long ms = 3000)
|
||||
{
|
||||
_message = text;
|
||||
_messageColor = color;
|
||||
_messageUntilMs = Environment.TickCount64 + 3000;
|
||||
_messageUntilMs = Environment.TickCount64 + ms;
|
||||
}
|
||||
|
||||
/// <summary>The import button (and the empty list's): reads the list off this thread; the line shows when it's done.</summary>
|
||||
private void ImportVirindiSense()
|
||||
{
|
||||
ShowMessage("Reading the Virindi Sense list...", Mute);
|
||||
SenseStore.ImportVirindiSense(null, (text, ok) => Volatile.Write(ref _pendingMessage, new PendingMessage(text, ok)));
|
||||
}
|
||||
|
||||
private sealed record PendingMessage(string Text, bool Ok);
|
||||
|
||||
// Set by the import's background thread, shown by the next frame.
|
||||
private PendingMessage? _pendingMessage;
|
||||
|
||||
private void TakePendingMessage()
|
||||
{
|
||||
PendingMessage? m = Interlocked.Exchange(ref _pendingMessage, null);
|
||||
if (m != null) ShowMessage(m.Text, m.Ok ? Mute : Amber, 8000);
|
||||
}
|
||||
|
||||
// ── Terms ───────────────────────────────────────────────────────────
|
||||
|
|
@ -215,20 +263,41 @@ internal sealed class SenseFace : IImGuiPanel
|
|||
SensePattern[] terms = SenseStore.Terms;
|
||||
if (terms.Length == 0)
|
||||
{
|
||||
Label("No names yet: type one above and press Enter.", Mute);
|
||||
Label("No names yet: type one above and press Enter, or select something and use the crosshair.", Mute);
|
||||
// Coming from Virindi Sense: its list in one click (the file icon above does the same).
|
||||
Vector2 bp = ImGuiNET.ImGui.GetCursorScreenPos();
|
||||
string label = PhosphorIcons.FilePlus + " Import my Virindi Sense list";
|
||||
if (Button("##sense_import_empty", label, bp, new Vector2(Math.Min(w, ButtonWidth(label) + 8), 22), Text, BtnFill))
|
||||
ImportVirindiSense();
|
||||
SafeImGui.SetItemTooltip(_importTip ??= "Import your Virindi Sense list: its names are added here, switched on\n" +
|
||||
"(from " + SenseStore.VirindiSensePath + "; names already here are left alone).\n/rc sense import [file] does the same.");
|
||||
NextLine(bp, 26);
|
||||
return;
|
||||
}
|
||||
|
||||
const float iconW = 18, xW = 16;
|
||||
float[] textWidths = ChipTextWidths(terms);
|
||||
|
||||
// A long list (an imported one can be a few hundred names) scrolls in a box of a few rows,
|
||||
// so the matches below keep their room.
|
||||
float needed = ChipsHeight(textWidths, w, iconW, xW);
|
||||
bool scroll = needed > MaxChipRows * (ChipH + 4);
|
||||
if (scroll)
|
||||
{
|
||||
ImGuiNET.ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(0, 0));
|
||||
ImGuiNET.ImGui.BeginChild("##sense_terms", new Vector2(w, MaxChipRows * (ChipH + 4)));
|
||||
w = ImGuiNET.ImGui.GetContentRegionAvail().X; // the scrollbar's width comes off
|
||||
}
|
||||
|
||||
var dl = ImGuiNET.ImGui.GetWindowDrawList();
|
||||
ImFontPtr iconFont = ImGuiFonts.Get(UiFont.Ui11);
|
||||
Vector2 start = ImGuiNET.ImGui.GetCursorScreenPos();
|
||||
float x = start.X, y = start.Y;
|
||||
const float iconW = 18, xW = 16;
|
||||
int toggle = -1, remove = -1;
|
||||
for (int i = 0; i < terms.Length; i++)
|
||||
{
|
||||
SensePattern t = terms[i];
|
||||
float textW = ImGuiNET.ImGui.CalcTextSize(t.Text).X;
|
||||
float textW = textWidths[i];
|
||||
float chipW = Math.Min(w, iconW + textW + 6 + xW);
|
||||
if (x > start.X && x + chipW > start.X + w) { x = start.X; y += ChipH + 4; }
|
||||
var p = new Vector2(x, y);
|
||||
|
|
@ -262,6 +331,12 @@ internal sealed class SenseFace : IImGuiPanel
|
|||
x += chipW + 4;
|
||||
}
|
||||
NextLine(start, y - start.Y + ChipH + 4);
|
||||
if (scroll)
|
||||
{
|
||||
ImGuiNET.ImGui.EndChild();
|
||||
ImGuiNET.ImGui.PopStyleVar();
|
||||
Label($"{terms.Length} names (scroll for more)", Faded(Mute));
|
||||
}
|
||||
|
||||
if (toggle >= 0) SenseStore.SetEnabled(toggle, !terms[toggle].Enabled);
|
||||
if (remove >= 0)
|
||||
|
|
@ -271,6 +346,42 @@ internal sealed class SenseFace : IImGuiPanel
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>Rows of term chips shown before the chips scroll.</summary>
|
||||
private const int MaxChipRows = 4;
|
||||
|
||||
// The chips' text widths, measured once per list (and text size), not every frame.
|
||||
private SensePattern[]? _widthsFor;
|
||||
private float _widthsFontSize;
|
||||
private float[] _chipTextW = Array.Empty<float>();
|
||||
private string? _importTip;
|
||||
|
||||
private float[] ChipTextWidths(SensePattern[] terms)
|
||||
{
|
||||
float fs = ImGuiNET.ImGui.GetFontSize();
|
||||
if (!ReferenceEquals(terms, _widthsFor) || fs != _widthsFontSize)
|
||||
{
|
||||
var widths = new float[terms.Length];
|
||||
for (int i = 0; i < terms.Length; i++) widths[i] = ImGuiNET.ImGui.CalcTextSize(terms[i].Text).X;
|
||||
_chipTextW = widths;
|
||||
_widthsFor = terms;
|
||||
_widthsFontSize = fs;
|
||||
}
|
||||
return _chipTextW;
|
||||
}
|
||||
|
||||
/// <summary>How tall the chips are at width <paramref name="w"/> (the same wrapping as DrawTerms).</summary>
|
||||
private static float ChipsHeight(float[] textWidths, float w, float iconW, float xW)
|
||||
{
|
||||
float x = 0, y = 0;
|
||||
foreach (float tw in textWidths)
|
||||
{
|
||||
float chipW = Math.Min(w, iconW + tw + 6 + xW);
|
||||
if (x > 0 && x + chipW > w) { x = 0; y += ChipH + 4; }
|
||||
x += chipW + 4;
|
||||
}
|
||||
return y + ChipH + 4;
|
||||
}
|
||||
|
||||
// ── Status and header ───────────────────────────────────────────────
|
||||
|
||||
private void DrawStatus(SenseView view)
|
||||
|
|
@ -681,6 +792,25 @@ internal sealed class SenseFace : IImGuiPanel
|
|||
ImGuiNET.ImGui.SetItemTooltip("Windows' default sound, at most every 3 seconds.");
|
||||
Label("Alerts keep working with the panel closed.", Faded(Mute));
|
||||
Label("Saved in %LocalAppData%\\RynthCore\\sense.txt", Faded(Mute));
|
||||
|
||||
// Remove every name (an imported list is long to take apart chip by chip): two clicks.
|
||||
int count = SenseStore.Terms.Length;
|
||||
if (count > 0)
|
||||
{
|
||||
ImGuiNET.ImGui.Spacing();
|
||||
bool armed = _clearArmedUntilMs > Environment.TickCount64;
|
||||
if (ImGuiNET.ImGui.Button(armed ? $"Click again to remove all {count}" : "Remove all names"))
|
||||
{
|
||||
if (armed)
|
||||
{
|
||||
SenseStore.Clear();
|
||||
_clearArmedUntilMs = 0;
|
||||
ShowMessage($"Removed all {count} names.", Mute);
|
||||
}
|
||||
else _clearArmedUntilMs = Environment.TickCount64 + 4000;
|
||||
}
|
||||
ImGuiNET.ImGui.SetItemTooltip("Empties the watch list (asks once more first).");
|
||||
}
|
||||
ImGuiNET.ImGui.EndPopup();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,9 +62,22 @@ internal sealed class SettingsFace : IImGuiPanel
|
|||
public void OnHidden()
|
||||
{
|
||||
UiSources.Settings.Unsubscribe();
|
||||
SetDashboardFeed(false);
|
||||
_rows.LeaveHotkeys();
|
||||
}
|
||||
|
||||
private const string LootingTab = "Looting";
|
||||
private bool _dashboardFeed;
|
||||
|
||||
/// <summary>Subscribes (once) to RynthAi's dashboard snapshot, or lets it go.</summary>
|
||||
private void SetDashboardFeed(bool on)
|
||||
{
|
||||
if (on == _dashboardFeed) return;
|
||||
_dashboardFeed = on;
|
||||
if (on) { UiSources.RynthAi.Subscribe(); UiSources.RynthAi.RequestRefresh(); }
|
||||
else UiSources.RynthAi.Unsubscribe();
|
||||
}
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
// Take a newer fetch unless a value is being typed in.
|
||||
|
|
@ -178,6 +191,9 @@ internal sealed class SettingsFace : IImGuiPanel
|
|||
|
||||
SettingRow[] rows = SettingsSchema.Tabs[_tab].Rows;
|
||||
if (SettingsSchema.Tabs[_tab].Name != HotkeysSettingsUi.TabName) _rows.LeaveHotkeys();
|
||||
// Looting's Loot Profile row lists RynthAi's loot profiles from the dashboard snapshot: keep it
|
||||
// polled while that tab shows, even with the dashboard closed.
|
||||
SetDashboardFeed(SettingsSchema.Tabs[_tab].Name == LootingTab);
|
||||
for (int i = 0; i < rows.Length; i++)
|
||||
{
|
||||
SettingRow row = rows[i];
|
||||
|
|
|
|||
|
|
@ -18,7 +18,9 @@
|
|||
// PlayerTraining.Raise(defer) queues it for AC's main thread outside the
|
||||
// ImGui frame; raise buttons stay locked until the new values arrive (or 5 s
|
||||
// pass: then the panel says the server hasn't taken it). Train (skill
|
||||
// credits) always asks first.
|
||||
// credits) always asks first. In portal space (a death, the 5 s after
|
||||
// landing) the raise is held and sent once it ends; the panel says
|
||||
// "Queued" meanwhile and the 5 s start then.
|
||||
// - Aelrynth only (ServerInfo.IsAelrynth): skill mastery from the SkillMastery
|
||||
// mod's /mastery-data reply (MasteryFeed). A crown badge with the mastery
|
||||
// points on trained rows that have any; the open row shows points, bonus,
|
||||
|
|
@ -167,6 +169,7 @@ internal sealed partial class SkillsFace : IImGuiPanel
|
|||
private bool _confirmOpenRequested;
|
||||
private Vector2 _confirmAt;
|
||||
private bool _pending;
|
||||
private const long PendingMs = 5000; // the wait for the server's answer to a raise or a train
|
||||
private long _pendingUntilMs;
|
||||
private long _pendingUnassigned;
|
||||
private int _pendingCredits;
|
||||
|
|
@ -359,6 +362,9 @@ internal sealed partial class SkillsFace : IImGuiPanel
|
|||
|
||||
if (_pending)
|
||||
{
|
||||
// Portal space, a death, the seconds after landing: the raise waits in AcMainThreadQueue
|
||||
// until then, so the 5 s wait for the answer starts once it is let go.
|
||||
_pendingUntilMs = WorldTransitionState.HoldDeadline(_pendingUntilMs, now, PlayerLifecycleLog.InWorldTransition, PendingMs);
|
||||
if (snap != null && snap.Version != _pendingVersion
|
||||
&& (snap.UnassignedXp != _pendingUnassigned || snap.SkillCredits != _pendingCredits))
|
||||
_pending = false;
|
||||
|
|
@ -764,11 +770,14 @@ internal sealed partial class SkillsFace : IImGuiPanel
|
|||
x += tw + 14;
|
||||
}
|
||||
long now = Environment.TickCount64;
|
||||
string status = _pending ? "Sent... waiting for the server" : now < _statusUntilMs ? _status : "";
|
||||
// In portal space (a death, the seconds after landing) the raise is held, not lost: say so.
|
||||
bool held = _pending && PlayerLifecycleLog.InWorldTransition;
|
||||
string status = held ? "Queued: it goes to the server a few seconds after you land."
|
||||
: _pending ? "Sent... waiting for the server" : now < _statusUntilMs ? _status : "";
|
||||
if (status.Length > 0)
|
||||
{
|
||||
y += lineH + 2;
|
||||
dl.AddText(new Vector2(start.X, y), _pending ? Teal : _statusColor, status);
|
||||
dl.AddText(new Vector2(start.X, y), held ? Amber : _pending ? Teal : _statusColor, status);
|
||||
}
|
||||
else if ((!PlayerTraining.Available || !PlayerTraining.TrainAvailable) && _snap != null)
|
||||
{
|
||||
|
|
@ -1500,7 +1509,7 @@ internal sealed partial class SkillsFace : IImGuiPanel
|
|||
private void MarkPending(PlayerProgress s, Row? raised, long cost)
|
||||
{
|
||||
_pending = true;
|
||||
_pendingUntilMs = Environment.TickCount64 + 5000;
|
||||
_pendingUntilMs = Environment.TickCount64 + PendingMs;
|
||||
_pendingUnassigned = s.UnassignedXp;
|
||||
_pendingCredits = s.SkillCredits;
|
||||
_pendingVersion = s.Version;
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ internal sealed class WorldMapFace : IImGuiPanel
|
|||
CharacterRow[]? chars = WorldMapSettings.Characters ? UiSources.Characters.Current?.Value?.Rows : null;
|
||||
|
||||
Vector2 barPos = ImGuiNET.ImGui.GetCursorScreenPos();
|
||||
float canvasTop = DrawToolbar(barPos, w, pl.Known);
|
||||
float canvasTop = DrawToolbar(barPos, w, pl.Known, st);
|
||||
var canvasMin = new Vector2(origin.X + 1, canvasTop);
|
||||
var canvasMax = new Vector2(origin.X + size.X - 1, origin.Y + size.Y - 1);
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ internal sealed class WorldMapFace : IImGuiPanel
|
|||
}
|
||||
|
||||
// ── Toolbar ──────────────────────────────────────────────────────────
|
||||
private float DrawToolbar(Vector2 pos, float width, bool canFollow)
|
||||
private float DrawToolbar(Vector2 pos, float width, bool canFollow, RynthNavStatus? st)
|
||||
{
|
||||
float x = pos.X, y = pos.Y;
|
||||
const float h = 22f;
|
||||
|
|
@ -172,6 +172,21 @@ internal sealed class WorldMapFace : IImGuiPanel
|
|||
var showMenuAt = new Vector2(x, y + h + 2);
|
||||
x += 50;
|
||||
|
||||
// While RynthNav walks a trip: Pause (the route stays drawn; drive by hand) / Resume, and Stop.
|
||||
if (st?.Goto == true)
|
||||
{
|
||||
bool paused = st.Paused;
|
||||
if (IconButton("##wm_pause", paused ? PhosphorIcons.Play : PhosphorIcons.Pause, new Vector2(x, y), new Vector2(24, h),
|
||||
paused ? Amber : Text, paused ? Selected : BtnFill, border: paused ? Amber : 0, font: UiFont.Ui11))
|
||||
RynthNavCommands.Command(paused ? "resume" : "pause");
|
||||
SafeImGui.SetItemTooltip(paused ? "Resume the trip from here" : "Pause the trip: stop walking, keep the route on the map");
|
||||
x += 28;
|
||||
if (IconButton("##wm_stop", PhosphorIcons.Stop, new Vector2(x, y), new Vector2(24, h), Text, StopBg, font: UiFont.Ui11))
|
||||
RynthNavCommands.Move(5);
|
||||
SafeImGui.SetItemTooltip("Stop walking (ends the trip)");
|
||||
x += 28;
|
||||
}
|
||||
|
||||
ImGuiNET.ImGui.SetNextWindowPos(showMenuAt);
|
||||
if (ImGuiNET.ImGui.BeginPopup("##wm_show_pop"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ internal static unsafe class PhosphorIcons
|
|||
public const string Path = "\uE39C";
|
||||
public const string PencilSimple = "\uE3B4";
|
||||
public const string PersonSimpleRun = "\uE730";
|
||||
public const string Pause = "\uE39E";
|
||||
public const string Play = "\uE3D0";
|
||||
public const string Package = "\uE390";
|
||||
public const string Plus = "\uE3D4";
|
||||
|
|
@ -173,6 +174,7 @@ internal static unsafe class PhosphorIcons
|
|||
+ Binoculars + Crown + Sun
|
||||
+ CastleTurret + ClockCounterClockwise + GlobeHemisphereWest + Path + Star + Target + User
|
||||
+ TextAa + Leaf + Keyboard
|
||||
+ Pause + PersonSimpleRun
|
||||
+ PushPin + SlidersHorizontal + Wrench
|
||||
+ Scroll
|
||||
+ Moon;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,10 @@
|
|||
// (ac_window.<server-character>.txt) and put its POSITION back once after login.
|
||||
// Since 2026-11-15 (report R-20261115-160655-1201) never its size, and a rect is
|
||||
// saved only in the world once it held for 30 s: see AcWindowChromePolicy.
|
||||
// Since 2026-11-21 the window's size is AC's resolution (its D3D back buffer, read in
|
||||
// Tick): a client area that is not that size is resized to it at the restore, a saved
|
||||
// size that differs is ignored (one log line), and a stretched window is never saved.
|
||||
// Borderless windowed keeps the client area where it is (outer = client).
|
||||
// While this is on, the launcher leaves the window's position to the engine.
|
||||
// Original: SilentKelpie (RynthCore PR 6). Decisions live in AcWindowChromePolicy.
|
||||
//
|
||||
|
|
@ -37,6 +41,7 @@ namespace RynthCore.Engine.UI;
|
|||
internal static class AcWindowChrome
|
||||
{
|
||||
private const int GwlStyle = -16;
|
||||
private const int GwlExStyle = -20;
|
||||
|
||||
private const uint SwpNosize = 0x0001;
|
||||
private const uint SwpNomove = 0x0002;
|
||||
|
|
@ -71,11 +76,15 @@ internal static class AcWindowChrome
|
|||
private static Rect? _reference;
|
||||
private static bool _referenceSet;
|
||||
private static AcWindowPlacementRule.Pending? _pending;
|
||||
// AC's back-buffer size as (width << 32) | height, 0 = unknown; written by Tick on the render thread.
|
||||
private static long _drawSize;
|
||||
// The last stretched rect the save refused, so it is logged once (under Sync).
|
||||
private static (Size Client, Size Draw)? _refusedLogged;
|
||||
|
||||
// ── Frame loop (EndScene): reads + posts only ────────────────────────
|
||||
|
||||
/// <summary>Call from the frame loop; throttled. Never changes the window itself.</summary>
|
||||
public static void Tick(IntPtr hwnd)
|
||||
/// <summary>Call from the frame loop (EndScene, with AC's device); throttled. Never changes the window itself.</summary>
|
||||
public static void Tick(IntPtr hwnd, IntPtr device)
|
||||
{
|
||||
if (hwnd == IntPtr.Zero) return;
|
||||
long now = Environment.TickCount64;
|
||||
|
|
@ -85,6 +94,12 @@ internal static class AcWindowChrome
|
|||
|
||||
try
|
||||
{
|
||||
// AC's resolution, for the window's size (2026-11-21): the back buffer it draws into. Read
|
||||
// here because the device belongs to the render thread; the game thread uses the copy.
|
||||
if (EngineSettings.RememberAcWindowPosition)
|
||||
Interlocked.Exchange(ref _drawSize,
|
||||
ImGuiBackend.DX9Backend.TryGetBackBufferSize(device, out int bw, out int bh) ? ((long)bw << 32) | (uint)bh : 0);
|
||||
|
||||
if (!ImGuiBackend.Win32Backend.CanRunOnGameThread)
|
||||
{
|
||||
// No WndProc subclass to run window changes from: stay out of the window.
|
||||
|
|
@ -173,15 +188,13 @@ internal static class AcWindowChrome
|
|||
switch (d.Action)
|
||||
{
|
||||
case ChromeAction.Strip:
|
||||
SetWindowLong(hwnd, GwlStyle, d.NewStyle);
|
||||
SetProp(hwnd, StyleProp, new IntPtr(d.NewMarker));
|
||||
Refresh(hwnd);
|
||||
SetStyleKeepingClient(hwnd, d.NewStyle);
|
||||
RynthLog.UI("AcWindowChrome: borderless windowed on.");
|
||||
break;
|
||||
case ChromeAction.Restore:
|
||||
SetWindowLong(hwnd, GwlStyle, d.NewStyle);
|
||||
RemoveProp(hwnd, StyleProp);
|
||||
Refresh(hwnd);
|
||||
SetStyleKeepingClient(hwnd, d.NewStyle);
|
||||
RynthLog.UI("AcWindowChrome: window borders restored.");
|
||||
break;
|
||||
case ChromeAction.ClearMarker:
|
||||
|
|
@ -196,6 +209,38 @@ internal static class AcWindowChrome
|
|||
=> SetWindowPos(hwnd, IntPtr.Zero, 0, 0, 0, 0,
|
||||
SwpNomove | SwpNosize | SwpNozorder | SwpNoactivate | SwpFramechanged);
|
||||
|
||||
/// <summary>
|
||||
/// Sets a new style and keeps the client area (AC's picture) the same size in the same place
|
||||
/// (2026-11-21): borderless, the outer rect becomes the client rect (no frame, outer = client);
|
||||
/// with the chrome back, the frame grows around it again. Keeping the outer rect instead, as
|
||||
/// before, grew or shrank the client area by the frame, so AC stretched its picture by a few
|
||||
/// pixels and the overlay was off by as much. Minimised or maximised: the style only.
|
||||
/// </summary>
|
||||
private static void SetStyleKeepingClient(IntPtr hwnd, int newStyle)
|
||||
{
|
||||
RECT client = default;
|
||||
bool keep = !IsIconic(hwnd) && !IsZoomed(hwnd) && GetClientRect(hwnd, out client);
|
||||
var origin = new POINT();
|
||||
keep = keep && ClientToScreen(hwnd, ref origin);
|
||||
SetWindowLong(hwnd, GwlStyle, newStyle);
|
||||
if (keep)
|
||||
{
|
||||
var outer = new RECT
|
||||
{
|
||||
Left = origin.X, Top = origin.Y,
|
||||
Right = origin.X + (client.Right - client.Left), Bottom = origin.Y + (client.Bottom - client.Top),
|
||||
};
|
||||
if (AdjustWindowRectEx(ref outer, newStyle, false, GetWindowLong(hwnd, GwlExStyle)))
|
||||
{
|
||||
int outerW = outer.Right - outer.Left, outerH = outer.Bottom - outer.Top;
|
||||
SetWindowPos(hwnd, IntPtr.Zero, outer.Left, outer.Top, outerW, outerH,
|
||||
SwpNozorder | SwpNoactivate | SwpFramechanged);
|
||||
return;
|
||||
}
|
||||
}
|
||||
Refresh(hwnd);
|
||||
}
|
||||
|
||||
private static void TryRestorePlacement(IntPtr hwnd)
|
||||
{
|
||||
long now = Environment.TickCount64;
|
||||
|
|
@ -210,9 +255,13 @@ internal static class AcWindowChrome
|
|||
_sizeSinceMs = now;
|
||||
}
|
||||
|
||||
if (!GetClientRect(hwnd, out RECT cr)) return;
|
||||
var client = new Size(cr.Right - cr.Left, cr.Bottom - cr.Top);
|
||||
Size? draw = DrawSize();
|
||||
|
||||
Rect? saved = LoadSaved(key);
|
||||
var d = DecideRestore(saved, IsIconic(hwnd) || IsZoomed(hwnd),
|
||||
LooksExclusiveFullscreen(hwnd, GetWindowLong(hwnd, GwlStyle)), cur,
|
||||
RestorePlan d = DecideRestore(saved, IsIconic(hwnd) || IsZoomed(hwnd),
|
||||
LooksExclusiveFullscreen(hwnd, GetWindowLong(hwnd, GwlStyle)), cur, client, draw,
|
||||
TimeSpan.FromMilliseconds(now - _sizeSinceMs), TimeSpan.FromMilliseconds(now - _restoreWatchStartMs),
|
||||
WorkAreas());
|
||||
if (d.Action == AcWindowPlacementRule.RestoreAction.Wait) return; // asked again next tick
|
||||
|
|
@ -220,22 +269,46 @@ internal static class AcWindowChrome
|
|||
// One decision per window, even a skipped one; the HWND carries it across a hot reload.
|
||||
SetProp(hwnd, PlacementDoneProp, new IntPtr(1));
|
||||
SetReference(saved);
|
||||
if (d.Action == AcWindowPlacementRule.RestoreAction.Move && saved is Rect from)
|
||||
if (d.SavedSizeIgnored != null)
|
||||
RynthLog.UI("AcWindowChrome: " + d.SavedSizeIgnored + ".");
|
||||
|
||||
bool move = d.Action == AcWindowPlacementRule.RestoreAction.Move;
|
||||
if (move || d.Resize)
|
||||
{
|
||||
// The size is never the saved one: SWP_NOSIZE, or AC's resolution plus the window's own
|
||||
// frame when the client area is not that resolution (the picture would be stretched;
|
||||
// a smaller window crops it and leaves the HUD out of reach, R-20261115-160655-1201).
|
||||
uint flags = SwpNozorder | SwpNoactivate | (move ? 0 : SwpNomove);
|
||||
if (d.Resize)
|
||||
SetWindowPos(hwnd, IntPtr.Zero, d.X, d.Y, d.Width, d.Height, flags);
|
||||
else
|
||||
SetWindowPos(hwnd, IntPtr.Zero, d.X, d.Y, 0, 0, flags | SwpNosize);
|
||||
}
|
||||
string size = d.Resize
|
||||
? FormattableString.Invariant($"resized to {d.Width}x{d.Height} for AC's {draw} (it was {cur.Width}x{cur.Height}, client {client})")
|
||||
: FormattableString.Invariant($"size left to AC ({cur.Width}x{cur.Height})");
|
||||
if (move && saved is Rect from)
|
||||
{
|
||||
// SWP_NOSIZE: AC sizes its own window from its resolution; a smaller window crops the
|
||||
// picture and leaves the HUD out of reach (R-20261115-160655-1201).
|
||||
SetWindowPos(hwnd, IntPtr.Zero, d.X, d.Y, 0, 0, SwpNosize | SwpNozorder | SwpNoactivate);
|
||||
RynthLog.UI(d.Clamped
|
||||
? FormattableString.Invariant($"AcWindowChrome: restored AC window position to ({d.X},{d.Y}), pulled onto the screen from ({from.Left},{from.Top}); size left to AC ({cur.Width}x{cur.Height}).")
|
||||
: FormattableString.Invariant($"AcWindowChrome: restored AC window position to ({d.X},{d.Y}); size left to AC ({cur.Width}x{cur.Height})."));
|
||||
? FormattableString.Invariant($"AcWindowChrome: restored AC window position to ({d.X},{d.Y}), pulled onto the screen from ({from.Left},{from.Top}); {size}.")
|
||||
: FormattableString.Invariant($"AcWindowChrome: restored AC window position to ({d.X},{d.Y}); {size}."));
|
||||
}
|
||||
else if (saved is Rect sv)
|
||||
{
|
||||
RynthLog.UI(FormattableString.Invariant(
|
||||
$"AcWindowChrome: saved position ({sv.Left},{sv.Top}) not restored ({d.Why}); leaving AC where it is."));
|
||||
$"AcWindowChrome: saved position ({sv.Left},{sv.Top}) not restored ({d.Why}); leaving AC where it is{(d.Resize ? "; " + size : "")}."));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>AC's resolution (the back buffer's size) as of the last tick, or null while unknown.</summary>
|
||||
private static Size? DrawSize()
|
||||
{
|
||||
long v = Interlocked.Read(ref _drawSize);
|
||||
if (v == 0) return null;
|
||||
var s = new Size((int)(v >> 32), (int)(uint)v);
|
||||
return s.IsUsable ? s : null;
|
||||
}
|
||||
|
||||
/// <summary>The saved rect for this client, read once per key (null: none, or unreadable).</summary>
|
||||
private static Rect? LoadSaved(string? key)
|
||||
{
|
||||
|
|
@ -281,9 +354,26 @@ internal static class AcWindowChrome
|
|||
bool saveable = !IsIconic(hwnd) && !IsZoomed(hwnd) && !LooksExclusiveFullscreen(hwnd, style);
|
||||
bool inWorld = InWorld();
|
||||
bool baselineOk = inWorld && saveable && AcWindowPlacementRule.IsCapturable(ToPlacement(cur));
|
||||
if (!GetClientRect(hwnd, out RECT cr)) return;
|
||||
var client = new Size(cr.Right - cr.Left, cr.Bottom - cr.Top);
|
||||
Size? draw = DrawSize();
|
||||
|
||||
lock (Sync)
|
||||
{
|
||||
// 2026-11-21: a window whose client area is not AC's resolution (a stretched picture) is
|
||||
// never saved, so its size can't become "the" size; nothing is left pending either.
|
||||
if (inWorld && saveable && SaveRefusedForSize(client, draw) is string refused)
|
||||
{
|
||||
_pending = null;
|
||||
if (_refusedLogged != (client, draw!.Value))
|
||||
{
|
||||
_refusedLogged = (client, draw.Value);
|
||||
RynthLog.UI(FormattableString.Invariant(
|
||||
$"AcWindowChrome: not saving the window at {cur.Width}x{cur.Height}: {refused}."));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// After a hot reload the restore was decided by the old engine: start from the saved rect.
|
||||
if (!_referenceSet) SetReference(LoadSaved(key));
|
||||
if (_reference is null && !force)
|
||||
|
|
@ -449,6 +539,9 @@ internal static class AcWindowChrome
|
|||
[StructLayout(LayoutKind.Sequential)]
|
||||
private struct RECT { public int Left, Top, Right, Bottom; }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
private struct POINT { public int X, Y; }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
private struct MONITORINFO
|
||||
{
|
||||
|
|
@ -473,6 +566,15 @@ internal static class AcWindowChrome
|
|||
[DllImport("user32.dll")]
|
||||
private static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern bool GetClientRect(IntPtr hWnd, out RECT lpRect);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern bool ClientToScreen(IntPtr hWnd, ref POINT lpPoint);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern bool AdjustWindowRectEx(ref RECT lpRect, int dwStyle, bool bMenu, int dwExStyle);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern bool IsIconic(IntPtr hWnd);
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
// - Window position: whether a saved or current rect is worth restoring / saving,
|
||||
// and which file a client's rect lives in. Since 2026-11-15 the restore and the
|
||||
// save follow the launcher's AcWindowPlacementRule (src\RynthCore.App, compiled in):
|
||||
// position only, and a rect is saved only once it held for 30 s.
|
||||
// position only, and a rect is saved only once it held for 30 s. Since 2026-11-21 the
|
||||
// window's size comes from AC's resolution (the back buffer), never from a saved rect.
|
||||
// AcWindowChrome does the Win32 work and asks these first.
|
||||
// Idea and first version: SilentKelpie (RynthCore PR 6).
|
||||
// ============================================================================
|
||||
|
|
@ -148,7 +149,8 @@ internal static class AcWindowChromePolicy
|
|||
|
||||
/// <summary>
|
||||
/// What to do with the saved rect now: wait, move (position only), or leave the window where
|
||||
/// AC put it. <paramref name="sinceInWorld"/> runs from the first look after the login.
|
||||
/// AC put it. <paramref name="sinceInWorld"/> runs from the first look after the login. The
|
||||
/// restore with AC's resolution unknown; the overload below takes it.
|
||||
/// </summary>
|
||||
public static AcWindowPlacementRule.RestoreDecision DecideRestore(Rect? saved, bool minimisedOrMaximised,
|
||||
bool looksExclusiveFullscreen, Rect current, TimeSpan sizeHeldFor, TimeSpan sinceInWorld,
|
||||
|
|
@ -173,6 +175,113 @@ internal static class AcWindowChromePolicy
|
|||
sizeHeldFor, sinceInWorld, areas);
|
||||
}
|
||||
|
||||
// ── AC's resolution (2026-11-21) ─────────────────────────────────────
|
||||
//
|
||||
// A window saved at 1940x1100 (client 1934x1071) was put back with its size at every login on a
|
||||
// 1600x900 game (an engine and a launcher from before the 2026-11-15 rule). AC draws into a back
|
||||
// buffer at its resolution and stretches it to whatever client area the window has: here about
|
||||
// 21%, and ImGui's DisplaySize (the client area, 1934x1071) no longer matched GameMatrixCapture's
|
||||
// 1600x900 viewport, so nameplates and the rest of the overlay were misplaced too. So:
|
||||
// - The size of AC's window comes from AC's resolution, never from a saved rect: its client area
|
||||
// must be the D3D back buffer's size. A window that already is that size keeps it; one that is
|
||||
// not (and stays so for MismatchHold) is resized to it, its frame (outer minus client, 0 when
|
||||
// borderless) kept as it is.
|
||||
// - A saved size that is not that size is ignored, with one log line (SavedSizeIgnored).
|
||||
// - A rect whose client area is not the resolution (a stretched picture) is never saved.
|
||||
// - A resolution the player picks in AC (1920x1080, say) is the back buffer's size as soon as AC
|
||||
// applies it, so the window follows it.
|
||||
// With the back buffer unknown (not read yet) the restore is the position-only one above.
|
||||
|
||||
/// <summary>A width and height in pixels.</summary>
|
||||
internal readonly record struct Size(int Width, int Height)
|
||||
{
|
||||
public bool IsUsable => Width >= MinWidth && Height >= MinHeight && Width <= MaxExtent && Height <= MaxExtent;
|
||||
public override string ToString() => string.Create(CultureInfo.InvariantCulture, $"{Width}x{Height}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// How long the client area must have differed from AC's resolution before the restore resizes the
|
||||
/// window: AC resizes its own window and resets its device around the login, not quite together.
|
||||
/// </summary>
|
||||
public static readonly TimeSpan MismatchHold = TimeSpan.FromSeconds(10);
|
||||
|
||||
/// <summary>The client area is exactly AC's resolution: the picture is drawn 1:1, not stretched.</summary>
|
||||
public static bool ClientFits(Size client, Size draw) => client.Width == draw.Width && client.Height == draw.Height;
|
||||
|
||||
/// <summary>
|
||||
/// The outer size at which the window's client area is <paramref name="draw"/>, keeping the window's
|
||||
/// current frame (outer minus client: caption and borders, 0 when borderless).
|
||||
/// </summary>
|
||||
public static Size OuterForDrawSize(Size draw, Rect outer, Size client)
|
||||
=> new(draw.Width + Math.Max(0, outer.Width - client.Width), draw.Height + Math.Max(0, outer.Height - client.Height));
|
||||
|
||||
/// <summary>
|
||||
/// The restore with AC's resolution known: where to move the window (Action Move, X, Y), whether to
|
||||
/// resize it (Resize, to Width x Height, which is AC's resolution plus the window's frame), and the
|
||||
/// log line for a saved size that is not put back.
|
||||
/// </summary>
|
||||
internal readonly record struct RestorePlan(AcWindowPlacementRule.RestoreAction Action, int X, int Y, bool Clamped,
|
||||
string Why, bool Resize, int Width, int Height, string? SavedSizeIgnored)
|
||||
{
|
||||
public static RestorePlan From(AcWindowPlacementRule.RestoreDecision d) => new(d.Action, d.X, d.Y, d.Clamped, d.Why, false, 0, 0, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// What to do with the saved rect now, given the window's client area and AC's resolution
|
||||
/// (<paramref name="draw"/>: the back buffer's size, null while unknown). The saved size never
|
||||
/// sizes the window: only AC's resolution does.
|
||||
/// </summary>
|
||||
public static RestorePlan DecideRestore(Rect? saved, bool minimisedOrMaximised, bool looksExclusiveFullscreen,
|
||||
Rect current, Size client, Size? draw, TimeSpan sizeHeldFor, TimeSpan sinceInWorld, IReadOnlyList<Rect> workAreas)
|
||||
{
|
||||
// Nothing saved, the minimised / maximised / fullscreen guards, AC's startup park, and AC's
|
||||
// resolution not known: exactly the position-only restore (never a resize).
|
||||
if (draw is not Size d || !d.IsUsable || saved is not Rect sv || minimisedOrMaximised || looksExclusiveFullscreen
|
||||
|| !AcWindowPlacementRule.IsCapturable(ToPlacement(current)))
|
||||
return RestorePlan.From(DecideRestore(saved, minimisedOrMaximised, looksExclusiveFullscreen, current,
|
||||
sizeHeldFor, sinceInWorld, workAreas));
|
||||
|
||||
bool watching = sinceInWorld <= AcWindowPlacementRule.RestoreWatch;
|
||||
if (sizeHeldFor < AcWindowPlacementRule.RestoreSettle && watching)
|
||||
return Wait("window size still changing");
|
||||
bool fits = ClientFits(client, d);
|
||||
if (!fits && sizeHeldFor < MismatchHold && watching)
|
||||
return Wait("window not at AC's resolution yet");
|
||||
|
||||
Size target = fits ? new Size(current.Width, current.Height) : OuterForDrawSize(d, current, client);
|
||||
string? ignored = AcWindowPlacementRule.SavedSizeIgnored(sv.Width, sv.Height, target.Width, target.Height, d.Width, d.Height);
|
||||
|
||||
// A position saved for a very different window (AC's small login window) is not this window's.
|
||||
if (!AcWindowPlacementRule.SizeMatches(target.Width, target.Height, sv.Width, sv.Height))
|
||||
{
|
||||
if (watching && fits)
|
||||
return Wait("window not at the saved size yet"); // AC may still be at its login size
|
||||
return new(AcWindowPlacementRule.RestoreAction.Skip, 0, 0, false,
|
||||
$"the position was saved for a {sv.Width}x{sv.Height} window, AC's is {target}", !fits, target.Width, target.Height, ignored);
|
||||
}
|
||||
if (workAreas.Count == 0)
|
||||
return new(AcWindowPlacementRule.RestoreAction.Skip, 0, 0, false, "no monitor information", !fits, target.Width, target.Height, ignored);
|
||||
|
||||
var areas = new List<AcWindowPlacementRule.WorkArea>(workAreas.Count);
|
||||
foreach (Rect a in workAreas) areas.Add(new AcWindowPlacementRule.WorkArea(a.Left, a.Top, a.Right, a.Bottom));
|
||||
(int x, int y) = AcWindowPlacementRule.ClampToWorkArea(sv.Left, sv.Top, target.Width, target.Height, areas);
|
||||
bool clamped = x != sv.Left || y != sv.Top;
|
||||
return new(AcWindowPlacementRule.RestoreAction.Move, x, y, clamped, clamped ? "pulled onto the screen" : "saved position",
|
||||
!fits, target.Width, target.Height, ignored);
|
||||
|
||||
static RestorePlan Wait(string why) => new(AcWindowPlacementRule.RestoreAction.Wait, 0, 0, false, why, false, 0, 0, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Why a rect must not be saved because of its size, or null: its client area is not AC's
|
||||
/// resolution (the picture is stretched), so its size is not the window's. Unknown resolution: no
|
||||
/// objection (the position-only rules decide).
|
||||
/// </summary>
|
||||
public static string? SaveRefusedForSize(Size client, Size? draw)
|
||||
=> draw is Size d && d.IsUsable && !ClientFits(client, d)
|
||||
? $"its client area {client} is not AC's resolution {d}"
|
||||
: null;
|
||||
|
||||
/// <summary>
|
||||
/// One look at the window for the save. <paramref name="inWorld"/> false (character select,
|
||||
/// the login screen, AC closing) never saves and forgets a pending rect, so time spent at
|
||||
|
|
|
|||
|
|
@ -78,6 +78,10 @@ internal sealed unsafe class ChatSource : UiSource<ChatLine[]>
|
|||
// RynthChat 0.3.0+: how many lines its ring keeps. Null for an older plugin (it keeps 500).
|
||||
private delegate* unmanaged[Cdecl]<int, int> _setCapacity;
|
||||
private int _sentCapacity;
|
||||
// RynthChat 0.4.0+: how many player lines its ring keeps past that. Null for an older plugin.
|
||||
private delegate* unmanaged[Cdecl]<int, int> _setPlayerCapacity;
|
||||
private bool _playerCapacityMissing;
|
||||
private int _sentPlayerCapacity;
|
||||
private ulong _sinceSeq;
|
||||
private long _nextId = 1;
|
||||
private bool _boundLogged;
|
||||
|
|
@ -120,14 +124,15 @@ internal sealed unsafe class ChatSource : UiSource<ChatLine[]>
|
|||
ChatModel.SendLinePtr = PluginExportBinder.Resolve("RynthChat", "RynthChatSendLine");
|
||||
ChatModel.PluginBound = _get != null;
|
||||
int maxLines = ChatModel.HistoryLines;
|
||||
if (_get != null) SyncPluginCapacity(maxLines);
|
||||
int playerLines = ChatModel.PlayerHistoryLines;
|
||||
if (_get != null) SyncPluginCapacity(maxLines, playerLines);
|
||||
ChatModel.PumpLog(null);
|
||||
|
||||
// The rules (or the name mentions look for) changed: route the kept lines again.
|
||||
long version = ChatModel.FiltersVersion;
|
||||
string name = ChatModel.PumpCharacterName();
|
||||
ChatRouter router = ChatModel.PumpRouter(name);
|
||||
TrimToLength(maxLines);
|
||||
TrimToLength(maxLines, playerLines);
|
||||
if (version != _routedVersion || name != _routedName)
|
||||
{
|
||||
_routedVersion = version;
|
||||
|
|
@ -186,7 +191,8 @@ internal sealed unsafe class ChatSource : UiSource<ChatLine[]>
|
|||
}
|
||||
|
||||
ChatLine[] old = Current?.Value ?? Array.Empty<ChatLine>();
|
||||
Publish(ChatHistory.Merge(old, added, maxLines));
|
||||
// Player chat outlasts the rest (ChatHistory.MergeKeep, "Player chat history").
|
||||
Publish(ChatHistory.MergeKeep(old, added, maxLines, playerLines, IsPlayerLine));
|
||||
ChatModel.PumpLog(added);
|
||||
RelayRead(added);
|
||||
}
|
||||
|
|
@ -232,16 +238,37 @@ internal sealed unsafe class ChatSource : UiSource<ChatLine[]>
|
|||
return lo - 1;
|
||||
}
|
||||
|
||||
/// <summary>The setting was lowered: drop the oldest kept lines now, not only when new ones arrive.</summary>
|
||||
private void TrimToLength(int maxLines)
|
||||
private static readonly Func<ChatLine, bool> IsPlayerLine = l => l.IsPlayerChat;
|
||||
|
||||
/// <summary>A setting was lowered: drop the oldest kept lines now, not only when new ones arrive.</summary>
|
||||
private void TrimToLength(int maxLines, int playerLines)
|
||||
{
|
||||
ChatLine[]? kept = Current?.Value;
|
||||
if (kept != null && ChatHistory.Trim(kept, maxLines) is { } trimmed) Publish(trimmed);
|
||||
if (kept != null && ChatHistory.TrimKeep(kept, maxLines, playerLines, IsPlayerLine) is { } trimmed) Publish(trimmed);
|
||||
}
|
||||
|
||||
/// <summary>Tells RynthChat (0.3.0+) the history length once it's bound and whenever the setting moves.</summary>
|
||||
private void SyncPluginCapacity(int maxLines)
|
||||
/// <summary>
|
||||
/// Tells RynthChat (0.3.0+) the history length once it's bound and whenever the setting moves,
|
||||
/// and (0.4.0+, RynthChatSetPlayerCapacity) how many player lines its ring keeps past that.
|
||||
/// </summary>
|
||||
private void SyncPluginCapacity(int maxLines, int playerLines)
|
||||
{
|
||||
if (_setPlayerCapacity == null && !_playerCapacityMissing)
|
||||
{
|
||||
_setPlayerCapacity = (delegate* unmanaged[Cdecl]<int, int>)PluginExportBinder.Resolve("RynthChat", "RynthChatSetPlayerCapacity");
|
||||
// An older RynthChat: its ring keeps only the history length, so player lines older than
|
||||
// that are gone after a reload, or after the chat was closed for a while.
|
||||
_playerCapacityMissing = _setPlayerCapacity == null;
|
||||
}
|
||||
if (_setPlayerCapacity != null && _sentPlayerCapacity != playerLines)
|
||||
{
|
||||
int kept = _setPlayerCapacity(playerLines);
|
||||
if (kept > 0)
|
||||
{
|
||||
_sentPlayerCapacity = playerLines;
|
||||
RynthLog.UI($"ChatSource: RynthChat keeps {kept} player lines (player chat history {playerLines}).");
|
||||
}
|
||||
}
|
||||
if (_setCapacity == null)
|
||||
{
|
||||
_setCapacity = (delegate* unmanaged[Cdecl]<int, int>)PluginExportBinder.Resolve("RynthChat", "RynthChatSetCapacity");
|
||||
|
|
@ -344,6 +371,9 @@ internal sealed unsafe class ChatSource : UiSource<ChatLine[]>
|
|||
_get = null;
|
||||
_setCapacity = null;
|
||||
_sentCapacity = 0;
|
||||
_setPlayerCapacity = null;
|
||||
_playerCapacityMissing = false;
|
||||
_sentPlayerCapacity = 0;
|
||||
_sinceSeq = 0;
|
||||
Discord.ChatDiscord.PumpSourceReset();
|
||||
ChatModel.SendLinePtr = IntPtr.Zero;
|
||||
|
|
@ -374,7 +404,8 @@ internal static class ChatModel
|
|||
{
|
||||
("", "Any line"),
|
||||
("chan:Chat", "Chat tab (say, tells, allegiance, fellowship)"),
|
||||
("chan:Channels", "Channels tab (General, Trade, LFG...)"),
|
||||
// Lines filed under Channels; the tab also shows the rest of player chat (ChatPlayerText).
|
||||
("chan:Channels", "Channel lines (General, Trade, LFG...)"),
|
||||
("chan:System", "System tab"),
|
||||
("chan:Combat", "Combat tab (combat and magic)"),
|
||||
("chan:Rynth", "Rynth tab (plugin output)"),
|
||||
|
|
@ -446,6 +477,29 @@ internal static class ChatModel
|
|||
SaveSettings();
|
||||
}
|
||||
|
||||
/// <summary>How many player lines (ChatPlayerText) the scrollback keeps past "Chat history"
|
||||
/// (ChatHistory.MergeKeep; "Player chat history" in the gear menu, 2026-11-22).</summary>
|
||||
public static volatile int PlayerHistoryLines = ChatHistory.DefaultPlayerLines;
|
||||
/// <summary>The Channels tab shows every player line (tells, say, fellowship, allegiance...),
|
||||
/// not only the General / Trade / LFG channels (2026-11-22; on unless turned off).</summary>
|
||||
public static volatile bool ChannelsAllPlayerChat = true;
|
||||
|
||||
public static void SetPlayerHistoryLines(int lines)
|
||||
{
|
||||
lines = ChatHistory.ClampPlayer(lines);
|
||||
if (lines == PlayerHistoryLines) return;
|
||||
PlayerHistoryLines = lines;
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
public static void SetChannelsAllPlayerChat(bool on)
|
||||
{
|
||||
if (on == ChannelsAllPlayerChat) return;
|
||||
ChannelsAllPlayerChat = on;
|
||||
BumpRoutes(); // what the Channels tab shows changed: the faces rebuild and recount
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
public static void SetCtrlGatedClickThrough(bool on)
|
||||
{
|
||||
CtrlGatedClickThrough = on;
|
||||
|
|
@ -714,7 +768,8 @@ internal static class ChatModel
|
|||
}
|
||||
|
||||
/// <summary>Is the line shown under <paramref name="tab"/> (rules applied, no search)?</summary>
|
||||
public static bool LineInTab(ChatLine line, string tab) => line.Route.ShowsIn(tab, line.Channel);
|
||||
public static bool LineInTab(ChatLine line, string tab) =>
|
||||
line.Route.ShowsIn(tab, line.Channel, line.IsPlayerChat && ChannelsAllPlayerChat);
|
||||
|
||||
public static bool LineVisible(ChatLine line, string tab, string search) =>
|
||||
LineInTab(line, tab)
|
||||
|
|
@ -1434,6 +1489,8 @@ internal static class ChatModel
|
|||
MentionSound = dto.MentionSound;
|
||||
MentionWords = dto.MentionWords ?? "";
|
||||
HistoryLines = ChatHistory.Clamp(dto.HistoryLines ?? 0); // absent before 2026-10-11: the default
|
||||
PlayerHistoryLines = ChatHistory.ClampPlayer(dto.PlayerHistoryLines ?? 0); // absent before 2026-11-22: the default
|
||||
ChannelsAllPlayerChat = dto.ChannelsAllPlayerChat ?? true; // absent (and while on): on
|
||||
TabsAcross = dto.TabsAcross ?? false; // absent before 2026-10-20 (and while off): the drawer
|
||||
ChatLineColors.Load(dto.LineColors); // absent before 2026-10-08: nothing set
|
||||
ChatLineColors.RetailColors = dto.RetailColors ?? true; // absent before 2026-10-28 (and while on): on
|
||||
|
|
@ -1524,6 +1581,8 @@ internal static class ChatModel
|
|||
MentionWords = MentionWords,
|
||||
// Left out at the default, so a file follows the default if it ever changes.
|
||||
HistoryLines = HistoryLines == ChatHistory.DefaultLines ? null : HistoryLines,
|
||||
PlayerHistoryLines = PlayerHistoryLines == ChatHistory.DefaultPlayerLines ? null : PlayerHistoryLines,
|
||||
ChannelsAllPlayerChat = ChannelsAllPlayerChat ? null : false, // left out while on (the default)
|
||||
TabsAcross = TabsAcross ? true : null,
|
||||
LineColors = ChatLineColors.ToJson(), // null (left out) until a colour is set
|
||||
RetailColors = ChatLineColors.RetailColors ? null : false, // left out while on (the default)
|
||||
|
|
|
|||
|
|
@ -67,4 +67,94 @@ internal static class ChatHistory
|
|||
Array.Copy(lines, lines.Length - max, kept, 0, max);
|
||||
return kept;
|
||||
}
|
||||
|
||||
// ── Player chat kept longer (2026-11-22, ChatPlayerText) ─────────────────
|
||||
//
|
||||
// The scrollback is one list, and every tab is a view of it, so a busy hunt's combat lines
|
||||
// used to push tells, fellowship and allegiance out of their tabs as fast as everything else
|
||||
// (10,000 lines can go in under an hour). Now a line is kept while it is among the newest
|
||||
// "Chat history" lines, as before, OR it is player chat among the newest "Player chat history"
|
||||
// player lines. Nothing kept before is dropped sooner; player lines outlast the spam. The
|
||||
// list stays in arrival order, so the faces, the unread counts and the re-route pass work on
|
||||
// it as before (ChatView drops what left by Id, not by position).
|
||||
|
||||
public const int DefaultPlayerLines = 5000;
|
||||
public const int MinPlayerLines = 500;
|
||||
public const int MaxPlayerLines = 20000;
|
||||
|
||||
/// <summary>A stored or typed "Player chat history" made valid: 0 or less (absent) is the default.</summary>
|
||||
public static int ClampPlayer(int lines)
|
||||
{
|
||||
if (lines <= 0) return DefaultPlayerLines;
|
||||
lines = (int)Math.Round(lines / (double)StepLines) * StepLines;
|
||||
return Math.Clamp(lines, MinPlayerLines, MaxPlayerLines);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <paramref name="old"/> followed by <paramref name="added"/>, keeping the newest
|
||||
/// <paramref name="max"/> lines and, older than those, the player lines among the newest
|
||||
/// <paramref name="playerMax"/> player lines. A new array, in the same order.
|
||||
/// </summary>
|
||||
public static T[] MergeKeep<T>(T[] old, IReadOnlyList<T> added, int max, int playerMax, Func<T, bool> isPlayer)
|
||||
{
|
||||
max = Math.Max(1, max);
|
||||
int total = old.Length + added.Count;
|
||||
// The newest max lines are all kept (the main window, at the end); before it, only player
|
||||
// lines, while fewer than playerMax player lines have been counted from the newest.
|
||||
int mainStart = Math.Max(0, total - max);
|
||||
int players = 0;
|
||||
for (int k = total - 1; k >= mainStart; k--)
|
||||
if (isPlayer(At(old, added, k))) players++;
|
||||
int extra = 0, oldest = mainStart;
|
||||
for (int k = mainStart - 1; k >= 0 && players < playerMax; k--)
|
||||
{
|
||||
if (!isPlayer(At(old, added, k))) continue;
|
||||
players++;
|
||||
extra++;
|
||||
oldest = k;
|
||||
}
|
||||
var lines = new T[extra + (total - mainStart)];
|
||||
int n = 0;
|
||||
for (int k = oldest; k < mainStart; k++)
|
||||
{
|
||||
T line = At(old, added, k);
|
||||
if (isPlayer(line)) lines[n++] = line;
|
||||
}
|
||||
// The main window: a copy of old's part, then the added lines.
|
||||
if (mainStart < old.Length)
|
||||
{
|
||||
Array.Copy(old, mainStart, lines, n, old.Length - mainStart);
|
||||
n += old.Length - mainStart;
|
||||
}
|
||||
for (int k = Math.Max(mainStart, old.Length); k < total; k++) lines[n++] = added[k - old.Length];
|
||||
return lines;
|
||||
}
|
||||
|
||||
/// <summary>The lines <see cref="MergeKeep"/> keeps of <paramref name="lines"/>, or null when it keeps them all.</summary>
|
||||
public static T[]? TrimKeep<T>(T[] lines, int max, int playerMax, Func<T, bool> isPlayer)
|
||||
{
|
||||
if (lines.Length <= Math.Max(1, max)) return null;
|
||||
T[] kept = MergeKeep(lines, Array.Empty<T>(), max, playerMax, isPlayer);
|
||||
return kept.Length == lines.Length ? null : kept;
|
||||
}
|
||||
|
||||
private static T At<T>(T[] old, IReadOnlyList<T> added, int k) => k < old.Length ? old[k] : added[k - old.Length];
|
||||
|
||||
/// <summary>
|
||||
/// The indices of <paramref name="shown"/> whose Id <paramref name="source"/> no longer has, in
|
||||
/// order, into <paramref name="gone"/> (cleared first). Both lists are in Id order: one walk.
|
||||
/// A chat view's lines leave by this (ChatView.DropGone): with player chat kept longer, a line
|
||||
/// can go while an older one stays, so "older than the source's first line" no longer covers it.
|
||||
/// </summary>
|
||||
public static void FindGone<T>(IReadOnlyList<T> shown, IReadOnlyList<T> source, Func<T, long> id, List<int> gone)
|
||||
{
|
||||
gone.Clear();
|
||||
int j = 0;
|
||||
for (int i = 0; i < shown.Count; i++)
|
||||
{
|
||||
long want = id(shown[i]);
|
||||
while (j < source.Count && id(source[j]) < want) j++;
|
||||
if (j >= source.Count || id(source[j]) != want) gone.Add(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
76
src/RynthCore.Engine/UI/Data/ChatPlayerText.cs
Normal file
76
src/RynthCore.Engine/UI/Data/ChatPlayerText.cs
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
// ============================================================================
|
||||
// RynthCore.Engine - UI/Data/ChatPlayerText.cs
|
||||
// Which chat lines are text from players (2026-11-22): tells both ways,
|
||||
// local says and emotes, fellowship, allegiance, the General / Trade / LFG /
|
||||
// Roleplay / Society channels, and a server's network rooms. Not combat,
|
||||
// spell words, system, loot or plugin output.
|
||||
//
|
||||
// Two things use it:
|
||||
// • the Channels tab shows every player line, not only the channel ones
|
||||
// ("Channels shows all player chat" in the chat settings, on by default);
|
||||
// • the scrollback keeps player lines longer than the rest (ChatHistory.
|
||||
// MergeKeep, "Player chat history"), so a busy hunt's combat spam no
|
||||
// longer pushes the tells and fellowship lines out within the hour.
|
||||
//
|
||||
// The RynthChat plugin has the same rule (ChatClassifier.IsPlayerChat in
|
||||
// RynthSuite) for its own ring, so the lines it hands the engine after a
|
||||
// reload, or after the chat was closed for a while, include them too. Keep
|
||||
// the two the same.
|
||||
//
|
||||
// No engine state: tools/ChatFilterTests and tools/ChatHistoryBench compile it.
|
||||
// ============================================================================
|
||||
|
||||
using System;
|
||||
|
||||
namespace RynthCore.Engine.UI.Data;
|
||||
|
||||
internal static class ChatPlayerText
|
||||
{
|
||||
/// <summary>The tab that shows every player line (when the setting is on).</summary>
|
||||
public const string PlayerChatTab = "Channels";
|
||||
|
||||
/// <summary>
|
||||
/// True for a line a player typed. <paramref name="channel"/> is the tab RynthChat filed it
|
||||
/// under (Chat, Channels, System, Combat, Rynth, Items, Other); <paramref name="text"/> the
|
||||
/// line, with or without AC's name links.
|
||||
/// </summary>
|
||||
public static bool IsPlayerChat(string channel, int chatType, string? text)
|
||||
{
|
||||
// Plugin output and item info are never chat, whatever type they were written with.
|
||||
if (channel is "Rynth" or "Items") return false;
|
||||
// Say, tells (in and out), emotes, allegiance, fellowship; every channel line.
|
||||
if (channel is "Chat" or "Channels") return true;
|
||||
// An admin's tell (AdminTell, 0x1F) lands under System.
|
||||
if (chatType == 0x1F) return true;
|
||||
// Spell words ("Bob says, \"Zojak Equin\"") are spellcasting: not chat.
|
||||
if (channel == "Combat") return false;
|
||||
// A room line that arrived as another type: "[Room] Name@world says, \"...\"" (a server's
|
||||
// network rooms), "[Patron] Bob says, \"...\"", "You say to ..., \"...\"".
|
||||
return LooksLikeSpeech(text);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// "[Tag] Name says, \"" or "[Tag] Name tells you, \"" (the name may carry AC's link markup),
|
||||
/// or your own "You say ..., \"" / "You tell ..., \"". No regex: a few IndexOf calls.
|
||||
/// </summary>
|
||||
public static bool LooksLikeSpeech(string? text)
|
||||
{
|
||||
if (string.IsNullOrEmpty(text) || text.Length < 8) return false;
|
||||
int start = 0;
|
||||
bool tagged = false;
|
||||
if (text[0] == '[')
|
||||
{
|
||||
int close = text.IndexOf(']', 1);
|
||||
if (close < 2 || close > 41 || close + 1 >= text.Length || text[close + 1] != ' ') return false;
|
||||
if (text.IndexOf('[', 1, close - 1) >= 0) return false;
|
||||
start = close + 2;
|
||||
tagged = true;
|
||||
}
|
||||
int quote = text.IndexOf(", \"", start, StringComparison.Ordinal);
|
||||
if (quote < 0 || quote - start > 220) return false;
|
||||
string who = text.Substring(start, quote - start);
|
||||
if (who.IndexOf('"') >= 0) return false;
|
||||
if (who.StartsWith("You say", StringComparison.Ordinal) || who.StartsWith("You tell ", StringComparison.Ordinal)) return true;
|
||||
return tagged && (who.Contains(" says", StringComparison.Ordinal) || who.Contains(" tells you", StringComparison.Ordinal));
|
||||
}
|
||||
}
|
||||
|
|
@ -30,6 +30,7 @@ internal sealed class ChatLine
|
|||
Text = text;
|
||||
ColorKind = ChatLineColors.KindOf(chatType, chan, text);
|
||||
ChatLineColors.NoteKind(ColorKind);
|
||||
IsPlayerChat = ChatPlayerText.IsPlayerChat(chan, chatType, text);
|
||||
// The text already names the speaker ("Bob says, ..."); until 2026-09-29
|
||||
// the sender was printed in front of it as well ("Bob: Bob says, ...").
|
||||
FormattedText = $"{ts} {text}";
|
||||
|
|
@ -62,6 +63,9 @@ internal sealed class ChatLine
|
|||
public ChatSpan[]? OwnSpans { get; init; }
|
||||
/// <summary>"HH:mm:ss text": copy, log and the Avalonia face.</summary>
|
||||
public string FormattedText { get; }
|
||||
/// <summary>Text a player typed (ChatPlayerText): shown under Channels too, and kept for
|
||||
/// "Player chat history" (ChatHistory.MergeKeep). Worked out once here.</summary>
|
||||
public bool IsPlayerChat { get; }
|
||||
|
||||
private ChatRoute _route = ChatRoute.Default;
|
||||
|
||||
|
|
@ -110,10 +114,13 @@ internal sealed class ChatRoute
|
|||
/// keeps its own colour (LineArgb or the channel's).</summary>
|
||||
public uint? HighlightArgb { get; }
|
||||
|
||||
public bool ShowsIn(string tab, string channel)
|
||||
/// <param name="playerChat">The line is player chat and the Channels tab shows all of it
|
||||
/// (ChatModel.LineInTab): it shows there as well as under its own channel tab.</param>
|
||||
public bool ShowsIn(string tab, string channel, bool playerChat = false)
|
||||
{
|
||||
if (Hidden) return false;
|
||||
if (InHome && (tab == "All" || string.Equals(tab, channel, StringComparison.OrdinalIgnoreCase))) return true;
|
||||
if (InHome && (tab == "All" || string.Equals(tab, channel, StringComparison.OrdinalIgnoreCase)
|
||||
|| (playerChat && string.Equals(tab, ChatPlayerText.PlayerChatTab, StringComparison.OrdinalIgnoreCase)))) return true;
|
||||
if (Tabs != null)
|
||||
foreach (string t in Tabs)
|
||||
if (string.Equals(t, tab, StringComparison.OrdinalIgnoreCase)) return true;
|
||||
|
|
|
|||
|
|
@ -68,6 +68,10 @@ internal sealed class RynthChatSettingsDto
|
|||
[JsonPropertyName("retailColors")] public bool? RetailColors { get; set; }
|
||||
// 2026-10-11: how many lines the scrollback keeps (ChatHistory); absent at the default (2000).
|
||||
[JsonPropertyName("historyLines")] public int? HistoryLines { get; set; }
|
||||
// 2026-11-22: player lines kept past historyLines (ChatHistory.MergeKeep); absent at the default (5000).
|
||||
[JsonPropertyName("playerHistoryLines")] public int? PlayerHistoryLines { get; set; }
|
||||
// 2026-11-22: the Channels tab shows every player line (ChatPlayerText); absent while on.
|
||||
[JsonPropertyName("channelsAllPlayerChat")] public bool? ChannelsAllPlayerChat { get; set; }
|
||||
// 2026-10-20: the tabs in a row across the top instead of the channels drawer; absent while off.
|
||||
[JsonPropertyName("tabsAcross")] public bool? TabsAcross { get; set; }
|
||||
[JsonPropertyName("customTabs")] public string[]? CustomTabs { get; set; }
|
||||
|
|
|
|||
|
|
@ -61,6 +61,10 @@ internal sealed class LootEditRowDto
|
|||
public int KeepCount { get; set; }
|
||||
public string Summary { get; set; } = string.Empty;
|
||||
public int Conditions { get; set; }
|
||||
/// <summary>Keep # per day: the window in hours, 0 = a plain Keep # (added 2026-11-22; 0 from an older RynthAi).</summary>
|
||||
public int PerDayHours { get; set; }
|
||||
/// <summary>Keep # per day: "1 of 2 picked up in the last 24 h, ..." (empty otherwise).</summary>
|
||||
public string PerDayStatus { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
internal sealed class LootEditRuleDto
|
||||
|
|
@ -73,6 +77,13 @@ internal sealed class LootEditRuleDto
|
|||
public int Priority { get; set; }
|
||||
public string? CustomExpression { get; set; }
|
||||
public List<LootEditConditionDto> Conditions { get; set; } = new();
|
||||
/// <summary>
|
||||
/// Keep # per day: the window in hours, 0 = off (added 2026-11-22). Null from an older RynthAi,
|
||||
/// which has no such option: the rule view hides it and sends null back (RynthAi keeps its own).
|
||||
/// </summary>
|
||||
public int? PerDayHours { get; set; }
|
||||
/// <summary>Keep # per day: today's count in words from RynthAi (shown, never sent back as an edit).</summary>
|
||||
public string PerDayStatus { get; set; } = string.Empty;
|
||||
|
||||
public LootEditRuleDto Clone()
|
||||
{
|
||||
|
|
@ -89,6 +100,7 @@ internal sealed class LootEditRuleDto
|
|||
|| CustomExpression != o.CustomExpression || Conditions.Count != o.Conditions.Count)
|
||||
return false;
|
||||
if (Action == LootEditVocabulary.KeepUpTo && KeepCount != o.KeepCount) return false;
|
||||
if (Action == LootEditVocabulary.KeepUpTo && (PerDayHours ?? 0) != (o.PerDayHours ?? 0)) return false;
|
||||
for (int i = 0; i < Conditions.Count; i++)
|
||||
if (!Conditions[i].SameAs(o.Conditions[i])) return false;
|
||||
return true;
|
||||
|
|
@ -425,9 +437,15 @@ internal static class LootEditVocabulary
|
|||
public static readonly int[] FilterActions = { 0, Keep, KeepUpTo, Salvage, Sell, Read };
|
||||
public static readonly string[] FilterLabels = { "All", "Keep", "Keep #", "Salvage", "Sell", "Read" };
|
||||
|
||||
public static string Badge(int action, int keepCount) => action switch
|
||||
/// <summary>Keep # per day: the window a new one starts with, and its bounds (RynthAi's LootPerDay).</summary>
|
||||
public const int PerDayDefaultHours = 24, PerDayMinHours = 1, PerDayMaxHours = 168;
|
||||
|
||||
public static string Badge(int action, int keepCount, int perDayHours = 0) => action switch
|
||||
{
|
||||
Keep => "KEEP",
|
||||
KeepUpTo when perDayHours == 24 => "KEEP " + keepCount.ToString(System.Globalization.CultureInfo.InvariantCulture) + "/DAY",
|
||||
KeepUpTo when perDayHours > 0 => "KEEP " + keepCount.ToString(System.Globalization.CultureInfo.InvariantCulture) + "/"
|
||||
+ perDayHours.ToString(System.Globalization.CultureInfo.InvariantCulture) + "H",
|
||||
KeepUpTo => "KEEP " + keepCount.ToString(System.Globalization.CultureInfo.InvariantCulture),
|
||||
Salvage => "SALVAGE",
|
||||
Sell => "SELL",
|
||||
|
|
|
|||
39
src/RynthCore.Engine/UI/Data/LootProfilePick.cs
Normal file
39
src/RynthCore.Engine/UI/Data/LootProfilePick.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
// ============================================================================
|
||||
// RynthCore.Engine - UI/Data/LootProfilePick.cs
|
||||
// Settings > Looting's "Loot Profile" row (UI/Data/SettingsData.cs): which
|
||||
// entry of RynthAi's loot profile list ("None", then LootProfiles' *.utl and
|
||||
// *.json, the dashboard snapshot's lootProfiles) is the profile in use. The
|
||||
// pick itself goes through RynthPluginSelectProfile (kind 1), the dashboard
|
||||
// pickers' path, so RynthAi saves it and says so in chat.
|
||||
// Pure (linked into RynthSuite's RynthAiHostTests).
|
||||
// ============================================================================
|
||||
|
||||
using System;
|
||||
|
||||
namespace RynthCore.Engine.UI.Data;
|
||||
|
||||
internal static class LootProfilePick
|
||||
{
|
||||
/// <summary>
|
||||
/// The entry for <paramref name="currentPath"/>: 0 (None) when no profile is in use; the entry with
|
||||
/// its file name when listed; else RynthAi's own <paramref name="selectedIdx"/>, kept in range.
|
||||
/// An empty list: 0.
|
||||
/// </summary>
|
||||
public static int Index(string[]? items, string? currentPath, int selectedIdx)
|
||||
{
|
||||
if (items == null || items.Length == 0) return 0;
|
||||
string path = (currentPath ?? string.Empty).Trim().Trim('"');
|
||||
if (path.Length == 0) return 0;
|
||||
string name = FileName(path);
|
||||
for (int i = 1; i < items.Length; i++)
|
||||
if (string.Equals(items[i], name, StringComparison.OrdinalIgnoreCase)) return i;
|
||||
return Math.Clamp(selectedIdx, 0, items.Length - 1);
|
||||
}
|
||||
|
||||
// Path.GetFileName without System.IO (either separator).
|
||||
private static string FileName(string path)
|
||||
{
|
||||
int cut = Math.Max(path.LastIndexOf('\\'), path.LastIndexOf('/'));
|
||||
return cut < 0 ? path : path[(cut + 1)..];
|
||||
}
|
||||
}
|
||||
|
|
@ -54,6 +54,11 @@ internal sealed class NavPayload
|
|||
/// <summary>Map editing commands RynthAi understands (addPointAt, movePointTo, setActive): 1 from
|
||||
/// RynthAi 2026-10-12. Older plugins omit it (0) and the Dungeon Map doesn't offer editing.</summary>
|
||||
public int MapEdit { get; set; }
|
||||
/// <summary>VirindiTank navs RynthAi found outside its NavProfiles folder (RynthAi 2026-11-22), and
|
||||
/// the line saying where they are. The Nav face shows them with a "Copy them into NavProfiles"
|
||||
/// button (copyStrayNavs). Older plugins omit both (0 / empty: nothing shown).</summary>
|
||||
public int StrayNavCount { get; set; }
|
||||
public string StrayNavText { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>A copy a face may change (its own point list); the points themselves are shared.</summary>
|
||||
public NavPayload Clone()
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@ internal sealed class RynthNavStatus
|
|||
public string Landblock = "----", LoadedLb = "----", Status = "", LastPath = "";
|
||||
public double NS, EW;
|
||||
public bool Goto;
|
||||
/// <summary>The goto is paused (RynthNav from 11-19: /rnav pause): the trip stays, the walking stopped.</summary>
|
||||
public bool Paused;
|
||||
|
||||
// Travel (RynthNav 0.6+; absent from older plugins: Travel stays false).
|
||||
public bool Travel;
|
||||
|
|
@ -84,6 +86,14 @@ internal sealed class RynthNavStatus
|
|||
public int OpenArrow;
|
||||
public RynthNavArrow? Arrow;
|
||||
public string RouteFor = "", RouteSummary = "";
|
||||
/// <summary>How long the route takes, seconds (RynthNav from 11-19: route "secs"; -1 = not known, an older RynthNav).</summary>
|
||||
public double RouteSecs = -1;
|
||||
/// <summary>
|
||||
/// Which of the ways there the route is (RynthNav from 11-19: "way" of "ways", 0 = older), and what
|
||||
/// it leaves out that a cheaper way took. The route view's Another way button asks for the next.
|
||||
/// </summary>
|
||||
public int RouteWay, RouteWays;
|
||||
public string RouteAvoids = "";
|
||||
/// <summary>The walking path RynthNav worked out for the trip: segments (one per walk), each a flat list of ns, ew pairs in degrees. Empty: none (older RynthNav, or no trip on the ground).</summary>
|
||||
public float[][] PathSegments = Array.Empty<float[]>();
|
||||
public bool RouteActive;
|
||||
|
|
@ -102,6 +112,8 @@ internal sealed class RynthNavStatus
|
|||
public string Version = "";
|
||||
public string GoLine = "", GoPhase = "";
|
||||
public double GoLeft = -1;
|
||||
/// <summary>The trip's time left while walking, seconds (RynthNav from 11-19: go "eta"; -1 = not known).</summary>
|
||||
public double GoEta = -1;
|
||||
public bool HasInfo, GraphLoaded, Indoors;
|
||||
public int TileHere = -1, OnDisk = -1;
|
||||
public string NavDir = "", NavSource = "", GraphStatus = "";
|
||||
|
|
@ -128,6 +140,8 @@ internal sealed class RynthNavStatus
|
|||
public string Tie1Text = "", Tie2Text = "", TiePendingText = "";
|
||||
public string[] MineLines = Array.Empty<string>();
|
||||
public string InfoHere = "", InfoNavData = "", InfoTiles = "", InfoGraph = "", InfoTownNet = "", InfoAtlas = "", InfoStatus = "";
|
||||
/// <summary>How long this character's trips take, as RynthNav has measured them (RynthNav from 11-19: info "times"; "" on older ones).</summary>
|
||||
public string InfoTimes = "";
|
||||
|
||||
// Display strings, built once per status.
|
||||
public string PlayerText = "— no pose —", MeshText = "not loaded", PathText = "";
|
||||
|
|
@ -152,6 +166,7 @@ internal sealed class RynthNavStatus
|
|||
if (r.TryGetProperty("runState", out v)) s.RunState = v.GetInt32();
|
||||
if (r.TryGetProperty("turnState", out v)) s.TurnState = v.GetInt32();
|
||||
if (r.TryGetProperty("goto", out v)) s.Goto = v.GetInt32() != 0;
|
||||
if (r.TryGetProperty("paused", out v)) s.Paused = s.Goto && v.GetInt32() != 0;
|
||||
// RynthNav 0.6.3+: "onMap" 0 in a dungeon, where ns/ew aren't map coordinates.
|
||||
s.OnMap = !r.TryGetProperty("onMap", out v) || v.ValueKind != JsonValueKind.Number || v.GetInt32() != 0;
|
||||
s.PlayerText = !s.HasPose ? "— no pose —"
|
||||
|
|
@ -219,9 +234,16 @@ internal sealed class RynthNavStatus
|
|||
}
|
||||
s.Route = steps.ToArray();
|
||||
double est = Num(route, "est");
|
||||
s.RouteSecs = route.TryGetProperty("secs", out var secs) && secs.ValueKind == JsonValueKind.Number ? secs.GetDouble() : -1;
|
||||
string time = About(s.RouteSecs);
|
||||
s.RouteSummary = teleports == 0
|
||||
? $"walk, about {Yards(est)}"
|
||||
: $"{teleports} teleport{(teleports == 1 ? "" : "s")}, about {Yards(est)} of effort";
|
||||
? $"walk, {(time.Length > 0 ? time + ", " : "")}about {Yards(est)}"
|
||||
: $"{(time.Length > 0 ? time + ", " : "")}{teleports} teleport{(teleports == 1 ? "" : "s")}, about {Yards(est)} of effort";
|
||||
s.RouteWay = Int(route, "way");
|
||||
s.RouteWays = Int(route, "ways");
|
||||
s.RouteAvoids = Str(route, "avoids");
|
||||
if (s.RouteWays > 1)
|
||||
s.RouteSummary += $"; way {s.RouteWay} of {s.RouteWays}" + (s.RouteAvoids.Length > 0 ? $" (avoids {s.RouteAvoids})" : "");
|
||||
s.RouteHeader = "To " + s.RouteFor + ": " + s.RouteSummary + (s.RouteActive ? " (walking)" : "");
|
||||
var lines = new string[s.Route.Length];
|
||||
for (int i = 0; i < lines.Length; i++)
|
||||
|
|
@ -265,10 +287,14 @@ internal sealed class RynthNavStatus
|
|||
s.GoLine = Str(go, "line");
|
||||
s.GoPhase = Str(go, "phase");
|
||||
s.GoLeft = go.TryGetProperty("left", out var l) && l.ValueKind == JsonValueKind.Number ? l.GetDouble() : -1;
|
||||
s.GoEta = go.TryGetProperty("eta", out var eta) && eta.ValueKind == JsonValueKind.Number ? eta.GetDouble() : -1;
|
||||
}
|
||||
s.StatusLine = s.Panel ? (s.GoLine.Length > 0 ? s.GoLine : s.Goto ? "walking" : "ready") : s.Status;
|
||||
// "town": walking inside the Town Network (RynthNav 0.6.2+).
|
||||
s.StepLeft = s.Goto && (s.GoPhase == "walk" || s.GoPhase == "town") && s.GoLeft >= 0 ? Yards(s.GoLeft) + " left" : "";
|
||||
// The whole trip's time left (RynthNav from 11-19), beside the step's distance: "340 yd left, about 2 min to go".
|
||||
string togo = s.Goto && s.GoEta >= 0 ? About(s.GoEta) + " to go" : "";
|
||||
if (togo.Length > 0) s.StepLeft = s.StepLeft.Length > 0 ? s.StepLeft + ", " + togo : togo;
|
||||
|
||||
if (r.TryGetProperty("info", out var info) && info.ValueKind == JsonValueKind.Object)
|
||||
{
|
||||
|
|
@ -283,6 +309,7 @@ internal sealed class RynthNavStatus
|
|||
s.HasTownNet = info.TryGetProperty("townNet", out _);
|
||||
s.TownNetLoaded = Int(info, "townNet") != 0;
|
||||
s.TownNetStatus = Str(info, "townNetStatus");
|
||||
s.InfoTimes = Str(info, "times");
|
||||
}
|
||||
if (r.TryGetProperty("markers", out var mk) && mk.ValueKind == JsonValueKind.Object)
|
||||
{
|
||||
|
|
@ -408,6 +435,17 @@ internal sealed class RynthNavStatus
|
|||
Math.Abs(ns).ToString("F2", CultureInfo.InvariantCulture) + (ns >= 0 ? "N" : "S") + ", "
|
||||
+ Math.Abs(ew).ToString("F2", CultureInfo.InvariantCulture) + (ew >= 0 ? "E" : "W");
|
||||
|
||||
/// <summary>"about 45 s", "about 4 min", "about 1 h 5 min" ("" for none): RynthNav's own wording (TripTimes.About).</summary>
|
||||
public static string About(double seconds)
|
||||
{
|
||||
if (double.IsNaN(seconds) || double.IsInfinity(seconds) || seconds < 0) return "";
|
||||
if (seconds < 60) return "about " + Math.Max(5, Math.Round(seconds / 5) * 5).ToString("0", CultureInfo.InvariantCulture) + " s";
|
||||
double min = Math.Round(seconds / 60);
|
||||
if (min < 60) return "about " + min.ToString("0", CultureInfo.InvariantCulture) + " min";
|
||||
return "about " + Math.Floor(min / 60).ToString("0", CultureInfo.InvariantCulture) + " h "
|
||||
+ (min % 60).ToString("0", CultureInfo.InvariantCulture) + " min";
|
||||
}
|
||||
|
||||
public static string Yards(double units) =>
|
||||
units < 1000 ? units.ToString("0", CultureInfo.InvariantCulture) + " yd"
|
||||
: (units / 1000.0).ToString("0.0", CultureInfo.InvariantCulture) + "k yd";
|
||||
|
|
|
|||
|
|
@ -161,6 +161,68 @@ internal static class SenseStore
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The selected object's name onto the list (the panel's "Add selected" button and /rc sense
|
||||
/// addselected): a monster, NPC, item, portal, anything the client has a name for. AC's thread
|
||||
/// (reads the selection and the name snapshot only).
|
||||
/// </summary>
|
||||
public static bool AddSelected(out string message)
|
||||
{
|
||||
uint id = ClientHelperHooks.GetSelectedItemId();
|
||||
if (id == 0) { message = "Select something in game first (a monster, an item...), then Add selected."; return false; }
|
||||
if (!ClientObjectHooks.TryGetSnapshotName(id, out string name) || string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
message = "The selected object has no name the client knows yet; try again in a moment.";
|
||||
return false;
|
||||
}
|
||||
return Add(name, out message);
|
||||
}
|
||||
|
||||
/// <summary>Where Virindi Sense keeps its list on this PC.</summary>
|
||||
public static string VirindiSensePath =>
|
||||
_virindiSensePath ??= SenseImport.DefaultPath(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments));
|
||||
|
||||
private static string? _virindiSensePath;
|
||||
|
||||
/// <summary>True when Virindi Sense's list is where it keeps it (a file check; not on AC's thread every frame).</summary>
|
||||
public static bool VirindiSenseListExists()
|
||||
{
|
||||
try { return File.Exists(VirindiSensePath); } catch { return false; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads a Virindi Sense list (<paramref name="file"/>, or its usual place when empty) on
|
||||
/// UiBackgroundWriter and adds its names (SenseImport). <paramref name="done"/> gets the line to
|
||||
/// show and whether it worked, on that thread. Any thread.
|
||||
/// </summary>
|
||||
public static void ImportVirindiSense(string? file, Action<string, bool> done)
|
||||
{
|
||||
if (!_loaded) { done("The watch list is still loading. Try again in a moment.", false); return; }
|
||||
string path = string.IsNullOrWhiteSpace(file) ? VirindiSensePath : file.Trim();
|
||||
UiBackgroundWriter.Enqueue("sense list (import)", () =>
|
||||
{
|
||||
List<string> names;
|
||||
try
|
||||
{
|
||||
if (!File.Exists(path)) { done(SenseImport.NotFound(path), false); return; }
|
||||
names = SenseImport.Parse(File.ReadAllLines(path));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
done($"Couldn't read {path}: {ex.Message}", false);
|
||||
return;
|
||||
}
|
||||
SenseMerge m;
|
||||
lock (Sync)
|
||||
{
|
||||
m = SenseImport.Merge(_terms, names);
|
||||
if (m.Added > 0) Publish(m.Terms);
|
||||
}
|
||||
RynthLog.UI($"Sense: imported {path}: {names.Count} names, {m.Added} added, {m.AlreadyThere} already there, {m.NoRoom} no room");
|
||||
done(SenseImport.Reply(m, names.Count, path), names.Count > 0);
|
||||
});
|
||||
}
|
||||
|
||||
public static void SetEnabled(int index, bool enabled)
|
||||
{
|
||||
lock (Sync)
|
||||
|
|
@ -184,6 +246,16 @@ internal static class SenseStore
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>Empties the watch list (the gear's "Remove all names").</summary>
|
||||
public static void Clear()
|
||||
{
|
||||
lock (Sync)
|
||||
{
|
||||
if (_terms.Length == 0) return;
|
||||
Publish(Array.Empty<SensePattern>());
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetAlerts(bool chat, bool beep)
|
||||
{
|
||||
if (chat == _alertChat && beep == _alertBeep) return;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@
|
|||
// row height, which row the mouse is on) and /rc sense's
|
||||
// look commands (compact on|off, collapse on|off, view ...)
|
||||
// with their replies.
|
||||
// SenseImport Virindi Sense's list (patterns.txt) read, merged into the
|
||||
// watch list, and the reply (2026-11-22).
|
||||
// ============================================================================
|
||||
|
||||
using System;
|
||||
|
|
@ -92,7 +94,12 @@ internal sealed class SenseFileData
|
|||
/// <summary>sense.txt as text (the store does the file I/O). Pure.</summary>
|
||||
internal static class SenseFile
|
||||
{
|
||||
public const int MaxTerms = 40;
|
||||
/// <summary>
|
||||
/// Most terms on the list. 40 until 2026-11-22; a Virindi Sense list brought over can be a few
|
||||
/// hundred names (one on hand had 163), so 250. The scan stops at a name's first match, and
|
||||
/// the panel's term chips scroll past a few rows.
|
||||
/// </summary>
|
||||
public const int MaxTerms = 250;
|
||||
public const int MaxTermLength = 64;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -170,6 +177,99 @@ internal static class SenseFile
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>What merging names into the watch list did.</summary>
|
||||
internal readonly record struct SenseMerge(SensePattern[] Terms, int Added, int AlreadyThere, int NoRoom);
|
||||
|
||||
/// <summary>
|
||||
/// Virindi Sense's list brought into Sense (2026-11-22). Virindi Sense keeps it in
|
||||
/// Documents\Decal Plugins\Virindi Sense\patterns.txt: the first line is how many names follow,
|
||||
/// then one name per line, matched anywhere in an object's name, any case (as Sense's terms
|
||||
/// without wildcards). The format is from a real file (CRLF, 163 names, repeats in it, no
|
||||
/// wildcards or other marks); nothing else about Virindi Sense is used. Pure.
|
||||
/// </summary>
|
||||
internal static class SenseImport
|
||||
{
|
||||
public const string VirindiSenseFolder = @"Decal Plugins\Virindi Sense";
|
||||
public const string VirindiSenseFile = "patterns.txt";
|
||||
|
||||
/// <summary>Where Virindi Sense keeps its list, under <paramref name="documentsDir"/> (My Documents).</summary>
|
||||
public static string DefaultPath(string documentsDir) =>
|
||||
System.IO.Path.Combine(documentsDir ?? string.Empty, VirindiSenseFolder, VirindiSenseFile);
|
||||
|
||||
/// <summary>
|
||||
/// The names in a patterns.txt: when the first line is a number, that many lines after it (fewer
|
||||
/// when the file ends first); without one, every line. Blank lines are skipped, names trimmed and
|
||||
/// cut to <see cref="SenseFile.MaxTermLength"/>, and repeats (any case) dropped.
|
||||
/// </summary>
|
||||
public static List<string> Parse(IEnumerable<string> lines)
|
||||
{
|
||||
var names = new List<string>();
|
||||
var seen = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
||||
bool first = true;
|
||||
int left = int.MaxValue;
|
||||
foreach (string raw in lines)
|
||||
{
|
||||
string line = (raw ?? string.Empty).Trim().TrimStart('');
|
||||
if (first)
|
||||
{
|
||||
first = false;
|
||||
if (int.TryParse(line, NumberStyles.Integer, CultureInfo.InvariantCulture, out int count) && count >= 0)
|
||||
{
|
||||
left = count;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (left-- <= 0) break;
|
||||
string name = SenseFile.Clean(line);
|
||||
if (name.Length == 0 || !seen.Add(name)) continue;
|
||||
names.Add(name);
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <paramref name="current"/> with <paramref name="names"/> added at the end, switched on. A name
|
||||
/// already on the list (any case) is left as it is; past <see cref="SenseFile.MaxTerms"/> the
|
||||
/// rest are counted as no room.
|
||||
/// </summary>
|
||||
public static SenseMerge Merge(IReadOnlyList<SensePattern> current, IEnumerable<string> names)
|
||||
{
|
||||
var next = new List<SensePattern>(current);
|
||||
int added = 0, there = 0, noRoom = 0;
|
||||
foreach (string raw in names)
|
||||
{
|
||||
string name = SenseFile.Clean(raw);
|
||||
if (name.Length == 0) continue;
|
||||
if (SenseFile.IndexOf(next, name) >= 0) { there++; continue; }
|
||||
if (next.Count >= SenseFile.MaxTerms) { noRoom++; continue; }
|
||||
next.Add(new SensePattern(name, true));
|
||||
added++;
|
||||
}
|
||||
return new SenseMerge(next.ToArray(), added, there, noRoom);
|
||||
}
|
||||
|
||||
/// <summary>The line after an import (the panel and /rc sense import).</summary>
|
||||
public static string Reply(SenseMerge m, int inFile, string file)
|
||||
{
|
||||
if (inFile == 0) return $"No names in {file}.";
|
||||
var sb = new StringBuilder();
|
||||
sb.Append(m.Added switch
|
||||
{
|
||||
0 => "No new names from Virindi Sense",
|
||||
1 => "Added 1 name from Virindi Sense",
|
||||
_ => $"Added {m.Added} names from Virindi Sense",
|
||||
});
|
||||
if (m.AlreadyThere > 0) sb.Append($"; {m.AlreadyThere} {(m.AlreadyThere == 1 ? "was" : "were")} on the list already");
|
||||
if (m.NoRoom > 0) sb.Append($"; {m.NoRoom} didn't fit (the list holds {SenseFile.MaxTerms})");
|
||||
sb.Append('.');
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>The line when there's no list to import.</summary>
|
||||
public static string NotFound(string file) =>
|
||||
$"No Virindi Sense list at {file}. /rc sense import <file> reads one from elsewhere.";
|
||||
}
|
||||
|
||||
/// <summary>The compact view's columns at a width (px): arrow, name and distance always.</summary>
|
||||
internal readonly record struct SenseCompactColumns(bool Location, bool Kind, float NameWidth);
|
||||
|
||||
|
|
@ -189,7 +289,22 @@ internal static class SenseLayout
|
|||
public const float CompactNameRoom = 110f;
|
||||
|
||||
public const string Usage =
|
||||
"Usage: /rc sense [compact on|off | collapse on|off | view full|compact|collapsed] (alone: opens or closes the Sense panel)";
|
||||
"Usage: /rc sense [compact on|off | collapse on|off | view full|compact|collapsed | addselected | import [file]] (alone: opens or closes the Sense panel)";
|
||||
|
||||
/// <summary>"/rc sense addselected" (or "add selected"): the selected object's name onto the list.</summary>
|
||||
public static bool IsAddSelected(string args)
|
||||
{
|
||||
string a = string.Join(' ', (args ?? string.Empty).Split(' ', StringSplitOptions.RemoveEmptyEntries)).ToLowerInvariant();
|
||||
return a is "addselected" or "add selected" or "addsel";
|
||||
}
|
||||
|
||||
/// <summary>"/rc sense import [file]": Virindi Sense's list (or the file given). <paramref name="file"/> is empty for the usual place.</summary>
|
||||
public static bool IsImport(string args, out string file)
|
||||
{
|
||||
string word = FirstWord(args, out string rest);
|
||||
file = rest.Trim().Trim('"').Trim();
|
||||
return word == "import";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Which compact columns fit in <paramref name="width"/> px (<paramref name="scale"/>: the text
|
||||
|
|
@ -321,6 +436,7 @@ internal static class SenseLayout
|
|||
{
|
||||
string a = (args ?? string.Empty).Trim();
|
||||
if (a.Length == 0) return true;
|
||||
if (IsAddSelected(a) || IsImport(a, out _)) return true;
|
||||
string word = FirstWord(a, out string rest);
|
||||
string value = rest.Trim().ToLowerInvariant();
|
||||
if (value.Contains(' ')) return false;
|
||||
|
|
|
|||
|
|
@ -99,6 +99,9 @@ internal sealed class RynthAiSettings
|
|||
// Melee through walls (RynthAi 2026-11-15, on by default). Null until RynthAi sends it; a save from an
|
||||
// engine with the row never sends null over an older RynthAi's value (it leaves an absent one alone).
|
||||
public bool? MeleeThroughWalls { get; set; }
|
||||
// Debuff every monster in range before attacking (RynthAi 2026-11-22, off by default). Null until RynthAi
|
||||
// sends it; a save sends null back, which RynthAi leaves alone.
|
||||
public bool? DebuffAllBeforeAttacking { get; set; }
|
||||
public int TargetNoProgressTimeoutSec { get; set; }
|
||||
public int GiveQueueIntervalMs { get; set; } = 150;
|
||||
// Recharge
|
||||
|
|
@ -665,9 +668,20 @@ internal static class SettingsSchema
|
|||
private static bool HasWeaponSwaps(RynthAiSettings s) => s.WeaponSwapMinGainPct.HasValue;
|
||||
private static bool HasDfRotation(RynthAiSettings s) => s.DfHeightRotation.HasValue;
|
||||
// RynthAi's DirtyFightingHeights.OrderChoices, and the labels its Dirty Fighting window shows.
|
||||
public static readonly string[] DfOrders = { "HML", "HLM", "MHL", "MLH", "LHM", "LMH" };
|
||||
// One or two heights too (R-20261120-014055-59be: "pick just 1 or 2 heights"); an older RynthAi
|
||||
// takes only the six with all three and keeps High, Medium, Low for the rest.
|
||||
public static readonly string[] DfOrders =
|
||||
{
|
||||
"HML", "HLM", "MHL", "MLH", "LHM", "LMH",
|
||||
"HM", "HL", "MH", "ML", "LH", "LM",
|
||||
"H", "M", "L",
|
||||
};
|
||||
private static readonly string[] DfOrderLabels =
|
||||
{ "High, Medium, Low", "High, Low, Medium", "Medium, High, Low", "Medium, Low, High", "Low, High, Medium", "Low, Medium, High" };
|
||||
{
|
||||
"High, Medium, Low", "High, Low, Medium", "Medium, High, Low", "Medium, Low, High", "Low, High, Medium", "Low, Medium, High",
|
||||
"High, Medium", "High, Low", "Medium, High", "Medium, Low", "Low, High", "Low, Medium",
|
||||
"High only", "Medium only", "Low only",
|
||||
};
|
||||
// RynthAi's DfDefaultHeight -1..2, shown in this order (index = value + 1).
|
||||
private static readonly string[] DfDefaultLabels = { "Attack Height setting", "Low", "Medium", "High" };
|
||||
private static int DfOrderIndex(string? order)
|
||||
|
|
@ -676,6 +690,30 @@ internal static class SettingsSchema
|
|||
return i < 0 ? 0 : i;
|
||||
}
|
||||
private static bool HasLootByName(RynthAiSettings s) => s.LootByNames != null;
|
||||
|
||||
/// <summary>Settings > Looting's first row: the loot profile picker.</summary>
|
||||
public const string LootProfileLabel = "Loot Profile";
|
||||
|
||||
// RynthAi's loot profile list and the one in use, from the dashboard snapshot (SettingsFace keeps it
|
||||
// polled while Settings shows). Empty before RynthAi answers: the row is hidden.
|
||||
private static string[] LootProfileItems() => UiSources.RynthAi.Current?.Value.Raw.LootProfiles ?? Array.Empty<string>();
|
||||
|
||||
private static int LootProfileIndex()
|
||||
{
|
||||
RynthAiSnapshot? raw = UiSources.RynthAi.Current?.Value.Raw;
|
||||
return raw == null ? 0 : LootProfilePick.Index(raw.LootProfiles, raw.CurrentLootPath, raw.SelectedLootIdx);
|
||||
}
|
||||
|
||||
// The dashboard pickers' own switch (RynthPluginSelectProfile, kind 1): RynthAi saves the choice with the
|
||||
// character's settings and says in chat which profile is in use. Nothing in the settings copy changes.
|
||||
private static SettingRow LootProfileRow() =>
|
||||
new(SettingKind.Combo, LootProfileLabel,
|
||||
"The loot profile in use: what corpses, chests and ground items give up (with Loot Mode Profile).\n" +
|
||||
"The same list and switch as the dashboard's Loaded files (LOOT) and the Mini Remote's Loot row:\n" +
|
||||
"RynthAi\\LootProfiles (*.utl, *.json); a file copied in shows within a few seconds. Chat says\n" +
|
||||
"which profile is in use after a switch.",
|
||||
_ => LootProfileIndex(), (_, v) => RynthAiCommands.SelectProfile(1, (int)v), 0, 1000, 1,
|
||||
VisibleWhen: _ => LootProfileItems().Length > 0, ItemsNow: LootProfileItems);
|
||||
// RynthAi's Loot.LootModes, in its order.
|
||||
public static readonly string[] LootModeNames = { "Profile", "Rares and needed mana stones only" };
|
||||
// RynthAi's OffhandDefault values (OffhandRules.SettingValue), shown as they are.
|
||||
|
|
@ -1083,7 +1121,7 @@ internal static class SettingsSchema
|
|||
Plugins.EngineSettings.RememberAcWindowPosition = v;
|
||||
AcWindowChrome.RequestApply();
|
||||
},
|
||||
"On: save where the Asheron's Call window sits for each character and move it back there after you log in. The game sets the window's size from its resolution; this never changes it. While this is on, the launcher's own memory of the window's spot (per account) stands aside.\nOff (default): the engine never moves the game window. A spot off every screen (a monitor that is gone) is pulled back onto one."),
|
||||
"On: save where the Asheron's Call window sits for each character and move it back there after you log in. The window's size always comes from the game's resolution, never from the saved spot: a window that isn't that size (a stretched picture) is put back to it. While this is on, the launcher's own memory of the window's spot (per account) stands aside.\nOff (default): the engine never moves the game window. A spot off every screen (a monitor that is gone) is pulled back onto one."),
|
||||
Spacer(),
|
||||
Section("Performance"),
|
||||
Bool("Enable FPS Limit", s => s.EnableFPSLimit, (s, v) => s.EnableFPSLimit = v, gates: true),
|
||||
|
|
@ -1313,11 +1351,12 @@ internal static class SettingsSchema
|
|||
when: HasDfRotation, gates: true),
|
||||
Combo(" Effect order", DfOrderLabels, s => DfOrderIndex(s.DfHeightOrder),
|
||||
(s, v) => s.DfHeightOrder = DfOrders[Math.Clamp(v, 0, DfOrders.Length - 1)],
|
||||
"The order the three effects are put on the target. Default High, Medium, Low.",
|
||||
"The order the effects are put on the target: all three, or just one or two of them.\n" +
|
||||
"Default High, Medium, Low.",
|
||||
when: s => s.DfHeightRotation == true && s.DfHeightOrder != null),
|
||||
Combo(" Then attack", DfDefaultLabels, s => Math.Clamp((s.DfDefaultHeight ?? -1) + 1, 0, DfDefaultLabels.Length - 1),
|
||||
(s, v) => s.DfDefaultHeight = Math.Clamp(v, 0, DfDefaultLabels.Length - 1) - 1,
|
||||
"Once all three are on, the height attacks use (Attack Height setting: the Melee or Missile Attack Height\n" +
|
||||
"Once the effects in the order are on, the height attacks use (Attack Height setting: the Melee or Missile Attack Height\n" +
|
||||
"above). They go back to an effect about 5 seconds before it runs out; each lasts 20 seconds.",
|
||||
when: s => s.DfHeightRotation == true && s.DfDefaultHeight.HasValue),
|
||||
Spacer(),
|
||||
|
|
@ -1353,6 +1392,9 @@ internal static class SettingsSchema
|
|||
"Off: a monster behind a wall is never a melee target for being close; it is treated like any monster\n" +
|
||||
"out of sight. On by default. /ra meleewalls [on|off]",
|
||||
when: s => s.MeleeThroughWalls.HasValue),
|
||||
Bool("Debuff every monster in range before attacking", s => s.DebuffAllBeforeAttacking ?? false, (s, v) => s.DebuffAllBeforeAttacking = v,
|
||||
"Casts each monster's Monsters-rule debuffs on every monster in range, nearest first, before attacking any (/ra debuffall).",
|
||||
when: s => s.DebuffAllBeforeAttacking.HasValue),
|
||||
Int("Attempts Before Blacklist", s => s.BlacklistAttempts, (s, v) => s.BlacklistAttempts = v, 1, 20, 1,
|
||||
"How many failed attack attempts on a mob before it gets blacklisted."),
|
||||
Int("Blacklist Timeout (sec)", s => s.BlacklistTimeoutSec, (s, v) => s.BlacklistTimeoutSec = v, 5, 120, 5,
|
||||
|
|
@ -1675,6 +1717,7 @@ internal static class SettingsSchema
|
|||
|
||||
new("Looting", new[]
|
||||
{
|
||||
LootProfileRow(),
|
||||
Bool("Enable Looting", s => s.EnableLooting, (s, v) => s.EnableLooting = v),
|
||||
Bool("Boost Loot Priority", s => s.BoostLootPriority, (s, v) => s.BoostLootPriority = v),
|
||||
Combo("Loot Mode", LootModeNames, s => Math.Clamp(s.LootMode ?? 0, 0, LootModeNames.Length - 1),
|
||||
|
|
|
|||
|
|
@ -70,6 +70,18 @@ internal static class RadarSettingsStore
|
|||
/// <summary>...and one at its Ring Range (ring spells). Off by default.</summary>
|
||||
public static bool ShowRingRangeRing;
|
||||
|
||||
/// <summary>
|
||||
/// ImGui face: monster names show only while this many monsters or fewer are on the radar; with more,
|
||||
/// the markers stay and their names go (R-20261122-165442-286c: "if there are more than 20 monsters
|
||||
/// on the radar, i don't want to see the names, it is too cluttered"). 0 = always (the default).
|
||||
/// Other kinds' names are not affected.
|
||||
/// </summary>
|
||||
public static int MonsterNamesUpTo;
|
||||
public const int MaxMonsterNamesUpTo = 200;
|
||||
|
||||
/// <summary>Whether monster names are drawn with <paramref name="monstersShown"/> monsters on the radar.</summary>
|
||||
public static bool MonsterNamesFor(int monstersShown) => MonsterNamesUpTo <= 0 || monstersShown <= MonsterNamesUpTo;
|
||||
|
||||
// Text sizes of the compass letters and the coordinate strip (px at 100% UI scale).
|
||||
public const float DefaultCompassSize = 14f, DefaultCoordSize = 11f, MinText = 8f, MaxText = 28f;
|
||||
public static float CompassSize = DefaultCompassSize;
|
||||
|
|
@ -234,6 +246,10 @@ internal static class RadarSettingsStore
|
|||
case "worldMap": ShowWorldMap = val == "1"; break;
|
||||
case "monsterRangeRing": ShowMonsterRangeRing = val == "1"; break;
|
||||
case "ringRangeRing": ShowRingRangeRing = val == "1"; break;
|
||||
case "monsterNamesUpTo":
|
||||
if (int.TryParse(val, NumberStyles.Integer, CultureInfo.InvariantCulture, out int mn))
|
||||
MonsterNamesUpTo = Math.Clamp(mn, 0, MaxMonsterNamesUpTo);
|
||||
break;
|
||||
case "worldMapOpacity":
|
||||
if (float.TryParse(val, NumberStyles.Float, CultureInfo.InvariantCulture, out float wo) && float.IsFinite(wo))
|
||||
WorldMapOpacity = Math.Clamp(wo, 0.1f, 1.0f);
|
||||
|
|
@ -305,6 +321,7 @@ internal static class RadarSettingsStore
|
|||
sw.WriteLine(FormattableString.Invariant($"worldMapOpacity={WorldMapOpacity:0.##}"));
|
||||
sw.WriteLine($"monsterRangeRing={(ShowMonsterRangeRing ? "1" : "0")}");
|
||||
sw.WriteLine($"ringRangeRing={(ShowRingRangeRing ? "1" : "0")}");
|
||||
sw.WriteLine($"monsterNamesUpTo={MonsterNamesUpTo.ToString(CultureInfo.InvariantCulture)}");
|
||||
sw.WriteLine(FormattableString.Invariant($"compassSize={CompassSize:0.##}"));
|
||||
sw.WriteLine(FormattableString.Invariant($"coordSize={CoordSize:0.##}"));
|
||||
var styleLines = new System.Collections.Generic.List<string>();
|
||||
|
|
|
|||
24
tools/AcGameDeviceTests/AcGameDeviceTests.csproj
Normal file
24
tools/AcGameDeviceTests/AcGameDeviceTests.csproj
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<!--
|
||||
Offline checks for the pure part of finding AC's own D3D9 device (2026-11-19):
|
||||
src\RynthCore.Engine\D3D9\AcGameDevicePolicy.cs, compiled in. The device field's offset read
|
||||
out of RenderDeviceD3D::SetFFAmbientColor32's code (and refused when the code isn't that), the
|
||||
render device global's call site landing on that function, and which devices may be hooked
|
||||
(EndScene, Reset and Present all in the loaded d3d9.dll). No AC, no files.
|
||||
Run: dotnet run -c Release (exit 0 = pass, 1 = fail)
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<InvariantGlobalization>true</InvariantGlobalization>
|
||||
<RootNamespace>AcGameDeviceTests</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\src\RynthCore.Engine\D3D9\AcGameDevicePolicy.cs" Link="Engine\AcGameDevicePolicy.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
121
tools/AcGameDeviceTests/Program.cs
Normal file
121
tools/AcGameDeviceTests/Program.cs
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
using RynthCore.Engine.D3D9;
|
||||
|
||||
namespace AcGameDeviceTests;
|
||||
|
||||
/// <summary>Finding AC's own D3D9 device without creating one (AcGameDevicePolicy).</summary>
|
||||
internal static class Program
|
||||
{
|
||||
private static int _checks, _failed;
|
||||
private static string _case = "";
|
||||
|
||||
// RenderDeviceD3D::SetFFAmbientColor32 on the 4,841,472-byte client (0x005A3EB0), first 40 bytes.
|
||||
private static readonly byte[] SetAmbient =
|
||||
[
|
||||
0x56, 0x8B, 0xF1, 0x8A, 0x86, 0x70, 0x04, 0x00, 0x00, 0x84, 0xC0, 0x57, 0x8B, 0x7C, 0x24, 0x0C,
|
||||
0x75, 0x08, 0x39, 0xBE, 0xA0, 0x04, 0x00, 0x00, 0x74, 0x1B, 0x8B, 0x86, 0x68, 0x04, 0x00, 0x00,
|
||||
0x8B, 0x08, 0x57, 0x68, 0x8B, 0x00, 0x00, 0x00,
|
||||
];
|
||||
|
||||
// PrimD3DRender::UpdateLightsInternal at 0x0059C15E .. the call at 0x0059C175 (E8 36 7D 00 00 -> 0x005A3EB0).
|
||||
private static readonly byte[] CallSite =
|
||||
[
|
||||
0x8B, 0x0D, 0x40, 0x03, 0x87, 0x00, 0xC1, 0xE0, 0x08, 0x0B, 0xC3, 0xC1, 0xE0, 0x08, 0x0B, 0xC7,
|
||||
0xC1, 0xE0, 0x08, 0x55, 0x0B, 0xC6, 0x50, 0xE8, 0x36, 0x7D, 0x00, 0x00,
|
||||
];
|
||||
|
||||
private static int Main()
|
||||
{
|
||||
OffsetFromTheClient();
|
||||
OffsetAnywhereInABuffer();
|
||||
OffsetRefusesOtherCode();
|
||||
OffsetRefusesImplausible();
|
||||
CallSiteLands();
|
||||
JudgeDevices();
|
||||
|
||||
Console.WriteLine(_failed == 0 ? $"PASS ({_checks} assertions)" : $"FAIL ({_failed} of {_checks} assertions)");
|
||||
return _failed == 0 ? 0 : 1;
|
||||
}
|
||||
|
||||
private static void Case(string name) { _case = name; Console.WriteLine("ok " + name); }
|
||||
|
||||
private static void Check(bool ok, string what)
|
||||
{
|
||||
_checks++;
|
||||
if (ok) return;
|
||||
_failed++;
|
||||
Console.WriteLine($"FAIL {_case}: {what}");
|
||||
}
|
||||
|
||||
private static void Eq(int got, int want, string what) => Check(got == want, $"{what}: got 0x{got:X}, want 0x{want:X}");
|
||||
|
||||
private static void OffsetFromTheClient()
|
||||
{
|
||||
Case("the device offset is read from the client's SetFFAmbientColor32");
|
||||
Eq(AcGameDevicePolicy.DeviceOffsetFromSetAmbient(SetAmbient, 0), 0x468, "offset");
|
||||
Eq(AcGameDevicePolicy.DeviceOffsetFallback, 0x468, "fallback matches the client");
|
||||
}
|
||||
|
||||
private static void OffsetAnywhereInABuffer()
|
||||
{
|
||||
Case("the offset is read where the match is, not at 0");
|
||||
byte[] buf = new byte[100];
|
||||
SetAmbient.CopyTo(buf, 37);
|
||||
Eq(AcGameDevicePolicy.DeviceOffsetFromSetAmbient(buf, 37), 0x468, "at 37");
|
||||
Eq(AcGameDevicePolicy.DeviceOffsetFromSetAmbient(buf, 36), -1, "one byte off");
|
||||
byte[] moved = (byte[])SetAmbient.Clone();
|
||||
moved[28] = 0x70; moved[29] = 0x05;
|
||||
Eq(AcGameDevicePolicy.DeviceOffsetFromSetAmbient(moved, 0), 0x570, "another build's offset");
|
||||
}
|
||||
|
||||
private static void OffsetRefusesOtherCode()
|
||||
{
|
||||
Case("code that isn't the device read gives no offset");
|
||||
foreach (int i in new[] { 26, 27, 32, 33, 34, 35, 36 })
|
||||
{
|
||||
byte[] bad = (byte[])SetAmbient.Clone();
|
||||
bad[i] ^= 0xFF;
|
||||
Eq(AcGameDevicePolicy.DeviceOffsetFromSetAmbient(bad, 0), -1, $"byte {i} changed");
|
||||
}
|
||||
Eq(AcGameDevicePolicy.DeviceOffsetFromSetAmbient(SetAmbient.AsSpan(0, 36), 0), -1, "cut short");
|
||||
Eq(AcGameDevicePolicy.DeviceOffsetFromSetAmbient(SetAmbient, -1), -1, "negative start");
|
||||
Eq(AcGameDevicePolicy.DeviceOffsetFromSetAmbient(ReadOnlySpan<byte>.Empty, 0), -1, "empty");
|
||||
}
|
||||
|
||||
private static void OffsetRefusesImplausible()
|
||||
{
|
||||
Case("an implausible offset is refused");
|
||||
foreach ((byte lo, byte hi, byte b2) in new[] { ((byte)0x69, (byte)0x04, (byte)0), ((byte)0x00, (byte)0x00, (byte)0), ((byte)0x04, (byte)0x00, (byte)0), ((byte)0x00, (byte)0x80, (byte)0), ((byte)0x68, (byte)0x04, (byte)0x01) })
|
||||
{
|
||||
byte[] bad = (byte[])SetAmbient.Clone();
|
||||
bad[28] = lo; bad[29] = hi; bad[30] = b2;
|
||||
Eq(AcGameDevicePolicy.DeviceOffsetFromSetAmbient(bad, 0), -1, $"offset bytes {lo:X2} {hi:X2} {b2:X2}");
|
||||
}
|
||||
Check(AcGameDevicePolicy.IsPlausibleOffset(0x468), "0x468 plausible");
|
||||
Check(!AcGameDevicePolicy.IsPlausibleOffset(-4), "negative not plausible");
|
||||
}
|
||||
|
||||
private static void CallSiteLands()
|
||||
{
|
||||
Case("the global's call site must call SetFFAmbientColor32");
|
||||
const int siteVa = 0x0059C15E, callAt = 23;
|
||||
Check(AcGameDevicePolicy.CallLandsOn(CallSite, callAt, siteVa + callAt, 0x005A3EB0), "lands on 0x005A3EB0");
|
||||
Check(!AcGameDevicePolicy.CallLandsOn(CallSite, callAt, siteVa + callAt, 0x005A3EC0), "not another function");
|
||||
Check(!AcGameDevicePolicy.CallLandsOn(CallSite, callAt, siteVa + callAt + 1, 0x005A3EB0), "VA matters");
|
||||
Check(!AcGameDevicePolicy.CallLandsOn(CallSite, callAt - 1, siteVa + callAt - 1, 0x005A3EB0), "not an E8");
|
||||
Check(!AcGameDevicePolicy.CallLandsOn(CallSite.AsSpan(0, 26), callAt, siteVa + callAt, 0x005A3EB0), "cut short");
|
||||
Check(!AcGameDevicePolicy.CallLandsOn(CallSite, -1, siteVa - 1, 0x005A3EB0), "negative");
|
||||
}
|
||||
|
||||
private static void JudgeDevices()
|
||||
{
|
||||
Case("only a device whose EndScene, Reset and Present are d3d9's is used");
|
||||
const long d3d9 = 0x61E00000, other = 0x10000000;
|
||||
Check(AcGameDevicePolicy.JudgeDevice(d3d9, d3d9, d3d9, d3d9) == null, "all in d3d9 = good");
|
||||
Check(AcGameDevicePolicy.JudgeDevice(0, 0, 0, 0) != null, "no d3d9 loaded");
|
||||
Check(AcGameDevicePolicy.JudgeDevice(d3d9, other, d3d9, d3d9) != null, "EndScene elsewhere (a wrapper's vtable)");
|
||||
Check(AcGameDevicePolicy.JudgeDevice(d3d9, 0, d3d9, d3d9) != null, "EndScene in no module");
|
||||
Check(AcGameDevicePolicy.JudgeDevice(d3d9, d3d9, other, d3d9) != null, "Reset elsewhere");
|
||||
Check(AcGameDevicePolicy.JudgeDevice(d3d9, d3d9, d3d9, 0) != null, "Present in no module");
|
||||
Check(AcGameDevicePolicy.JudgeDevice(d3d9, other, other, other)?.Contains("EndScene") == true, "the first bad slot is named");
|
||||
}
|
||||
}
|
||||
|
|
@ -20,6 +20,7 @@ internal static class Program
|
|||
TheTypeId();
|
||||
WorldTakesTheClick();
|
||||
AcWindowsKeepTheClick();
|
||||
PortalSpaceViewIsTheWorld();
|
||||
FailOpen();
|
||||
NothingUnderTheMouse();
|
||||
|
||||
|
|
@ -63,6 +64,33 @@ internal static class Program
|
|||
}
|
||||
}
|
||||
|
||||
private static void PortalSpaceViewIsTheWorld()
|
||||
{
|
||||
// 2026-11-20: in portal space gmSmartBoxUI shows its viewport child 0x10000436 (the portal swirl)
|
||||
// over the 3D view. Classed as an AC window, every window drawn under AC's UI went click-through
|
||||
// for the whole portal (the DreamWeave Skills window took no clicks, scrolls or tab changes).
|
||||
Case("portal space: the portal-space view (element 0x10000436, a viewport) stands in for the world");
|
||||
Check(AcMouseOverRules.ElementIdPortalSpaceView == 0x10000436, "gmSmartBoxUI PostInit's GetChildRecursive(0x10000436)");
|
||||
const int Viewport = 0xD; // PostInit's DynamicCast type
|
||||
AcMouseTarget p = AcMouseOverRules.Classify(true, false, SomeElement, true, Viewport, AcMouseOverRules.ElementIdPortalSpaceView);
|
||||
Check(p == AcMouseTarget.World, $"portal-space view under the mouse = World (got {p})");
|
||||
Check(AcMouseOverRules.UnderUiOverlayMayTakeClick(p), "portal-space view: an under-UI window may take the click");
|
||||
|
||||
Case("portal space: AC's real windows (chat, radar...) still keep the click");
|
||||
AcMouseTarget other = AcMouseOverRules.Classify(true, false, SomeElement, true, Viewport, 0x10000437);
|
||||
Check(other == AcMouseTarget.AcWindow, $"another viewport (another element id) = AcWindow (got {other})");
|
||||
AcMouseTarget list = AcMouseOverRules.Classify(true, false, SomeElement, true, ItemList, 0x100001A5);
|
||||
Check(list == AcMouseTarget.AcWindow, $"an item list = AcWindow (got {list})");
|
||||
AcMouseTarget noId = AcMouseOverRules.Classify(true, false, SomeElement, true, Viewport, 0);
|
||||
Check(noId == AcMouseTarget.AcWindow, $"a viewport whose id couldn't be read = AcWindow (got {noId})");
|
||||
|
||||
Case("the id alone doesn't change the other answers");
|
||||
AcMouseTarget unk = AcMouseOverRules.Classify(true, false, SomeElement, false, 0, AcMouseOverRules.ElementIdPortalSpaceView);
|
||||
Check(unk == AcMouseTarget.Unknown, $"type unreadable = Unknown, id or not (got {unk})");
|
||||
AcMouseTarget outside = AcMouseOverRules.Classify(true, true, SomeElement, true, Viewport, AcMouseOverRules.ElementIdPortalSpaceView);
|
||||
Check(outside == AcMouseTarget.Nothing, $"cursor outside the client = Nothing (got {outside})");
|
||||
}
|
||||
|
||||
private static void FailOpen()
|
||||
{
|
||||
Case("AC's UI state unreadable: today's behaviour (the plate takes the click)");
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@
|
|||
<!-- 2026-10-19: the retail-chat verdict (a hidden line also stays out of AC's own chat window):
|
||||
the real router, standard filters and verdict, with EngineStubs.cs standing in for the engine. -->
|
||||
<Compile Include="..\..\src\RynthCore.Engine\UI\Data\ChatRouting.cs" Link="Engine\ChatRouting.cs" />
|
||||
<!-- 2026-11-22: player chat (the Channels tab, kept longer) and the scrollback's length. -->
|
||||
<Compile Include="..\..\src\RynthCore.Engine\UI\Data\ChatPlayerText.cs" Link="Engine\ChatPlayerText.cs" />
|
||||
<Compile Include="..\..\src\RynthCore.Engine\UI\Data\ChatHistory.cs" Link="Engine\ChatHistory.cs" />
|
||||
<Compile Include="..\..\src\RynthCore.Engine\UI\Data\ChatRetailVerdict.cs" Link="Engine\ChatRetailVerdict.cs" />
|
||||
<Compile Include="..\..\src\RynthCore.Engine\UI\Panels\RynthChatPresets.cs" Link="Engine\RynthChatPresets.cs" />
|
||||
<!-- 2026-10-19: re-reading the shared rynthchat_settings.json when another client saved it. -->
|
||||
|
|
|
|||
228
tools/ChatFilterTests/Program.PlayerChat.cs
Normal file
228
tools/ChatFilterTests/Program.PlayerChat.cs
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
using System.Text.Json;
|
||||
using RynthCore.Engine.UI.Data;
|
||||
|
||||
namespace ChatFilterTests;
|
||||
|
||||
// Player chat (2026-11-22): its own file, so it merges cleanly beside other branches' tests.
|
||||
internal static partial class Program
|
||||
{
|
||||
// ── Player chat (2026-11-22): every player line under Channels, kept longer than the spam ──
|
||||
|
||||
/// <summary>A line as the engine makes it: the channel RynthChat files it under (ChatRetailVerdict
|
||||
/// follows the plugin), AC's name links stripped.</summary>
|
||||
private static ChatLine PlayerTestLine(long id, string text, int type) =>
|
||||
new(id, "12:00:00", ChatRetailVerdict.ChannelFor(text, type), type, null, text);
|
||||
|
||||
private static void PlayerChatLines()
|
||||
{
|
||||
Case("player chat: tells both ways, say, emotes, fellowship, allegiance, channels, room lines; not combat, spells, system, loot");
|
||||
(string Text, int Type, bool Player)[] lines =
|
||||
{
|
||||
("Bob tells you, \"hi\"", 3, true),
|
||||
("You tell Bob, \"hi\"", 4, true),
|
||||
("Bob says, \"hi\"", 2, true),
|
||||
("You say, \"anyone selling keys?\"", 2, true),
|
||||
("Bob waves.", 12, true),
|
||||
("[Allegiance] Bob says, \"hi\"", 18, true),
|
||||
("Bob says to your fellowship, \"pull\"", 19, true),
|
||||
("[General] Bob says, \"hi\"", 8, true),
|
||||
("You say on the Trade channel, \"WTS\"", 9, true),
|
||||
("[Trade] Bob says, \"WTS Black Opal\"", 28, true),
|
||||
("[General] Aja says, \"lol\"", ServerChannelType, true),
|
||||
("[Roleplay] Bob@coldeve says, \"hi\"", 5, true), // a network Global room line
|
||||
("[Hunters] Bob@coldeve (Discord) says, \"hi\"", 5, true), // an invite-only network room
|
||||
("[Patron] Bob says, \"well done\"", 5, true),
|
||||
("Admin tells you, \"server restart in 5\"", 0x1F, true),
|
||||
("You say, \"Malar Zhavik\"", 17, false), // your spell words
|
||||
("Drudge Sorcerer says, \"Zojak Equin\"", 17, false),
|
||||
("You slash Drudge Slinker for 54 points of slashing damage!", 22, false),
|
||||
("Tusker Guard grazes your foot for 4 points of bludgeoning damage!", 21, false),
|
||||
("The spell consumed the following components: Prismatic Taper", 7, false),
|
||||
("You've banked 1,250 Luminance.", 26, false),
|
||||
("[BANK] Your balances:", 5, false),
|
||||
("You have killed 50 Drudges! Your task is complete!", 0, false),
|
||||
("[RynthAi] Looting Drudge Slinker", 2, false),
|
||||
("[RynthAi Item] Bob's Sword, \"x\"", 0, false),
|
||||
("[Pet] Fire Banshee hit Drudge for 40 damage.", 5, false),
|
||||
("In portal Space", 0, false),
|
||||
};
|
||||
foreach (var (text, type, player) in lines)
|
||||
{
|
||||
string chan = ChatRetailVerdict.ChannelFor(text, type);
|
||||
Check(ChatPlayerText.IsPlayerChat(chan, type, text) == player, $"'{text}' (type {type}, {chan}): player chat {player}");
|
||||
Check(PlayerTestLine(1, text, type).IsPlayerChat == player, $"'{text}': ChatLine.IsPlayerChat {player}");
|
||||
}
|
||||
// AC's name links, as the plugin sees the text (the engine strips them first).
|
||||
Check(ChatPlayerText.LooksLikeSpeech("[Hunters] <Tell:IIDString:0:Bob>Bob<\\Tell> says, \"hi\""), "a room line with AC's name link");
|
||||
Check(!ChatPlayerText.LooksLikeSpeech("[Hunters] Bob says hi"), "no quote: not speech");
|
||||
Check(!ChatPlayerText.LooksLikeSpeech("[Bank] Balance, \"5\""), "a tag and a quote but nobody says it");
|
||||
Check(!ChatPlayerText.LooksLikeSpeech("Bob says, \"[Trade] Ann says, \\\"x\\\"\""), "an untagged say quoting a room line is left to its type");
|
||||
Check(!ChatPlayerText.LooksLikeSpeech(null) && !ChatPlayerText.LooksLikeSpeech(""), "null and empty");
|
||||
}
|
||||
|
||||
private const int ServerChannelType = 27;
|
||||
|
||||
private static void PlayerChatInChannels()
|
||||
{
|
||||
Case("player chat: shown under Channels (setting on) as well as its own tab; Move rules still take it away");
|
||||
var router = new ChatRouter(Array.Empty<ChatFilterRule>(), null, "", countHits: false);
|
||||
ChatLine tell = PlayerTestLine(1, "Bob tells you, \"hi\"", 3);
|
||||
ChatLine fellow = PlayerTestLine(2, "Bob says to your fellowship, \"pull\"", 19);
|
||||
ChatLine trade = PlayerTestLine(3, "[Trade] Bob says, \"WTS\"", 28);
|
||||
ChatLine hit = PlayerTestLine(4, "You slash Drudge Slinker for 54 points of slashing damage!", 22);
|
||||
bool In(ChatLine l, ChatRoute r, string tab, bool settingOn = true) => r.ShowsIn(tab, l.Channel, l.IsPlayerChat && settingOn);
|
||||
|
||||
foreach (ChatLine l in new[] { tell, fellow, trade })
|
||||
{
|
||||
ChatRoute r = router.Evaluate(l, null);
|
||||
Check(In(l, r, "Channels"), $"'{l.Text}' is under Channels");
|
||||
Check(In(l, r, "All") && In(l, r, l.Channel), $"'{l.Text}' is still under All and {l.Channel}");
|
||||
Check(!In(l, r, "Combat") && !In(l, r, "System"), $"'{l.Text}' is not under Combat or System");
|
||||
}
|
||||
Check(!In(tell, router.Evaluate(tell, null), "Channels", settingOn: false), "setting off: a tell is not under Channels");
|
||||
Check(In(trade, router.Evaluate(trade, null), "Channels", settingOn: false), "setting off: a channel line still is");
|
||||
Check(!In(hit, router.Evaluate(hit, null), "Channels"), "a combat line is never under Channels");
|
||||
Check(ChatRoute.Default.ShowsIn("Chat", "Chat") && !ChatRoute.Default.ShowsIn("Channels", "Chat"), "the old two-argument call is unchanged");
|
||||
|
||||
// Rules: Move takes a line out of All and its channel tabs, Channels included; Copy keeps it there.
|
||||
ChatFilterRule Rule(string pattern, ChatRuleAction action, string tab)
|
||||
{
|
||||
var r = new ChatFilterRule { Pattern = pattern, Action = action, Tab = tab, Mode = ChatMatchMode.Contains };
|
||||
r.Recompile();
|
||||
return r;
|
||||
}
|
||||
var moved = new ChatRouter(new[] { Rule(" tells you, ", ChatRuleAction.Move, "Tells") }, null, "", countHits: false).Evaluate(tell, null);
|
||||
Check(In(tell, moved, "Tells") && !In(tell, moved, "Channels") && !In(tell, moved, "All"), "Move to Tells: only under Tells");
|
||||
var copied = new ChatRouter(new[] { Rule(" tells you, ", ChatRuleAction.Copy, "Tells") }, null, "", countHits: false).Evaluate(tell, null);
|
||||
Check(In(tell, copied, "Tells") && In(tell, copied, "Channels") && In(tell, copied, "Chat"), "Copy to Tells: under Tells, Channels and Chat");
|
||||
var hidden = new ChatRouter(new[] { Rule(" tells you, ", ChatRuleAction.Hide, "") }, null, "", countHits: false).Evaluate(tell, null);
|
||||
Check(!In(tell, hidden, "Channels") && !In(tell, hidden, "All"), "Hide: nowhere");
|
||||
// A rule held to "chan:Channels" still means the lines filed there, not every player line.
|
||||
var chanRule = Rule("hi", ChatRuleAction.Copy, "X");
|
||||
chanRule.When = "chan:Channels";
|
||||
Check(!new ChatRouter(new[] { chanRule }, null, "", countHits: false).Evaluate(tell, null).ShowsIn("X", tell.Channel, true),
|
||||
"a 'chan:Channels' rule does not match a tell");
|
||||
}
|
||||
|
||||
private static readonly Func<ChatLine, bool> IsPlayerLine = l => l.IsPlayerChat;
|
||||
private static readonly Func<int, bool> IsEven = n => n % 2 == 0;
|
||||
|
||||
private static void PlayerChatKeptLonger()
|
||||
{
|
||||
Case("player chat history: player lines outlast Chat history; nothing kept before goes sooner");
|
||||
int[] none = Array.Empty<int>();
|
||||
// No player limit: exactly the old Merge.
|
||||
var rng = new Random(1122);
|
||||
for (int t = 0; t < 200; t++)
|
||||
{
|
||||
int[] old = Enumerable.Range(1, rng.Next(0, 40)).ToArray();
|
||||
int[] add = Enumerable.Range(old.Length + 1, rng.Next(0, 40)).ToArray();
|
||||
int max = rng.Next(1, 50);
|
||||
if (!ChatHistory.MergeKeep(old, add, max, 0, IsEven).SequenceEqual(ChatHistory.Merge(old, add, max)))
|
||||
{ Check(false, $"playerMax 0 is the old Merge (old {old.Length}, added {add.Length}, max {max})"); break; }
|
||||
}
|
||||
Check(true, "playerMax 0 is the old Merge (200 random cases)");
|
||||
|
||||
// Evens are "player" lines. 1..100, keep 10 + 20 player lines.
|
||||
int[] all = Enumerable.Range(1, 100).ToArray();
|
||||
int[] kept = ChatHistory.MergeKeep(none, all, 10, 20, IsEven);
|
||||
Check(kept.Skip(kept.Length - 10).SequenceEqual(Enumerable.Range(91, 10)), "the newest 10 are all kept");
|
||||
int[] evens = kept.Where(IsEven).ToArray();
|
||||
Check(evens.Length == 20 && evens[0] == 62 && evens[^1] == 100, $"the newest 20 player lines are kept, those in the main window counted too ({string.Join(",", evens.Take(3))}..)");
|
||||
Check(kept.Length == 25 && kept.SequenceEqual(kept.OrderBy(n => n)), $"25 lines (10 + 15 older player lines), in order ({kept.Length})");
|
||||
Check(ChatHistory.MergeKeep(none, all, 10, 3, IsEven).SequenceEqual(Enumerable.Range(91, 10)), "a player limit below the main window adds nothing");
|
||||
Check(ChatHistory.MergeKeep(none, all, 200, 5, IsEven).SequenceEqual(all), "under both limits: everything");
|
||||
|
||||
// Merging in steps gives the same as merging at once.
|
||||
int[] stepped = none;
|
||||
for (int i = 0; i < 100; i += 7) stepped = ChatHistory.MergeKeep(stepped, all.Skip(i).Take(7).ToArray(), 10, 20, IsEven);
|
||||
Check(stepped.SequenceEqual(kept), "seven at a time: the same lines");
|
||||
|
||||
// Lowering either setting trims at once; nothing to trim: null.
|
||||
Check(ChatHistory.TrimKeep(kept, 10, 20, IsEven) == null, "same settings: nothing to trim");
|
||||
int[]? lower = ChatHistory.TrimKeep(kept, 10, 12, IsEven);
|
||||
Check(lower != null && lower.Where(IsEven).Count() == 12 && lower.Length == 17, $"player limit 20 -> 12: 17 lines ({lower?.Length})");
|
||||
int[]? shorter = ChatHistory.TrimKeep(kept, 4, 20, IsEven);
|
||||
Check(shorter != null && shorter.Skip(shorter.Length - 4).SequenceEqual(new[] { 97, 98, 99, 100 }) && shorter.Where(n => !IsEven(n)).Count() == 2,
|
||||
"history 10 -> 4: the odd lines outside the newest 4 go");
|
||||
Check(ChatHistory.TrimKeep(kept, 1000, 1000, IsEven) == null, "raising the settings drops nothing");
|
||||
|
||||
Check(ChatHistory.ClampPlayer(0) == 5000 && ChatHistory.ClampPlayer(-1) == 5000 && ChatHistory.ClampPlayer(1) == 500
|
||||
&& ChatHistory.ClampPlayer(7240) == 7000 && ChatHistory.ClampPlayer(7260) == 7500 && ChatHistory.ClampPlayer(999999) == 20000,
|
||||
"Player chat history: default 5000, steps of 500, 500..20000");
|
||||
}
|
||||
|
||||
private static void PlayerChatFeedSimulated()
|
||||
{
|
||||
Case("player chat history: an hour of a busy hunt (10,000-line history) keeps every tell, fellowship and allegiance line");
|
||||
// The reported case: Chat history at its most (10,000), and tells, allegiance and fellowship
|
||||
// gone within the hour. 60,000 combat lines with 300 player lines among them, in polls.
|
||||
var rng = new Random(2211);
|
||||
ChatLine[] kept = Array.Empty<ChatLine>();
|
||||
long id = 0;
|
||||
var playerIds = new List<long>();
|
||||
string[] say = { "Bob tells you, \"inv\"", "[Allegiance] Ann says, \"gz\"", "Bob says to your fellowship, \"pull\"", "You tell Bob, \"omw\"" };
|
||||
int[] sayType = { 3, 18, 19, 4 };
|
||||
for (int poll = 0; poll < 6000; poll++)
|
||||
{
|
||||
var added = new List<ChatLine>();
|
||||
for (int k = 0; k < 10; k++) added.Add(PlayerTestLine(++id, "You slash Drudge Slinker for 54 points of slashing damage!", 22));
|
||||
if (poll % 20 == 0)
|
||||
{
|
||||
int s = rng.Next(say.Length);
|
||||
added.Add(PlayerTestLine(++id, say[s], sayType[s]));
|
||||
playerIds.Add(id);
|
||||
}
|
||||
kept = ChatHistory.MergeKeep(kept, added, 10000, 5000, IsPlayerLine);
|
||||
}
|
||||
var keptIds = new HashSet<long>(kept.Select(l => l.Id));
|
||||
Check(playerIds.All(keptIds.Contains), $"all {playerIds.Count} player lines are still kept");
|
||||
Check(kept.Length == 10000 + playerIds.Count(p => p <= id - 10000), $"the newest 10,000 plus the older player lines ({kept.Length})");
|
||||
bool ordered = true;
|
||||
for (int i = 1; i < kept.Length; i++) ordered &= kept[i].Id > kept[i - 1].Id;
|
||||
Check(ordered, "still in arrival order");
|
||||
// The Channels view of it: every player line, in order.
|
||||
var channels = kept.Where(l => l.Route.ShowsIn("Channels", l.Channel, l.IsPlayerChat)).Select(l => l.Id).ToList();
|
||||
Check(channels.SequenceEqual(playerIds), "the Channels tab shows them all, oldest first");
|
||||
// Before: the same feed through Merge kept only the player lines of the last 10,000.
|
||||
Check(playerIds.Count(p => p > id - 10000) < playerIds.Count / 2, "(the old Merge would have lost most of them)");
|
||||
}
|
||||
|
||||
private static void PlayerChatViewDrops()
|
||||
{
|
||||
Case("chat view: a line the source dropped leaves the view even when an older one stays (FindGone)");
|
||||
var gone = new List<int>();
|
||||
Func<int, long> self = n => n;
|
||||
ChatHistory.FindGone(new[] { 2, 4, 5, 6, 8, 9 }, new[] { 2, 4, 6, 8, 9, 10 }, self, gone);
|
||||
Check(gone.SequenceEqual(new[] { 2 }), $"an interior line (5) is found ({string.Join(",", gone)})");
|
||||
ChatHistory.FindGone(new[] { 1, 2, 3, 4 }, new[] { 3, 4, 5 }, self, gone);
|
||||
Check(gone.SequenceEqual(new[] { 0, 1 }), "the old case, the oldest lines, still is");
|
||||
ChatHistory.FindGone(new[] { 1, 2 }, Array.Empty<int>(), self, gone);
|
||||
Check(gone.SequenceEqual(new[] { 0, 1 }), "an empty source drops everything");
|
||||
ChatHistory.FindGone(Array.Empty<int>(), new[] { 1 }, self, gone);
|
||||
Check(gone.Count == 0, "an empty view drops nothing");
|
||||
ChatHistory.FindGone(new[] { 3, 7 }, new[] { 1, 2, 3, 4, 5, 6, 7 }, self, gone);
|
||||
Check(gone.Count == 0, "all still there: nothing");
|
||||
// Through MergeKeep, as the view sees it: the All tab of evens-are-player lines.
|
||||
int[] before = ChatHistory.MergeKeep(Array.Empty<int>(), Enumerable.Range(1, 30).ToArray(), 10, 100, IsEven);
|
||||
int[] after = ChatHistory.MergeKeep(before, new[] { 31, 32, 33 }, 10, 100, IsEven);
|
||||
ChatHistory.FindGone(before, after, self, gone);
|
||||
Check(gone.Select(i => before[i]).SequenceEqual(new[] { 21, 23 }), $"the odd lines that left the main window, between kept even ones ({string.Join(",", gone.Select(i => before[i]))})");
|
||||
}
|
||||
|
||||
private static void PlayerChatSettings()
|
||||
{
|
||||
Case("player chat settings: absent at the defaults, saved when changed");
|
||||
var opts = RynthChatJsonContext.Default.RynthChatSettingsDto;
|
||||
RynthChatSettingsDto old = JsonSerializer.Deserialize(OldFile, opts)!;
|
||||
Check(old.PlayerHistoryLines == null && old.ChannelsAllPlayerChat == null, "a file from before has neither (ChatModel: 5000, on)");
|
||||
string saved = JsonSerializer.Serialize(old, opts);
|
||||
Check(!saved.Contains("playerHistoryLines", StringComparison.Ordinal) && !saved.Contains("channelsAllPlayerChat", StringComparison.Ordinal),
|
||||
"saving it writes neither key");
|
||||
old.PlayerHistoryLines = 8000;
|
||||
old.ChannelsAllPlayerChat = false;
|
||||
RynthChatSettingsDto back = JsonSerializer.Deserialize(JsonSerializer.Serialize(old, opts), opts)!;
|
||||
Check(back.PlayerHistoryLines == 8000 && back.ChannelsAllPlayerChat == false, "8000 lines and off load back");
|
||||
Check(back.Filters!.Length == 3, "the other fields are untouched");
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@ namespace ChatFilterTests;
|
|||
/// and a file without it is a file of Regex rules, written back unchanged; every standard filter
|
||||
/// catches its example lines and spares player speech.
|
||||
/// </summary>
|
||||
internal static class Program
|
||||
internal static partial class Program
|
||||
{
|
||||
private static int _checks, _failed;
|
||||
private static string _case = "";
|
||||
|
|
@ -73,6 +73,12 @@ internal static class Program
|
|||
OwnSpansQueue();
|
||||
OwnSpansOverRules();
|
||||
SlowRulesNeedStrikes();
|
||||
PlayerChatLines();
|
||||
PlayerChatInChannels();
|
||||
PlayerChatKeptLonger();
|
||||
PlayerChatFeedSimulated();
|
||||
PlayerChatViewDrops();
|
||||
PlayerChatSettings();
|
||||
|
||||
Console.WriteLine();
|
||||
Console.WriteLine($"{_checks - _failed}/{_checks} checks passed.");
|
||||
|
|
|
|||
|
|
@ -30,6 +30,11 @@
|
|||
face: tab rebuild / search rebuild 11/177 us 45/716 us 0.1/1.8 ms 0.7/3.6 ms
|
||||
face: unread, full (was) / incremental 100/0.5 us 396/0.5 us 1.1ms/0.7us 4.1ms/0.5us
|
||||
face: measure every wrapped line 0.6 ms 3.7 ms 6.7 ms 14.8 ms
|
||||
|
||||
2026-11-22, player chat kept past the history (ChatHistory.MergeKeep, 5,000 player lines):
|
||||
engine merge per poll, MergeKeep 24 us 37 us 72 us 146 us
|
||||
(it reads every kept line's IsPlayerChat once per poll with new lines; at most ~1.5 ms a
|
||||
second on the pump at 10,000 lines, nothing while the chat is quiet.)
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
|
|
@ -57,6 +62,7 @@
|
|||
<ItemGroup>
|
||||
<Compile Include="..\..\src\RynthCore.Engine\UI\Data\ChatRouting.cs" Link="Engine\ChatRouting.cs" />
|
||||
<Compile Include="..\..\src\RynthCore.Engine\UI\Data\ChatHistory.cs" Link="Engine\ChatHistory.cs" />
|
||||
<Compile Include="..\..\src\RynthCore.Engine\UI\Data\ChatPlayerText.cs" Link="Engine\ChatPlayerText.cs" />
|
||||
<Compile Include="..\..\src\RynthCore.Engine\UI\Data\ChatLineColors.cs" Link="Engine\ChatLineColors.cs" />
|
||||
<Compile Include="..\..\src\RynthCore.Engine\UI\Data\ChatRuleMatching.cs" Link="Engine\ChatRuleMatching.cs" />
|
||||
<Compile Include="..\..\src\RynthCore.Engine\UI\Data\ChatSettingsDto.cs" Link="Engine\ChatSettingsDto.cs" />
|
||||
|
|
|
|||
|
|
@ -294,6 +294,15 @@ internal static unsafe class Program
|
|||
var added = EngineLines(3, new Random(1), router).ToList();
|
||||
return Time(() => { kept = ChatHistory.Merge(kept, added, n); }, 200);
|
||||
});
|
||||
// 2026-11-22: what the pump does now, player chat kept to 5,000 past the history.
|
||||
Row("engine merge, player chat kept (MergeKeep)", "pump, per poll", n =>
|
||||
{
|
||||
var router = MakeRouter();
|
||||
ChatLine[] kept = EngineLines(n, new Random(n), router);
|
||||
var added = EngineLines(3, new Random(1), router).ToList();
|
||||
Func<ChatLine, bool> isPlayer = l => l.IsPlayerChat;
|
||||
return Time(() => { kept = ChatHistory.MergeKeep(kept, added, n, ChatHistory.DefaultPlayerLines, isPlayer); }, 200);
|
||||
});
|
||||
Row("first read: whole ring, JSON+parse+route", "pump, once per bind/reload", n =>
|
||||
{
|
||||
var router = MakeRouter();
|
||||
|
|
@ -485,7 +494,8 @@ internal static unsafe class Program
|
|||
Check("Trim drops the oldest, or nothing", t1 != null && t1.SequenceEqual(new[] { 7, 8, 9, 10 }) && ChatHistory.Trim(old, 10) == null, "");
|
||||
#if HAVE_RYNTHCHAT
|
||||
var r = new Random(5);
|
||||
var b = new RynthCore.Plugin.RynthChat.ChatBuffer(500);
|
||||
// The main ring alone (0.4.0's player ring off): its own contract, as in 0.3.0.
|
||||
var b = new RynthCore.Plugin.RynthChat.ChatBuffer(500, playerCapacity: 0);
|
||||
for (int i = 0; i < 700; i++) { var (t, ty) = MakeLine(r); b.Add(t, ty); }
|
||||
ulong[] Seqs(string json) => JsonSerializer.Deserialize(json, RynthChatJsonContext.Default.RynthChatLineDtoArray)!.Select(d => d.Seq).ToArray();
|
||||
ulong[] all = Seqs(b.BuildJson(0));
|
||||
|
|
@ -503,7 +513,7 @@ internal static unsafe class Program
|
|||
$"{all.Length} lines, {all[0]}..{all[^1]}; since 790: {since.Length}");
|
||||
Check("capacity clamped to 100..10000", b.SetCapacity(5) == 100 && b.SetCapacity(50000) == 10000 && b.Capacity == 10000, "");
|
||||
var old500 = new OldChatBuffer(500);
|
||||
var new500 = new RynthCore.Plugin.RynthChat.ChatBuffer(500);
|
||||
var new500 = new RynthCore.Plugin.RynthChat.ChatBuffer(500, playerCapacity: 0);
|
||||
var r1 = new Random(9);
|
||||
bool same = true;
|
||||
for (int i = 0; i < 1200; i++)
|
||||
|
|
@ -520,6 +530,16 @@ internal static unsafe class Program
|
|||
}
|
||||
}
|
||||
Check("0.3.0 returns the same lines as 0.2.1 for any 'since'", same, "");
|
||||
// 0.4.0: with the player ring on, a read from 0 gets the player lines the main ring lost, first,
|
||||
// then the main ring; an ordinary poll still gets only the new lines.
|
||||
var withPlayers = new RynthCore.Plugin.RynthChat.ChatBuffer(500);
|
||||
var r2 = new Random(9);
|
||||
for (int i = 0; i < 1200; i++) { var (t, ty) = MakeLine(r2); withPlayers.Add(t, ty); }
|
||||
ulong[] p0 = Seqs(withPlayers.BuildJson(0)), main = Seqs(new500.BuildJson(0)), poll = Seqs(withPlayers.BuildJson(1195));
|
||||
Check("0.4.0 player ring: older player lines first, then the same main ring; polls unchanged",
|
||||
p0.Length > main.Length && p0.Skip(p0.Length - main.Length).SequenceEqual(main) && p0[0] < main[0]
|
||||
&& p0.Zip(p0.Skip(1)).All(q => q.Second > q.First) && poll.SequenceEqual(new ulong[] { 1196, 1197, 1198, 1199, 1200 }),
|
||||
$"{p0.Length} lines ({p0.Length - main.Length} older player lines), main {main.Length}");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ namespace CombatSettingsTests
|
|||
("KitePullMeters", typeof(int?), "20"),
|
||||
("KiteTagFirst", typeof(bool?), "true"),
|
||||
("MeleeThroughWalls", typeof(bool?), "true"), // Combat > Targeting > Melee through walls (2026-11-15)
|
||||
("DebuffAllBeforeAttacking", typeof(bool?), "false"), // Combat > Targeting > Debuff every monster in range before attacking (2026-11-22)
|
||||
};
|
||||
|
||||
private static int Main()
|
||||
|
|
@ -101,11 +102,12 @@ namespace CombatSettingsTests
|
|||
("Combat", "Tag Before Fleeing", "Bool", 1, 0, 1),
|
||||
("Combat", "Magic Response", "Combo", 0, 0, 3), // beside Missile Response since 2026-11-11
|
||||
("Combat", "Melee through walls", "Bool", 1, 0, 1), // on by default (2026-11-15)
|
||||
("Combat", "Debuff every monster in range before attacking", "Bool", 0, 0, 1), // off by default (2026-11-22)
|
||||
};
|
||||
object older = Parse("{\"BoostNavPriority\":true}"); // what an older RynthAi sends
|
||||
object newer = Parse("{\"VariablePowerMin\":50,\"VariablePowerMax\":100,\"MissileEnvironmentResponse\":0,\"MagicEnvironmentResponse\":0," +
|
||||
"\"EnvironmentImpactLimit\":2,\"EnvironmentImpactWindowSec\":20,\"EnvironmentApproachMeters\":6,\"EnvironmentMinDistance\":3," +
|
||||
"\"EnvironmentSkipSec\":30,\"KitePullMeters\":20,\"KiteTagFirst\":true,\"MeleeThroughWalls\":true}"); // the plugin's own defaults
|
||||
"\"EnvironmentSkipSec\":30,\"KitePullMeters\":20,\"KiteTagFirst\":true,\"MeleeThroughWalls\":true,\"DebuffAllBeforeAttacking\":false}"); // the plugin's own defaults
|
||||
foreach (var (tab, label, kind, def, min, max) in rows)
|
||||
{
|
||||
object? row = Row(tab, label, kind);
|
||||
|
|
@ -144,8 +146,10 @@ namespace CombatSettingsTests
|
|||
Set(Row("Combat", "Tag Before Fleeing", "Bool")!, edit, 1);
|
||||
Set(Row("Combat", "Magic Response", "Combo")!, edit, 1);
|
||||
Set(Row("Combat", "Melee through walls", "Bool")!, edit, 0);
|
||||
Set(Row("Combat", "Debuff every monster in range before attacking", "Bool")!, edit, 1);
|
||||
string after = JsonSerializer.Serialize(edit, info);
|
||||
Check(after.Contains("\"MeleeThroughWalls\":false"), "Melee through walls unticked saves false (RynthAi turns it off)");
|
||||
Check(after.Contains("\"DebuffAllBeforeAttacking\":true"), "Debuff every monster ticked saves true (RynthAi turns it on)");
|
||||
Check(after.Contains("\"KitePullMeters\":55") && after.Contains("\"KiteTagFirst\":true") && after.Contains("\"MagicEnvironmentResponse\":1"), "the edits land on their own properties");
|
||||
Check(after.Contains("\"BoostNavPriority\":true") && after.Contains("\"EnvironmentSkipSec\":60") && after.Contains("\"MissileEnvironmentResponse\":2"), "the other settings ride along unchanged");
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ internal static partial class Program
|
|||
TransitionDiagonalAndBorderWalksNeverHold();
|
||||
TransitionTwoLandblockJumpHolds();
|
||||
TransitionDrainHoldThenStopsSurvive();
|
||||
TransitionPortalRaiseIsHeldThenSent();
|
||||
TransitionHoldDeadline();
|
||||
TransitionValveOpensAfterMaxHold();
|
||||
TransitionValveStuckPortalAndReset();
|
||||
TransitionGateDisabledNeverHolds();
|
||||
|
|
@ -274,6 +276,48 @@ internal static partial class Program
|
|||
Check(!s.InTransition(9000 + WorldTransitionState.SettleMs), "window ends");
|
||||
}
|
||||
|
||||
// 2026-11-20: a raise clicked on a Skills window in portal space was held by the gate and then
|
||||
// dropped with the rest (queued during the transition). AcMainThreadQueue now decides a Train
|
||||
// entry the way it decides a stop (teardown: true): held while the portal lasts, then sent.
|
||||
private static void TransitionPortalRaiseIsHeldThenSent()
|
||||
{
|
||||
_case = "portal raise kept";
|
||||
var s = Started(0x0007);
|
||||
s.Sample(2000, false, true, 0x0007); // portal space entered
|
||||
long clickAt = 4000; // the + pressed mid-portal
|
||||
Check(s.Decide(4100, clickAt, true) == WorldTransitionState.Verdict.Hold, "mid-portal the raise is held, not sent");
|
||||
s.Sample(8700, false, false, 0x02E7); // landed (a landblock jump too)
|
||||
long settled = 8700 + WorldTransitionState.SettleMs;
|
||||
Check(s.Decide(settled - 1, clickAt, true) == WorldTransitionState.Verdict.Hold, "still held through the settle window");
|
||||
Check(s.Decide(settled, clickAt, true) == WorldTransitionState.Verdict.Run, "sent once the gate opens");
|
||||
Check(s.Decide(settled, clickAt, false) == WorldTransitionState.Verdict.Drop,
|
||||
"(an ordinary action queued in portal space is still dropped)");
|
||||
}
|
||||
|
||||
// WorldTransitionState.HoldDeadline: a raise's wait for the server's answer (TrainingApi's Busy, the
|
||||
// Skills panel's lock) doesn't run out while the gate holds the raise unsent.
|
||||
private static void TransitionHoldDeadline()
|
||||
{
|
||||
_case = "hold deadline";
|
||||
const long W = 5000;
|
||||
Check(WorldTransitionState.HoldDeadline(6000, 4000, false, W) == 6000, "no transition: unchanged");
|
||||
Check(WorldTransitionState.HoldDeadline(6000, 4000, true, W) == 9000, "in transition: pushed to a full window from now");
|
||||
Check(WorldTransitionState.HoldDeadline(20_000, 4000, true, W) == 20_000, "never shortened");
|
||||
Check(WorldTransitionState.HoldDeadline(0, 4000, true, W) == 0, "no wait running: none started");
|
||||
Check(WorldTransitionState.HoldDeadline(3000, 4000, true, W) == 3000, "a wait already over stays over");
|
||||
// Held for a whole portal (6.7 s) plus the settle (5 s), checked every frame: the wait ends a full
|
||||
// window after the transition ends, never during it.
|
||||
long until = 1000 + W;
|
||||
long end = 1000 + 11_700;
|
||||
for (long t = 1000; t < end; t += 16)
|
||||
{
|
||||
until = WorldTransitionState.HoldDeadline(until, t, true, W);
|
||||
Check(until > t, $"still waiting at t={t}");
|
||||
}
|
||||
until = WorldTransitionState.HoldDeadline(until, end, false, W);
|
||||
Check(until >= end + W - 16 && until <= end + W, $"the wait ends about a window after the gate opens (until={until}, end={end})");
|
||||
}
|
||||
|
||||
// The safety valve (review 2026-10-18): a character that keeps reading dead (Health 0 after a
|
||||
// revive) must not freeze every queued action for good.
|
||||
private static void TransitionValveOpensAfterMaxHold()
|
||||
|
|
|
|||
|
|
@ -69,6 +69,8 @@ namespace EngineSettingsTests
|
|||
Run(nameof(PlacementRestoreIsPositionOnly), PlacementRestoreIsPositionOnly);
|
||||
Run(nameof(PlacementSaveNeedsAStableInWorldRect), PlacementSaveNeedsAStableInWorldRect);
|
||||
Run(nameof(AcWindowChromeNeverResizes), AcWindowChromeNeverResizes);
|
||||
Run(nameof(PlacementSizeIsAcsResolution), PlacementSizeIsAcsResolution);
|
||||
Run(nameof(SavedSizeIgnoredLine), SavedSizeIgnoredLine);
|
||||
Run(nameof(PlacementFilesArePerClient), PlacementFilesArePerClient);
|
||||
Run(nameof(PlacementFileRoundTrips), PlacementFileRoundTrips);
|
||||
}
|
||||
|
|
@ -937,14 +939,120 @@ namespace EngineSettingsTests
|
|||
Eq(DecideSave(true, true, true, LogoutRect, InGame, ref pending, t0).Action, AcWindowPlacementRule.SaveAction.LoginShrink, "Save Layout Now on the login-size window: refused");
|
||||
}
|
||||
|
||||
// Source guard: every SetWindowPos on the AC window keeps AC's size (R-20261115-160655-1201).
|
||||
// Source guard: no SetWindowPos on the AC window takes its size from a saved rect
|
||||
// (R-20261115-160655-1201, and 2026-11-21: a saved 1940x1100 stretched a 1600x900 picture).
|
||||
// A call either keeps AC's size (SwpNosize), sizes the window for AC's resolution (the restore
|
||||
// plan's d.Width x d.Height, from the back buffer), or keeps the client area across a borderless
|
||||
// style change (outerW x outerH, from the client rect).
|
||||
private static void AcWindowChromeNeverResizes()
|
||||
{
|
||||
string source = File.ReadAllText(FindUp(Path.Combine("src", "RynthCore.Engine", "UI", "AcWindowChrome.cs")));
|
||||
var calls = Regex.Matches(source, @"^\s*(?:=>\s*)?SetWindowPos\(hwnd,[^;]*;", RegexOptions.Multiline | RegexOptions.Singleline);
|
||||
Check(calls.Count >= 2, $"found the SetWindowPos calls ({calls.Count})");
|
||||
Check(calls.Count >= 4, $"found the SetWindowPos calls ({calls.Count})");
|
||||
int sized = 0;
|
||||
foreach (Match m in calls)
|
||||
Check(m.Value.Contains("SwpNosize"), "SetWindowPos keeps AC's size: " + Regex.Replace(m.Value.Trim(), @"\s+", " "));
|
||||
{
|
||||
string call = Regex.Replace(m.Value.Trim(), @"\s+", " ");
|
||||
bool keepsSize = call.Contains("SwpNosize");
|
||||
bool forResolution = call.Contains("d.Width, d.Height");
|
||||
bool keepsClient = call.Contains("outerW, outerH");
|
||||
if (!keepsSize) sized++;
|
||||
Check(keepsSize || forResolution || keepsClient, "SetWindowPos keeps AC's size or sizes it for AC's resolution: " + call);
|
||||
Check(!Regex.IsMatch(call, @"\b(saved|sv|from|_saved|_reference|rf)\b"), "SetWindowPos never uses a saved rect: " + call);
|
||||
}
|
||||
Eq(sized, 2, "two calls size the window (the restore for AC's resolution, the borderless style change)");
|
||||
// The restore plan's size is AC's resolution plus the frame, never the saved size.
|
||||
string policy = File.ReadAllText(FindUp(Path.Combine("src", "RynthCore.Engine", "UI", "AcWindowChromePolicy.cs")));
|
||||
Check(policy.Contains("OuterForDrawSize(d, current, client)"), "the resize target comes from the back buffer's size");
|
||||
}
|
||||
|
||||
// ── 2026-11-21: the window's size is AC's resolution ────────────────
|
||||
// AC drew at 1600x900 (outer 1606x929 at 96 DPI); the saved rect was 1940x1100 (client 1934x1071).
|
||||
|
||||
private static readonly Size Draw1600 = new(1600, 900);
|
||||
private static readonly Rect At1600 = new(200, 100, 200 + 1606, 100 + 929); // AC's own window for 1600x900
|
||||
private static readonly Size Client1600 = new(1600, 900);
|
||||
private static readonly Rect Saved1940 = new(150, 60, 150 + 1940, 60 + 1100); // the saved, stretched rect
|
||||
private static readonly Rect Stretched1940 = new(150, 60, 150 + 1940, 60 + 1100);
|
||||
private static readonly Size Client1934 = new(1934, 1071);
|
||||
|
||||
private static void PlacementSizeIsAcsResolution()
|
||||
{
|
||||
// The live case: AC came up at its own size; the saved size is ignored, the position applies.
|
||||
var d = DecideRestore(Saved1940, false, false, At1600, Client1600, Draw1600, S(4), S(4), Screen2560);
|
||||
Eq(d.Action, AcWindowPlacementRule.RestoreAction.Move, "saved 1940x1100, window at AC's 1600x900: moved");
|
||||
Eq((d.X, d.Y, d.Resize), (150, 60, false), "to the saved spot, AC's size kept");
|
||||
Eq(d.SavedSizeIgnored, "saved size 1940x1100 ignored: AC draws at 1600x900", "one plain line for the ignored size");
|
||||
|
||||
// A window that is stretched at the restore (an old build put the saved size back first): once it
|
||||
// held for MismatchHold it is sized back to the resolution plus its frame (6x29 here).
|
||||
Eq(DecideRestore(Saved1940, false, false, Stretched1940, Client1934, Draw1600, S(4), S(4), Screen2560).Action,
|
||||
AcWindowPlacementRule.RestoreAction.Wait, "stretched, held 4 s: AC may still be resizing it");
|
||||
var fix = DecideRestore(Saved1940, false, false, Stretched1940, Client1934, Draw1600, S(10), S(10), Screen2560);
|
||||
Eq((fix.Action, fix.Resize, fix.Width, fix.Height), (AcWindowPlacementRule.RestoreAction.Move, true, 1606, 929),
|
||||
"stretched for 10 s: moved and sized for AC's 1600x900");
|
||||
Eq(fix.SavedSizeIgnored, "saved size 1940x1100 ignored: AC draws at 1600x900", "...and the saved size is said to be ignored");
|
||||
var late = DecideRestore(Saved1940, false, false, Stretched1940, Client1934, Draw1600, S(2), S(61), Screen2560);
|
||||
Eq((late.Action, late.Resize), (AcWindowPlacementRule.RestoreAction.Move, true), "past the watch: no more waiting");
|
||||
|
||||
// Never a saved size: no plan ever carries one.
|
||||
foreach (var (cur, client) in new[] { (At1600, Client1600), (Stretched1940, Client1934) })
|
||||
for (int t = 0; t <= 90; t += 2)
|
||||
{
|
||||
var p = DecideRestore(Saved1940, false, false, cur, client, Draw1600, S(t), S(t), Screen2560);
|
||||
Check(!(p.Resize && (p.Width, p.Height) == (1940, 1100)), $"{cur.Width}x{cur.Height} at {t} s: the saved size is never applied");
|
||||
if (p.Resize) Eq((p.Width - 6, p.Height - 29), (1600, 900), $"{cur.Width}x{cur.Height} at {t} s: a resize is AC's resolution plus the frame");
|
||||
}
|
||||
|
||||
// Borderless (no frame: outer = client): the target is the resolution itself.
|
||||
var borderless = new Rect(0, 0, 1934, 1071);
|
||||
var b = DecideRestore(new Rect(0, 0, 1600, 900), false, false, borderless, new Size(1934, 1071), Draw1600, S(12), S(12), Screen2560);
|
||||
Eq((b.Action, b.Resize, b.Width, b.Height), (AcWindowPlacementRule.RestoreAction.Move, true, 1600, 900), "borderless and stretched: sized to 1600x900 exactly");
|
||||
Eq(b.SavedSizeIgnored, null, "borderless, saved at the resolution: nothing ignored");
|
||||
Eq(OuterForDrawSize(Draw1600, new Rect(0, 0, 1600, 900), new Size(1600, 900)), new Size(1600, 900), "no frame: outer = client");
|
||||
Eq(OuterForDrawSize(Draw1600, Stretched1940, Client1934), new Size(1606, 929), "the frame is kept: 1600x900 + 6x29");
|
||||
|
||||
// A resolution the player picked in AC: the window follows it, not the saved size.
|
||||
var at1920 = new Rect(100, 50, 100 + 1926, 50 + 1109);
|
||||
var r1920 = DecideRestore(At1600, false, false, at1920, new Size(1920, 1080), new Size(1920, 1080), S(4), S(4), Screen2560);
|
||||
Eq((r1920.Action, r1920.Resize, r1920.X, r1920.Y), (AcWindowPlacementRule.RestoreAction.Move, false, 200, 100), "AC at 1920x1080: moved, its size kept");
|
||||
Eq(r1920.SavedSizeIgnored, "saved size 1606x929 ignored: AC draws at 1920x1080", "...the 1600x900 save is the ignored size");
|
||||
var at2560 = new Rect(0, 0, 2566, 1469);
|
||||
var r2560 = DecideRestore(At1600, false, false, at2560, new Size(2560, 1440), new Size(2560, 1440), S(4), S(4), Screen2560);
|
||||
Eq(r2560.Action, AcWindowPlacementRule.RestoreAction.Wait, "AC at 2560x1440, position saved for a much smaller window: waits as before");
|
||||
var r2560late = DecideRestore(At1600, false, false, at2560, new Size(2560, 1440), new Size(2560, 1440), S(61), S(61), Screen2560);
|
||||
Eq((r2560late.Action, r2560late.Resize), (AcWindowPlacementRule.RestoreAction.Skip, false), "...then leaves it where AC put it, at AC's size");
|
||||
|
||||
// The guards still hold with the resolution known.
|
||||
Eq(DecideRestore(Saved1940, true, false, Stretched1940, Client1934, Draw1600, S(30), S(30), Screen2560),
|
||||
RestorePlan.From(DecideRestore(Saved1940, true, false, Stretched1940, S(30), S(30), Screen2560)), "minimised / maximised: the old decision, no resize");
|
||||
Eq(DecideRestore(Saved1940, false, true, Stretched1940, Client1934, Draw1600, S(30), S(30), Screen2560).Resize, false, "exclusive fullscreen: no resize");
|
||||
Eq(DecideRestore(null, false, false, Stretched1940, Client1934, Draw1600, S(30), S(30), Screen2560).Action, AcWindowPlacementRule.RestoreAction.Skip, "nothing saved: nothing done");
|
||||
var parked = new Rect(-32000, -32000, -32000 + 160, -32000 + 28);
|
||||
Eq(DecideRestore(Saved1940, false, false, parked, new Size(0, 0), Draw1600, S(10), S(10), Screen2560).Action, AcWindowPlacementRule.RestoreAction.Wait, "parked: waits");
|
||||
var offscreen = new Rect(2400, 1500, 2400 + 1940, 1500 + 1100);
|
||||
var pulled = DecideRestore(offscreen, false, false, At1600, Client1600, Draw1600, S(4), S(4), Screen2560);
|
||||
Eq((pulled.Action, pulled.Clamped, pulled.X, pulled.Y), (AcWindowPlacementRule.RestoreAction.Move, true, 2560 - 1606 + AcWindowPlacementRule.EdgeSlack, 1560 - 929 + AcWindowPlacementRule.EdgeSlack),
|
||||
"off-screen spot: pulled onto the work area at AC's size, not the saved one");
|
||||
|
||||
// Resolution not known yet: exactly the position-only restore.
|
||||
Eq(DecideRestore(Saved1940, false, false, Stretched1940, Client1934, null, S(4), S(4), Screen2560),
|
||||
RestorePlan.From(DecideRestore(Saved1940, false, false, Stretched1940, S(4), S(4), Screen2560)), "no back buffer yet: position only");
|
||||
Eq(DecideRestore(Saved1940, false, false, Stretched1940, Client1934, new Size(0, 0), S(4), S(4), Screen2560).Resize, false, "an unusable back-buffer size: no resize");
|
||||
|
||||
// The save: a stretched window is never saved; AC's own size is.
|
||||
Eq(SaveRefusedForSize(Client1934, Draw1600), "its client area 1934x1071 is not AC's resolution 1600x900", "stretched: refused");
|
||||
Eq(SaveRefusedForSize(Client1600, Draw1600), null, "at the resolution: no objection");
|
||||
Eq(SaveRefusedForSize(Client1934, null), null, "resolution unknown: no objection (position-only rules)");
|
||||
Eq(SaveRefusedForSize(new Size(1600, 899), Draw1600), "its client area 1600x899 is not AC's resolution 1600x900", "one pixel off is still stretched");
|
||||
}
|
||||
|
||||
// The launcher's shared line for the ignored size (AcWindowPlacementRule.SavedSizeIgnored).
|
||||
private static void SavedSizeIgnoredLine()
|
||||
{
|
||||
Eq(AcWindowPlacementRule.SavedSizeIgnored(1940, 1100, 1606, 929, 1600, 900), "saved size 1940x1100 ignored: AC draws at 1600x900", "the line");
|
||||
Eq(AcWindowPlacementRule.SavedSizeIgnored(1606, 929, 1606, 929, 1600, 900), null, "same size: nothing to say");
|
||||
Eq(AcWindowPlacementRule.SavedSizeIgnored(1608, 931, 1606, 929, 1600, 900), null, "within the 2 px frame wobble: nothing to say");
|
||||
}
|
||||
|
||||
private static void PlacementFilesArePerClient()
|
||||
|
|
|
|||
|
|
@ -736,6 +736,26 @@ internal static class Program
|
|||
"expired stays expired through the grace");
|
||||
Check(CrashDumpWriterRule.Grace == TimeSpan.FromSeconds(60), "the grace is 60 s");
|
||||
});
|
||||
|
||||
// "Fix AC's palette memory leak" (2026-11-23): off by default, a missing key is off, and it
|
||||
// is saved under the name the engine reads at load (FixPaletteLeak).
|
||||
Scenario("palette leak fix: off by default, saved and loaded", root, () =>
|
||||
{
|
||||
Check(!new AppSettings().FixPaletteLeak, "a new install: off");
|
||||
File.WriteAllText(Main_, """{ "AllowMultipleClients": true }""");
|
||||
Check(!AppSettingsStore.Load().FixPaletteLeak, "an appsettings.json without the key: off");
|
||||
|
||||
AppSettings s = Sample();
|
||||
s.FixPaletteLeak = true;
|
||||
AppSettingsStore.Save(s);
|
||||
JsonNode? saved = JsonNode.Parse(File.ReadAllText(Main_));
|
||||
Check(saved?["FixPaletteLeak"]?.GetValue<bool>() == true, "saved as \"FixPaletteLeak\": true (the engine's key)");
|
||||
Check(AppSettingsStore.Load().FixPaletteLeak, "loaded back: on");
|
||||
|
||||
s.FixPaletteLeak = false;
|
||||
AppSettingsStore.Save(s);
|
||||
Check(!AppSettingsStore.Load().FixPaletteLeak, "unchecked, saved and loaded: off");
|
||||
});
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
@ -886,6 +906,21 @@ internal static class Program
|
|||
Check(grown.Action == AcWindowPlacementRule.RestoreAction.Move && grown.X == 300 && grown.Y == 60,
|
||||
"restore: grown to the saved size and held: moved");
|
||||
|
||||
// 2026-11-21: a saved 1940x1100 (client 1934x1071) on a 1600x900 game (outer 1606x929). The
|
||||
// launcher keeps the size AC gave the window and only moves it; the saved size gets one line.
|
||||
var stretched = new AcWindowPlacementRule.Placement(150, 60, 1940, 1100);
|
||||
var keep = AcWindowPlacementRule.DecideRestore(stretched, 1606, 929, TimeSpan.FromSeconds(4), TimeSpan.FromSeconds(12), screen);
|
||||
Check(keep.Action == AcWindowPlacementRule.RestoreAction.Move && keep.X == 150 && keep.Y == 60,
|
||||
"restore: saved 1940x1100, AC's window 1606x929: moved to the saved spot (moving never resizes)");
|
||||
Check(AcWindowPlacementRule.SavedSizeIgnored(1940, 1100, 1606, 929, 1600, 900) == "saved size 1940x1100 ignored: AC draws at 1600x900",
|
||||
"restore: the ignored saved size is said in one plain line");
|
||||
Check(AcWindowPlacementRule.SavedSizeIgnored(1606, 929, 1606, 929, 1600, 900) == null
|
||||
&& AcWindowPlacementRule.SavedSizeIgnored(1608, 931, 1606, 929, 1600, 900) == null,
|
||||
"restore: a saved size that is the window's (give or take 2 px): no line");
|
||||
var at1920 = AcWindowPlacementRule.DecideRestore(new(200, 100, 1606, 929), 1926, 1109, TimeSpan.FromSeconds(4), TimeSpan.FromSeconds(12), screen);
|
||||
Check(at1920.Action == AcWindowPlacementRule.RestoreAction.Move,
|
||||
"restore: the player set AC to 1920x1080 since the save: the position applies, the window keeps AC's new size");
|
||||
|
||||
Check(AcWindowPlacementRule.SizeMatches(1608, 936, 1608, 936) && AcWindowPlacementRule.SizeMatches(1928, 1116, 1608, 936)
|
||||
&& !AcWindowPlacementRule.SizeMatches(1608, 936, 1008, 786) && !AcWindowPlacementRule.SizeMatches(1608, 936, 0, 0),
|
||||
"restore: size match is within a quarter per side, never for an unknown size");
|
||||
|
|
|
|||
|
|
@ -89,8 +89,61 @@ namespace LootAddWireTests
|
|||
cmdType.GetProperty("Item")!.SetValue(cmd, bare);
|
||||
Check(JsonSerializer.Serialize(cmd, cmdInfo).Contains("\"Choices\":null"), "which is written as null (an older RynthAi ignores the field)");
|
||||
|
||||
PerDayChecks(engine, ctxType, ctx, stateInfo, cmdInfo, cmdType);
|
||||
|
||||
Console.WriteLine(_fails == 0 ? $"All {_asserts} checks passed." : $"{_fails} of {_asserts} checks FAILED.");
|
||||
return _fails == 0 ? 0 : 1;
|
||||
}
|
||||
|
||||
// Keep # per day (2026-11-22): the rule view's option and count, both ways, and with an older RynthAi.
|
||||
private static void PerDayChecks(Assembly engine, Type ctxType, object ctx, JsonTypeInfo stateInfo, JsonTypeInfo cmdInfo, Type cmdType)
|
||||
{
|
||||
var ruleInfo = (JsonTypeInfo)ctxType.GetProperty("LootEditRuleDto", All)!.GetValue(ctx)!;
|
||||
Type ruleType = engine.GetType(Ns + "LootEditRuleDto", throwOnError: true)!;
|
||||
Type stateType = engine.GetType(Ns + "LootEditStateDto", throwOnError: true)!;
|
||||
Type rowType = engine.GetType(Ns + "LootEditRowDto", throwOnError: true)!;
|
||||
Type vocab = engine.GetType(Ns + "LootEditVocabulary", throwOnError: true)!;
|
||||
|
||||
// RynthAi -> engine: the rule (LootEditRule) and the list row (LootEditRow).
|
||||
object rule = JsonSerializer.Deserialize(
|
||||
"{\"Index\":3,\"Name\":\"Treasure Maps\",\"Action\":10,\"KeepCount\":2,\"PerDayHours\":24,\"PerDayStatus\":\"1 of 2 picked up in the last 24 h, next frees in 5 h\",\"Conditions\":[]}",
|
||||
ruleInfo)!;
|
||||
Check((int?)ruleType.GetProperty("PerDayHours")!.GetValue(rule) == 24, "the rule's per-day window is read");
|
||||
Check((string)ruleType.GetProperty("PerDayStatus")!.GetValue(rule)! == "1 of 2 picked up in the last 24 h, next frees in 5 h", "and its count line");
|
||||
object older = JsonSerializer.Deserialize("{\"Index\":3,\"Name\":\"Maps\",\"Action\":10,\"KeepCount\":2,\"Conditions\":[]}", ruleInfo)!;
|
||||
Check(ruleType.GetProperty("PerDayHours")!.GetValue(older) == null, "an older RynthAi: PerDayHours is null (the option is hidden)");
|
||||
|
||||
object state = JsonSerializer.Deserialize(
|
||||
"{\"Rules\":[{\"Name\":\"Treasure Maps\",\"Action\":10,\"KeepCount\":2,\"PerDayHours\":24,\"PerDayStatus\":\"2 of 2\"},{\"Name\":\"Gems\",\"Action\":10,\"KeepCount\":5}]}",
|
||||
stateInfo)!;
|
||||
var rows = ((System.Collections.IEnumerable)stateType.GetProperty("Rules", All)!.GetValue(state)!).Cast<object>().ToList();
|
||||
Check((int)rowType.GetProperty("PerDayHours")!.GetValue(rows[0])! == 24 && (int)rowType.GetProperty("PerDayHours")!.GetValue(rows[1])! == 0,
|
||||
"rows: the per-day one has its window, a plain Keep # has 0");
|
||||
|
||||
// The badge.
|
||||
MethodInfo badge = vocab.GetMethod("Badge", All)!;
|
||||
string B(int a, int k, int h) => (string)badge.Invoke(null, new object[] { a, k, h })!;
|
||||
Check(B(10, 2, 24) == "KEEP 2/DAY" && B(10, 2, 48) == "KEEP 2/48H" && B(10, 5, 0) == "KEEP 5" && B(1, 0, 24) == "KEEP",
|
||||
$"badges: {B(10, 2, 24)} / {B(10, 2, 48)} / {B(10, 5, 0)} / {B(1, 0, 24)}");
|
||||
|
||||
// Engine -> RynthAi: update_rule carries the window; an edit of it makes the view "changed".
|
||||
MethodInfo clone = ruleType.GetMethod("Clone", All)!, same = ruleType.GetMethod("SameAs", All)!;
|
||||
object edit = clone.Invoke(rule, null)!;
|
||||
Check((bool)same.Invoke(edit, new[] { rule })!, "a clone is the same rule");
|
||||
ruleType.GetProperty("PerDayHours")!.SetValue(edit, 0);
|
||||
Check(!(bool)same.Invoke(edit, new[] { rule })!, "turning Per day off is an edit");
|
||||
ruleType.GetProperty("PerDayHours")!.SetValue(edit, 24);
|
||||
ruleType.GetProperty("PerDayStatus")!.SetValue(edit, "something else");
|
||||
Check((bool)same.Invoke(edit, new[] { rule })!, "the count line is not an edit");
|
||||
ruleType.GetProperty("PerDayHours")!.SetValue(edit, 0);
|
||||
object cmd = Activator.CreateInstance(cmdType, nonPublic: true)!;
|
||||
cmdType.GetProperty("Op")!.SetValue(cmd, "update_rule");
|
||||
cmdType.GetProperty("Rule")!.SetValue(cmd, edit);
|
||||
string cj = JsonSerializer.Serialize(cmd, cmdInfo);
|
||||
Check(cj.Contains("\"PerDayHours\":0"), "update_rule writes the window RynthAi's LootEditRule reads: " + cj);
|
||||
object fromOlder = clone.Invoke(older, null)!;
|
||||
cmdType.GetProperty("Rule")!.SetValue(cmd, fromOlder);
|
||||
Check(JsonSerializer.Serialize(cmd, cmdInfo).Contains("\"PerDayHours\":null"), "with an older RynthAi's rule it writes null (RynthAi keeps its own)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
23
tools/PaletteLeakFixTests/PaletteLeakFixTests.csproj
Normal file
23
tools/PaletteLeakFixTests/PaletteLeakFixTests.csproj
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<!--
|
||||
Offline checks for the palette leak fix (src\RynthCore.Engine\Compatibility\PaletteLeakSites.cs and
|
||||
LauncherSettings.cs, compiled in): how each site's bytes are read (stock, already fixed, NOP'd,
|
||||
unknown) on fake bytes, and the launcher setting the engine reads (off unless FixPaletteLeak is true).
|
||||
No game client. Run: dotnet run -c Release (exit 0 = pass, 1 = fail)
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<InvariantGlobalization>true</InvariantGlobalization>
|
||||
<RootNamespace>PaletteLeakFixTests</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\src\RynthCore.Engine\Compatibility\PaletteLeakSites.cs" Link="Engine\PaletteLeakSites.cs" />
|
||||
<Compile Include="..\..\src\RynthCore.Engine\Compatibility\LauncherSettings.cs" Link="Engine\LauncherSettings.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
96
tools/PaletteLeakFixTests/Program.cs
Normal file
96
tools/PaletteLeakFixTests/Program.cs
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
using System.Text.Json;
|
||||
using RynthCore.Engine.Compatibility;
|
||||
using static RynthCore.Engine.Compatibility.PaletteLeakSites;
|
||||
|
||||
namespace PaletteLeakFixTests;
|
||||
|
||||
/// <summary>
|
||||
/// The palette leak fix's byte rules on fake bytes (no client): each site is patched only from the stock
|
||||
/// inc, an already fixed (85 xx 24) or NOP'd (90 90 90) site counts as fixed and is left as it is, and any
|
||||
/// other bytes leave the site alone. And the launcher setting: off unless appsettings.json says
|
||||
/// "FixPaletteLeak": true.
|
||||
/// </summary>
|
||||
internal static class Program
|
||||
{
|
||||
private static int _checks, _failed;
|
||||
|
||||
private static int Main()
|
||||
{
|
||||
SiteTables();
|
||||
foreach (Site s in Sites) ByteChecks(s);
|
||||
SettingChecks();
|
||||
Check(Summary(2, 0, 0) == "Compat: palette leak fix on - 2 site(s) patched, 0 already fixed, 0 left alone (of 2).",
|
||||
"the one log line says it is on and how many sites were patched");
|
||||
Console.WriteLine($"{_checks} check(s), {_failed} failed.");
|
||||
return _failed == 0 ? 0 : 1;
|
||||
}
|
||||
|
||||
private static void SiteTables()
|
||||
{
|
||||
Check(Sites.Length == 2, "two sites");
|
||||
Check(Sites[0].Va == 0x0053EFFE && Sites[1].Va == 0x0053F19C, "at 0x53EFFE and 0x53F19C");
|
||||
Check(Stock(Sites[0]).AsSpan(Sites[0].Offset, 3).SequenceEqual(new byte[] { 0xFF, 0x40, 0x24 }), "site 1 is inc [eax+0x24] (FF 40 24)");
|
||||
Check(Stock(Sites[1]).AsSpan(Sites[1].Offset, 3).SequenceEqual(new byte[] { 0xFF, 0x46, 0x24 }), "site 2 is inc [esi+0x24] (FF 46 24)");
|
||||
}
|
||||
|
||||
private static void ByteChecks(Site s)
|
||||
{
|
||||
string n = s.Name;
|
||||
int op = s.Offset;
|
||||
|
||||
byte[] stock = Stock(s);
|
||||
Check(Classify(s, stock) == SiteState.Stock, $"{n}: the stock bytes -> stock (patched)");
|
||||
|
||||
byte[] fixedB = Stock(s); fixedB[op] = FixedByte;
|
||||
Check(Classify(s, fixedB) == SiteState.AlreadyFixed, $"{n}: 85 xx 24 (this fix, or a patched client) -> already fixed");
|
||||
|
||||
byte[] nop = Stock(s); nop[op] = nop[op + 1] = nop[op + 2] = Nop;
|
||||
Check(Classify(s, nop) == SiteState.AlreadyNopped, $"{n}: 90 90 90 (the original NOP patch) -> already fixed");
|
||||
|
||||
byte[] other = Stock(s); other[op] = 0xCC;
|
||||
Check(Classify(s, other) == SiteState.Unknown, $"{n}: a breakpoint byte at the inc -> unknown, left alone");
|
||||
|
||||
byte[] half = Stock(s); half[op] = Nop;
|
||||
Check(Classify(s, half) == SiteState.Unknown, $"{n}: one NOP and the rest of the inc -> unknown");
|
||||
|
||||
byte[] reg = Stock(s); reg[op + 1] = 0x41;
|
||||
Check(Classify(s, reg) == SiteState.Unknown, $"{n}: another register in the inc -> unknown");
|
||||
|
||||
byte[] around = Stock(s); around[op - 1] ^= 0x01;
|
||||
Check(Classify(s, around) == SiteState.Unknown, $"{n}: a byte before the inc differs -> unknown");
|
||||
|
||||
byte[] after = Stock(s); after[^1] ^= 0x01;
|
||||
Check(Classify(s, after) == SiteState.Unknown, $"{n}: a byte after the inc differs -> unknown");
|
||||
|
||||
byte[] rel = Stock(s); rel[1] = 0x12; rel[2] = 0x34; rel[3] = 0x56; rel[4] = 0x78;
|
||||
Check(Classify(s, rel) == SiteState.Stock, $"{n}: the call's target (rel32) may be anything");
|
||||
|
||||
Check(Classify(s, stock.AsSpan(0, stock.Length - 1)) == SiteState.Unknown, $"{n}: too few bytes -> unknown");
|
||||
Check(Classify(s, new byte[stock.Length]) == SiteState.Unknown, $"{n}: zeros -> unknown");
|
||||
}
|
||||
|
||||
private static void SettingChecks()
|
||||
{
|
||||
static bool Read(string json)
|
||||
{
|
||||
using JsonDocument d = JsonDocument.Parse(json);
|
||||
return LauncherSettings.ReadFixPaletteLeak(d.RootElement);
|
||||
}
|
||||
Check(!Read("{}"), "no key -> off");
|
||||
Check(!Read("""{ "AllowMultipleClients": true }"""), "other keys only -> off");
|
||||
Check(Read("""{ "FixPaletteLeak": true }"""), "\"FixPaletteLeak\": true -> on");
|
||||
Check(!Read("""{ "FixPaletteLeak": false }"""), "false -> off");
|
||||
Check(!Read("""{ "FixPaletteLeak": "true" }"""), "a string -> off");
|
||||
Check(!Read("[]"), "not an object -> off");
|
||||
}
|
||||
|
||||
/// <summary>The site's context with any rel32 bytes filled in (the stock client's bytes, more or less).</summary>
|
||||
private static byte[] Stock(Site s) => s.Context.Select(b => b ?? (byte)0xAB).ToArray();
|
||||
|
||||
private static void Check(bool ok, string what)
|
||||
{
|
||||
_checks++;
|
||||
if (!ok) _failed++;
|
||||
Console.WriteLine($" [{(ok ? "PASS" : "FAIL")}] {what}");
|
||||
}
|
||||
}
|
||||
23
tools/PanelSwapPolicyTests/PanelSwapPolicyTests.csproj
Normal file
23
tools/PanelSwapPolicyTests/PanelSwapPolicyTests.csproj
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<!--
|
||||
Offline checks for AcPanels' repair of AC's panel container after a close
|
||||
(src\RynthCore.Engine\Compatibility\PanelSwapPolicy.cs, compiled in): the policy itself, and a model of
|
||||
AC's gmPanelUI::RecvNotice_SetPanelVisibility (0x004BD380) with its synchronous element message 0x18
|
||||
re-entering it, driven through the same watch / repair steps as AcPanels.NoticeDetour.
|
||||
No game client. Run: dotnet run -c Release (exit 0 = pass, 1 = fail)
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<InvariantGlobalization>true</InvariantGlobalization>
|
||||
<RootNamespace>PanelSwapPolicyTests</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\src\RynthCore.Engine\Compatibility\PanelSwapPolicy.cs" Link="Engine\PanelSwapPolicy.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
279
tools/PanelSwapPolicyTests/Program.cs
Normal file
279
tools/PanelSwapPolicyTests/Program.cs
Normal file
|
|
@ -0,0 +1,279 @@
|
|||
using RynthCore.Engine.Compatibility;
|
||||
|
||||
namespace PanelSwapPolicyTests;
|
||||
|
||||
/// <summary>
|
||||
/// PanelSwapPolicy, and a model of AC's panel container (gmPanelUI) that shows why it is needed: closing a
|
||||
/// panel opened over another one, from outside a UI message, re-enters AC's handler and leaves the earlier
|
||||
/// panel shown in a hidden container; the next panel opened there shows on top of it (the pack's paper doll
|
||||
/// over AC's Vitae panel).
|
||||
/// </summary>
|
||||
internal static class Program
|
||||
{
|
||||
private static int _checks, _failed;
|
||||
|
||||
// Panel notice ids (AC's): the pack, the Character window (claimed by a plugin on some servers), vitae.
|
||||
private const uint Pack = 7, Character = 11, Vitae = 15, Spellbook = 13;
|
||||
|
||||
private static int Main()
|
||||
{
|
||||
PolicyChecks();
|
||||
ModelChecks();
|
||||
Console.WriteLine($"{_checks} check(s), {_failed} failed.");
|
||||
return _failed == 0 ? 0 : 1;
|
||||
}
|
||||
|
||||
// ── The policy alone ─────────────────────────────────────────────────
|
||||
|
||||
private static void PolicyChecks()
|
||||
{
|
||||
const nint vitae = 0x1000, pack = 0x2000, other = 0x3000;
|
||||
|
||||
Check(PanelSwapPolicy.PreviousToWatch(false, vitae, vitae, pack) == pack,
|
||||
"closing the shown panel that has a previous one -> watch the previous one");
|
||||
Check(PanelSwapPolicy.PreviousToWatch(true, vitae, vitae, pack) == 0, "an open is never watched");
|
||||
Check(PanelSwapPolicy.PreviousToWatch(false, vitae, other, pack) == 0,
|
||||
"closing a panel the container doesn't show -> nothing (AC just hides it)");
|
||||
Check(PanelSwapPolicy.PreviousToWatch(false, vitae, vitae, 0) == 0, "no previous panel -> nothing");
|
||||
Check(PanelSwapPolicy.PreviousToWatch(false, vitae, vitae, vitae) == 0,
|
||||
"previous is the closing panel itself (the env container's keep) -> nothing");
|
||||
Check(PanelSwapPolicy.PreviousToWatch(false, 0, 0, pack) == 0, "unknown panel (0) -> nothing");
|
||||
|
||||
Check(PanelSwapPolicy.ShouldReopen(pack, 0, watchedShows: true, claimed: false),
|
||||
"no current panel after, the previous one still shown -> open it again");
|
||||
Check(!PanelSwapPolicy.ShouldReopen(pack, pack, true, false),
|
||||
"AC made the previous panel current (its own swap worked) -> nothing");
|
||||
Check(!PanelSwapPolicy.ShouldReopen(pack, other, true, false), "another panel is current -> nothing");
|
||||
Check(!PanelSwapPolicy.ShouldReopen(pack, 0, watchedShows: false, claimed: false),
|
||||
"container empty and the previous panel hidden too (all closed) -> nothing");
|
||||
Check(!PanelSwapPolicy.ShouldReopen(pack, 0, true, claimed: true),
|
||||
"the previous panel is claimed by a plugin -> never pop AC's up");
|
||||
Check(!PanelSwapPolicy.ShouldReopen(0, 0, true, false), "nothing watched -> nothing");
|
||||
}
|
||||
|
||||
// ── AC's container, modelled ─────────────────────────────────────────
|
||||
|
||||
private static void ModelChecks()
|
||||
{
|
||||
// The screenshot: the pack open, AC pops the vitae panel over it (vitae has attribute 0x10000049,
|
||||
// the pack hasn't, so the pack becomes "previous"), the vitae panel is closed from the game tick
|
||||
// (RynthCore's bar or /rc panels), later AC pops it again.
|
||||
foreach (bool repair in new[] { false, true })
|
||||
{
|
||||
var ui = new AcUi(repair);
|
||||
ui.Notice(Pack, true);
|
||||
Check(ui.Shown() == "7", $"[{Tag(repair)}] the pack opens alone");
|
||||
ui.Notice(Vitae, true);
|
||||
Check(ui.Shown() == "15", $"[{Tag(repair)}] vitae opens over the pack, the pack hides");
|
||||
Check(ui.Previous == Pack, $"[{Tag(repair)}] the pack is the panel to come back to");
|
||||
|
||||
ui.Notice(Vitae, false); // game tick: no UI message is being handled
|
||||
if (!repair)
|
||||
{
|
||||
Check(ui.Shown() == "" && !ui.ContainerShows, "[AC alone] the close hides the whole window");
|
||||
Check(ui.Current == 0 && ui.PanelOwnVisible(Pack),
|
||||
"[AC alone] ...with no current panel and the pack still shown inside it");
|
||||
ui.Notice(Vitae, true); // AC: vitae drops again
|
||||
Check(ui.Shown() == "7,15", "[AC alone] the next vitae pop shows over the pack (the paper doll comes through)");
|
||||
}
|
||||
else
|
||||
{
|
||||
Check(ui.Shown() == "7" && ui.Current == Pack, "[repaired] the close brings the pack back, as AC meant");
|
||||
Check(ui.Repairs == 1, "[repaired] one repair");
|
||||
ui.Notice(Vitae, true);
|
||||
Check(ui.Shown() == "15", "[repaired] the next vitae pop shows vitae alone");
|
||||
ui.Notice(Spellbook, true);
|
||||
Check(ui.Shown() == "13", "[repaired] another panel opened over it shows alone");
|
||||
}
|
||||
}
|
||||
|
||||
// The same close from the vitae panel's own button: inside a UI message, so AC's inner notice waits
|
||||
// and its swap is right; the repair never acts.
|
||||
{
|
||||
var ui = new AcUi(repair: true);
|
||||
ui.Notice(Pack, true);
|
||||
ui.Notice(Vitae, true);
|
||||
ui.InUiMessage(() => ui.Notice(Vitae, false));
|
||||
Check(ui.Shown() == "7" && ui.Current == Pack, "[button] AC brings the pack back by itself");
|
||||
Check(ui.Repairs == 0, "[button] no repair needed or made");
|
||||
}
|
||||
|
||||
// Closing a panel with nothing to come back to: the window closes, nothing reopens.
|
||||
{
|
||||
var ui = new AcUi(repair: true);
|
||||
ui.Notice(Pack, true);
|
||||
ui.Notice(Pack, false);
|
||||
Check(ui.Shown() == "" && !ui.ContainerShows && ui.Current == 0, "[pack only] closing it closes the window");
|
||||
Check(ui.Repairs == 0, "[pack only] no repair");
|
||||
}
|
||||
|
||||
// The previous panel is one a plugin claimed (the Character window): AC's own reopen of it is held
|
||||
// back, and the repair never opens AC's.
|
||||
{
|
||||
var ui = new AcUi(repair: true);
|
||||
ui.Claim(Character);
|
||||
ui.Send(Character, true); // shown before the claim, or opened by RynthCore's own path
|
||||
ui.Notice(Vitae, true);
|
||||
Check(ui.Previous == Character, "[claimed] the Character window is the panel to come back to");
|
||||
ui.Notice(Vitae, false);
|
||||
Check(!ui.PanelOwnVisible(Character) && ui.Shown() == "", "[claimed] AC's Character window stays closed");
|
||||
Check(ui.Repairs == 0, "[claimed] no repair");
|
||||
}
|
||||
|
||||
// Opening another panel over vitae (the swap path) is untouched.
|
||||
{
|
||||
var ui = new AcUi(repair: true);
|
||||
ui.Notice(Pack, true);
|
||||
ui.Notice(Vitae, true);
|
||||
ui.Notice(Spellbook, true);
|
||||
Check(ui.Shown() == "13" && ui.Repairs == 0, "[swap] spellbook over vitae shows alone, no repair");
|
||||
}
|
||||
}
|
||||
|
||||
private static string Tag(bool repair) => repair ? "repaired" : "AC alone";
|
||||
|
||||
private static void Check(bool ok, string what)
|
||||
{
|
||||
_checks++;
|
||||
if (ok) return;
|
||||
_failed++;
|
||||
Console.WriteLine($"[FAIL] {what}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// One panel container, as AC runs it: gmPanelUI::RecvNotice_SetPanelVisibility (0x004BD380) behind the
|
||||
/// hooked notice (CM_UI::SendNotice_SetPanelVisibility 0x0047A4A0), UIElement::SetVisible telling the
|
||||
/// container at once (element message 0x18 -> gmPanelUI::ListenToElementMessage 0x004BD300 -> the notice
|
||||
/// again) unless a UI message is already being handled (UIElementManager queues it then). The hook does
|
||||
/// what AcPanels.NoticeDetour does: hold back a claimed open, watch a close, repair after it.
|
||||
/// </summary>
|
||||
private sealed class AcUi
|
||||
{
|
||||
private sealed class Panel(uint id, bool returnsToPrevious)
|
||||
{
|
||||
public uint Id { get; } = id;
|
||||
public bool ReturnsToPrevious { get; } = returnsToPrevious; // attribute 0x10000049
|
||||
public bool Own; // element +0xA4 bit 1
|
||||
public nint Handle => (nint)Id * 0x100;
|
||||
}
|
||||
|
||||
private readonly Dictionary<uint, Panel> _panels = new()
|
||||
{
|
||||
[Pack] = new Panel(Pack, false),
|
||||
[Character] = new Panel(Character, false),
|
||||
[Spellbook] = new Panel(Spellbook, false),
|
||||
[Vitae] = new Panel(Vitae, true),
|
||||
};
|
||||
private readonly HashSet<uint> _claimed = new();
|
||||
private readonly Queue<Panel> _queued = new();
|
||||
private readonly bool _repair;
|
||||
private Panel? _current, _previous;
|
||||
private bool _dispatching, _bypass;
|
||||
|
||||
public AcUi(bool repair) => _repair = repair;
|
||||
|
||||
public bool ContainerShows { get; private set; }
|
||||
public int Repairs { get; private set; }
|
||||
public uint Current => _current?.Id ?? 0;
|
||||
public uint Previous => _previous?.Id ?? 0;
|
||||
public bool PanelOwnVisible(uint id) => _panels[id].Own;
|
||||
public void Claim(uint id) => _claimed.Add(id);
|
||||
|
||||
/// <summary>The panels on screen: shown themselves, in a shown container.</summary>
|
||||
public string Shown() => ContainerShows
|
||||
? string.Join(",", _panels.Values.Where(p => p.Own).Select(p => p.Id).OrderBy(i => i))
|
||||
: "";
|
||||
|
||||
/// <summary>A UI message being handled (a button click) while <paramref name="body"/> runs.</summary>
|
||||
public void InUiMessage(Action body)
|
||||
{
|
||||
_dispatching = true;
|
||||
body();
|
||||
Drain();
|
||||
}
|
||||
|
||||
/// <summary>RynthCore's own notice (AcPanels.Send): claims don't hold it back.</summary>
|
||||
public void Send(uint id, bool open)
|
||||
{
|
||||
bool was = _bypass;
|
||||
_bypass = true;
|
||||
try { Notice(id, open); }
|
||||
finally { _bypass = was; }
|
||||
}
|
||||
|
||||
/// <summary>The hooked notice: AcPanels.NoticeDetour around AC's handler.</summary>
|
||||
public void Notice(uint id, bool open)
|
||||
{
|
||||
if (open && _claimed.Contains(id) && !_bypass) return; // held back, the plugin's window runs
|
||||
if (open) { Handler(id, true); return; }
|
||||
|
||||
Panel closing = _panels[id];
|
||||
nint watched = _repair
|
||||
? PanelSwapPolicy.PreviousToWatch(false, closing.Handle, _current?.Handle ?? 0, _previous?.Handle ?? 0)
|
||||
: 0;
|
||||
uint watchedId = watched == 0 ? 0 : _panels.Values.First(p => p.Handle == watched).Id;
|
||||
Handler(id, false);
|
||||
if (watched == 0) return;
|
||||
Panel prev = _panels[watchedId];
|
||||
if (!PanelSwapPolicy.ShouldReopen(watched, _current?.Handle ?? 0, prev.Own, _claimed.Contains(watchedId))) return;
|
||||
Repairs++;
|
||||
Send(watchedId, true);
|
||||
}
|
||||
|
||||
/// <summary>gmPanelUI::RecvNotice_SetPanelVisibility, step for step.</summary>
|
||||
private void Handler(uint id, bool open)
|
||||
{
|
||||
Panel p = _panels[id];
|
||||
if (open)
|
||||
{
|
||||
if (_current == p) { SetVisible(p, true); ContainerShows = true; return; }
|
||||
Panel? old = _current;
|
||||
_current = p;
|
||||
if (old != null && old.Own)
|
||||
{
|
||||
_previous = p.ReturnsToPrevious && !old.ReturnsToPrevious ? old : null;
|
||||
Notice(old.Id, false);
|
||||
}
|
||||
SetVisible(p, true);
|
||||
ContainerShows = true;
|
||||
return;
|
||||
}
|
||||
if (_current == p)
|
||||
{
|
||||
SetVisible(p, false); // 0x004BD4A3: may re-enter this handler
|
||||
if (_previous != null) // 0x004BD4A6: re-read after it
|
||||
{
|
||||
Notice(_previous.Id, true);
|
||||
_previous = null;
|
||||
return;
|
||||
}
|
||||
_current = null; // 0x004BD4DA
|
||||
ContainerShows = false;
|
||||
return;
|
||||
}
|
||||
SetVisible(p, false);
|
||||
}
|
||||
|
||||
/// <summary>UIElement::SetVisible: the bit, then element message 0x18 to the container.</summary>
|
||||
private void SetVisible(Panel p, bool v)
|
||||
{
|
||||
if (p.Own == v) return;
|
||||
p.Own = v;
|
||||
_queued.Enqueue(p);
|
||||
if (_dispatching) return;
|
||||
_dispatching = true;
|
||||
Drain();
|
||||
}
|
||||
|
||||
/// <summary>UIElementManager::BroadcastElementMessage's loop: each message, then the ones queued meanwhile.</summary>
|
||||
private void Drain()
|
||||
{
|
||||
while (_queued.Count > 0)
|
||||
{
|
||||
Panel p = _queued.Dequeue();
|
||||
Notice(p.Id, p.Own); // gmPanelUI::ListenToElementMessage sends (id, the panel's bit now)
|
||||
}
|
||||
_dispatching = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -47,6 +47,7 @@ namespace RadarSettingsTests
|
|||
Run("StyleKeysClampAndIgnore", StyleKeysClampAndIgnore);
|
||||
Run("WorldMapBackdropSettings", () => WorldMapBackdropSettings(root));
|
||||
Run("RangeRings", () => RangeRings(root)); // after FileRoundTrip: a file from before keeps the defaults
|
||||
Run("MonsterNamesUpTo", () => MonsterNamesUpTo(root));
|
||||
Run("RoundRadarAndClipping", () => RoundRadarAndClipping(root));
|
||||
Run("ClickThroughWheelZoom", () => ClickThroughWheelZoom(root));
|
||||
Run("SelectionSettingsSave", () => SelectionSettingsSave(root));
|
||||
|
|
@ -253,6 +254,26 @@ namespace RadarSettingsTests
|
|||
// The range rings (2026-11-06): Monster Range on and Ring Range off by default, a settings file
|
||||
// from before (FileRoundTrip's, no ring lines) leaves them so, both save under their keys, and
|
||||
// the ring is range x zoom pixels round you, drawn only while some of it is on the picture.
|
||||
// R-20261122-165442-286c: "if there are more than 20 monsters on the radar, i don't want to see the names".
|
||||
private static void MonsterNamesUpTo(string root)
|
||||
{
|
||||
Check(RadarSettingsStore.MonsterNamesUpTo == 0, "off by default (and after loading an older file)");
|
||||
Check(RadarSettingsStore.MonsterNamesFor(500), "off: names with any number of monsters");
|
||||
RadarSettingsStore.MonsterNamesUpTo = 20;
|
||||
Check(RadarSettingsStore.MonsterNamesFor(20), "20 monsters at a limit of 20: names");
|
||||
Check(!RadarSettingsStore.MonsterNamesFor(21), "21 monsters: no names");
|
||||
Check(RadarSettingsStore.MonsterNamesFor(0), "none: nothing to hide");
|
||||
|
||||
string saved = Path.Combine(root, "names.txt");
|
||||
Environment.SetEnvironmentVariable("RYNTHCORE_RADAR_SETTINGS", saved);
|
||||
RadarSettingsStore.Save();
|
||||
string text = File.ReadAllText(saved).Replace("\r\n", "\n");
|
||||
Check(text.Contains("monsterNamesUpTo=20\n"), "saved monsterNamesUpTo=20");
|
||||
RadarSettingsStore.MonsterNamesUpTo = 0;
|
||||
RadarSettingsStore.Save();
|
||||
Check(File.ReadAllText(saved).Replace("\r\n", "\n").Contains("monsterNamesUpTo=0\n"), "saved back to 0");
|
||||
}
|
||||
|
||||
private static void RangeRings(string root)
|
||||
{
|
||||
Check(RadarSettingsStore.ShowMonsterRangeRing, "Monster Range ring on by default (and after loading an older file)");
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ internal static class Program
|
|||
OlderAndBadFiles();
|
||||
TermRules();
|
||||
Matching();
|
||||
VirindiSenseList();
|
||||
ListCommands();
|
||||
|
||||
Console.WriteLine($"{_checks} checks, {_failed} failed");
|
||||
return _failed == 0 ? 0 : 1;
|
||||
|
|
@ -229,8 +231,8 @@ internal static class Program
|
|||
Check(d.Terms[2].Text == "2|odd" && d.Terms[2].Enabled, "only 0| and 1| are flags");
|
||||
|
||||
var many = new List<string>();
|
||||
for (int i = 0; i < 45; i++) many.Add("term=1|name" + i);
|
||||
Check(SenseFile.Parse(many).Terms.Count == SenseFile.MaxTerms, "at most 40 terms");
|
||||
for (int i = 0; i < SenseFile.MaxTerms + 5; i++) many.Add("term=1|name" + i);
|
||||
Check(SenseFile.Parse(many).Terms.Count == SenseFile.MaxTerms, $"at most {SenseFile.MaxTerms} terms");
|
||||
string longName = new('x', 100);
|
||||
Check(SenseFile.Parse(new[] { "term=1|" + longName }).Terms[0].Text.Length == SenseFile.MaxTermLength, "a long term is cut to 64");
|
||||
Check(SenseFile.Clean(" a\r\nb ") == "a b", "one line");
|
||||
|
|
@ -245,4 +247,59 @@ internal static class Program
|
|||
Check(new SensePattern("?ire Ant", true).Matches("Fire Ant") && !new SensePattern("?ire Ant", true).Matches("Fire Ants"), "? is one letter");
|
||||
Check(!new SensePattern("", true).Matches("Anything") && !new SensePattern("x", true).Matches(""), "empty never matches");
|
||||
}
|
||||
|
||||
// ── Virindi Sense's list (patterns.txt) ────────────────────────────
|
||||
|
||||
private static void VirindiSenseList()
|
||||
{
|
||||
// The shape of a real patterns.txt: a count, then one name per line (repeats in it, any case).
|
||||
string text = "\uFEFF6\r\nSand Caves\r\nCultist Altar\r\nOverseer\r\noverseer\r\nBabe the\r\nCultist Altar\r\nNot Counted\r\n";
|
||||
List<string> names = SenseImport.Parse(Lines(text));
|
||||
Check(string.Join("|", names) == "Sand Caves|Cultist Altar|Overseer|Babe the",
|
||||
$"the count's lines, repeats (any case) dropped, nothing past the count ({string.Join("|", names)})");
|
||||
|
||||
List<string> shortFile = SenseImport.Parse(new[] { "10", "Drake", "", " Golem " });
|
||||
Check(string.Join("|", shortFile) == "Drake|Golem", "a count past the end: what's there, blanks skipped, trimmed");
|
||||
List<string> noCount = SenseImport.Parse(new[] { "Drake", "Golem" });
|
||||
Check(string.Join("|", noCount) == "Drake|Golem", "no count line: every line");
|
||||
Check(SenseImport.Parse(new[] { "0", "Drake" }).Count == 0, "a count of 0: none");
|
||||
Check(SenseImport.Parse(Array.Empty<string>()).Count == 0, "an empty file: none");
|
||||
Check(SenseImport.Parse(new[] { "1", new string('x', 100) })[0].Length == SenseFile.MaxTermLength, "a long name is cut to the term length");
|
||||
|
||||
var current = new List<SensePattern> { new("drake", false), new("Golem", true) };
|
||||
SenseMerge m = SenseImport.Merge(current, new[] { "Drake", "Sand Caves", "Overseer" });
|
||||
Check(m.Added == 2 && m.AlreadyThere == 1 && m.NoRoom == 0, $"two added, one already there ({m.Added}/{m.AlreadyThere}/{m.NoRoom})");
|
||||
Check(m.Terms.Length == 4 && m.Terms[0].Text == "drake" && !m.Terms[0].Enabled, "a name already there is left as it is (still off)");
|
||||
Check(m.Terms[2].Text == "Sand Caves" && m.Terms[2].Enabled && !m.Terms[2].IsGlob, "new names go at the end, on, plain contains");
|
||||
Check(SenseImport.Merge(current, Array.Empty<string>()).Terms.Length == 2, "nothing to add: the list as it was");
|
||||
|
||||
var big = new List<string>();
|
||||
for (int i = 0; i < SenseFile.MaxTerms + 3; i++) big.Add("Name " + i);
|
||||
SenseMerge full = SenseImport.Merge(current, big);
|
||||
Check(full.Terms.Length == SenseFile.MaxTerms && full.NoRoom == 5 && full.Added == SenseFile.MaxTerms - 2, "the list's cap: the rest don't fit, counted");
|
||||
Check(SenseFile.MaxTerms >= 163, "a 163-name Virindi Sense list fits");
|
||||
|
||||
Check(SenseImport.Reply(m, 3, "f") == "Added 2 names from Virindi Sense; 1 was on the list already.", "the reply: " + SenseImport.Reply(m, 3, "f"));
|
||||
Check(SenseImport.Reply(full, big.Count, "f").Contains($"5 didn't fit (the list holds {SenseFile.MaxTerms})", StringComparison.Ordinal), "the reply says what didn't fit");
|
||||
Check(SenseImport.Reply(new SenseMerge(Array.Empty<SensePattern>(), 0, 0, 0), 0, "f") == "No names in f.", "an empty list says so");
|
||||
Check(SenseImport.Reply(new SenseMerge(Array.Empty<SensePattern>(), 0, 4, 0), 4, "f").StartsWith("No new names", StringComparison.Ordinal), "all there already");
|
||||
Check(SenseImport.DefaultPath(@"C:\Users\x\Documents") == @"C:\Users\x\Documents\Decal Plugins\Virindi Sense\patterns.txt", "where Virindi Sense keeps it");
|
||||
Check(SenseImport.NotFound("f").Contains("/rc sense import <file>", StringComparison.Ordinal), "not found: how to give another file");
|
||||
|
||||
// Round trip: imported terms save and read back as sense.txt terms.
|
||||
string saved = SenseFile.Format(m.Terms, false, false, SenseLayoutMode.Full);
|
||||
Check(SenseFile.Parse(Lines(saved)).Terms.Count == 4, "the merged list saves and reads back");
|
||||
}
|
||||
|
||||
private static void ListCommands()
|
||||
{
|
||||
foreach (string ok in new[] { "addselected", "add selected", "ADDSEL", "import", "import C:\\x\\patterns.txt", "import \"C:\\My Docs\\patterns.txt\"" })
|
||||
Check(SenseLayout.IsValidArgs(ok), $"'/rc sense {ok}' runs");
|
||||
Check(SenseLayout.IsAddSelected(" add selected ") && !SenseLayout.IsAddSelected("add"), "add selected, spacing; add alone isn't it");
|
||||
Check(SenseLayout.IsImport("import", out string f0) && f0 == "", "import alone: the usual place");
|
||||
Check(SenseLayout.IsImport("import \"C:\\My Docs\\patterns.txt\"", out string f1) && f1 == "C:\\My Docs\\patterns.txt", "import a file (quotes dropped, spaces kept)");
|
||||
Check(!SenseLayout.IsImport("imports", out _), "only the word import");
|
||||
Check(!SenseLayout.IsLayoutCommand("import") && !SenseLayout.IsLayoutCommand("addselected"), "they aren't look commands");
|
||||
Check(SenseLayout.Usage.Contains("addselected", StringComparison.Ordinal) && SenseLayout.Usage.Contains("import [file]", StringComparison.Ordinal), "the usage names them");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,9 +52,35 @@ namespace SettingsLayoutTests
|
|||
OldTabNames();
|
||||
Moves();
|
||||
HuntAndDirtyFighting();
|
||||
LootProfileRow();
|
||||
return Finish();
|
||||
}
|
||||
|
||||
// ── Settings > Looting's Loot Profile picker (2026-11-22) ──────────────────────────────
|
||||
private static void LootProfileRow()
|
||||
{
|
||||
object? looting = Tabs.Cast<object>().FirstOrDefault(t => Name(t) == "Looting");
|
||||
Check(looting != null, "there is a Looting tab");
|
||||
if (looting == null) return;
|
||||
object first = Rows(looting)[0]!;
|
||||
Check(Label(first) == "Loot Profile" && Kind(first) == "Combo", $"Looting starts with the Loot Profile combo (got {Kind(first)} '{Label(first)}')");
|
||||
Check(first.GetType().GetProperty("ItemsNow")!.GetValue(first) != null, "its list is asked for as it draws (RynthAi's, not a fixed one)");
|
||||
Check(KeyOf(first) == "Looting//Loot Profile", $"it can be pinned to My settings (got {KeyOf(first)})");
|
||||
|
||||
// Which entry is the profile in use (UI/Data/LootProfilePick.cs).
|
||||
Type pick = _engine.GetType("RynthCore.Engine.UI.Data.LootProfilePick", throwOnError: true)!;
|
||||
int Index(string[]? items, string? path, int sel) => (int)pick.GetMethod("Index", All)!.Invoke(null, new object?[] { items, path, sel })!;
|
||||
string[] list = { "None", "Alpha.utl", "beta.json", "Gamma.utl" };
|
||||
Check(Index(list, "", 2) == 0, "no profile in use: None, whatever RynthAi's index says");
|
||||
Check(Index(list, @"C:\Games\RynthSuite\RynthAi\LootProfiles\Gamma.utl", 0) == 3, "the file in use, by its name");
|
||||
Check(Index(list, @"C:\x\BETA.JSON", 0) == 2, "any case, either extension");
|
||||
Check(Index(list, "\"C:/x/Alpha.utl\" ", 0) == 1, "quotes, spaces and forward slashes");
|
||||
Check(Index(list, @"C:\x\Elsewhere.utl", 2) == 2, "a file not listed: RynthAi's own index");
|
||||
Check(Index(list, @"C:\x\Elsewhere.utl", 9) == 3 && Index(list, @"C:\x\Elsewhere.utl", -1) == 0, "...kept in range");
|
||||
Check(Index(Array.Empty<string>(), @"C:\x\Alpha.utl", 2) == 0 && Index(null, "a.utl", 1) == 0, "no list yet: 0");
|
||||
Check(Index(list, "None", 2) == 2, "a file called None is not the None entry");
|
||||
}
|
||||
|
||||
// ── Hunt On Login and the Dirty Fighting rotation (rows added 2026-11-11, after the regroup) ──────
|
||||
private static void HuntAndDirtyFighting()
|
||||
{
|
||||
|
|
@ -115,7 +141,12 @@ namespace SettingsLayoutTests
|
|||
object d2 = Parse("{\"DfHeightRotation\":true,\"DfHeightOrder\":\"mlh\",\"DfDefaultHeight\":0}");
|
||||
Check(Get(order, d2) == 3 && Get(then, d2) == 1, "RynthAi's MLH (any case) and Low (0) read back as theirs");
|
||||
var items = (string[])order.GetType().GetProperty("Items")!.GetValue(order)!;
|
||||
Check(items.Length == 6 && items[0] == "High, Medium, Low" && items[5] == "Low, Medium, High", "the order choices read as RynthAi's window shows them");
|
||||
Check(items.Length == 15 && items[0] == "High, Medium, Low" && items[5] == "Low, Medium, High" && items[6] == "High, Medium" && items[14] == "Low only",
|
||||
"the order choices read as RynthAi's window shows them (one or two heights too, R-20261120-014055-59be)");
|
||||
Set(order, d, 6);
|
||||
Check((string?)P(d, "DfHeightOrder") == "HM", "two heights: HM");
|
||||
object d3 = Parse("{\"DfHeightRotation\":true,\"DfHeightOrder\":\"L\",\"DfDefaultHeight\":-1}");
|
||||
Check(Get(order, d3) == 14, "RynthAi's L reads back as Low only");
|
||||
}
|
||||
|
||||
// ── The tabs, in order, and the sidebar's groups ───────────────────────────────
|
||||
|
|
|
|||
630
tools/VTankFileImportTests/Program.cs
Normal file
630
tools/VTankFileImportTests/Program.cs
Normal file
|
|
@ -0,0 +1,630 @@
|
|||
using System.Text;
|
||||
using RynthCore.App;
|
||||
using static RynthCore.App.VTankFileImport;
|
||||
|
||||
namespace VTankFileImportTests;
|
||||
|
||||
/// <summary>
|
||||
/// VTankFileImport: the installer's "copy your VirindiTank files to RynthAi" offer and the launcher's
|
||||
/// Import VirindiTank files button (the plan: what goes where, identical files, conflicts, keep both).
|
||||
/// Writes only under %TEMP%\VTankFileImportTests-*; never reads the PC's real VTank folders.
|
||||
/// </summary>
|
||||
internal static class Program
|
||||
{
|
||||
private static int _checks, _failed;
|
||||
private static string _temp = "";
|
||||
|
||||
private static int Main()
|
||||
{
|
||||
_temp = Path.Combine(Path.GetTempPath(), $"VTankFileImportTests-{Guid.NewGuid():N}");
|
||||
Directory.CreateDirectory(_temp);
|
||||
try
|
||||
{
|
||||
Scenario("Decal entries: VTank's GUID or object name gives its folder; other plugins and bad paths don't", PluginEntries);
|
||||
Scenario("folders: Decal's first, then the usual ones; duplicates (case, trailing slash) once", Candidates);
|
||||
Scenario("scan: top level only, exact extensions (.met .af .nav .utl); .usd, others and VTank's \"--\" state files left out", TopLevelOnly);
|
||||
Scenario("scan: counts by kind; files RynthAi already has are not new", CountsAndExisting);
|
||||
Scenario("scan: the same name in two VTank folders is offered once", DuplicateNames);
|
||||
Scenario("scan: missing folders skipped; a folder inside RynthAi is never read", MissingAndInside);
|
||||
Scenario("scan: changes nothing anywhere", ScanChangesNothing);
|
||||
Scenario("copy: new files copied byte for byte into MetaFiles, NavProfiles, LootProfiles", CopiesIntoFolders);
|
||||
Scenario("copy: never overwrites a file RynthAi has", NeverOverwrites);
|
||||
Scenario("copy: the VTank folder is left exactly as it was (copy, not move)", SourceUntouched);
|
||||
Scenario("copy: a read-only source gives a writable copy; the source stays read-only", ReadOnlySource);
|
||||
Scenario("copy: a second run copies nothing (everything already there)", SecondRun);
|
||||
Scenario("copy: every copied and skipped file is logged", Logged);
|
||||
Scenario("kinds: .met .af -> MetaFiles, .nav -> NavProfiles, .utl -> LootProfiles, flat; others none", Kinds);
|
||||
Scenario("scan: a file identical to RynthAi's is 'same', a different one is a conflict", SameVersusConflict);
|
||||
Scenario("copy, skip: conflicts and identical files are left alone, RynthAi's file kept", SkipMode);
|
||||
Scenario("copy, keep both: a conflict is copied as '<name> (VTank)', RynthAi's file kept", KeepBothMode);
|
||||
Scenario("copy, keep both: a second run copies nothing; a taken '(VTank)' name gives '(VTank 2)'", KeepBothAgain);
|
||||
Scenario("keep-both names: '(VTank)', '(VTank 2)' ...; first free one", KeepBothNames);
|
||||
Scenario("picked folder: itself, or its VirindiTank / VirindiPlugins\\VirindiTank subfolder", PickedFolder);
|
||||
Scenario("plain words: the plan and the result say counts, folders and what was kept", PlainWords);
|
||||
Scenario("command line: round-trips (spaces); malformed ones refused", Arguments);
|
||||
Scenario("command: scan writes counts and copies nothing", RunScan);
|
||||
Scenario("command: copy writes counts and the log lines", RunCopy);
|
||||
Scenario("command: an existing report, a missing RynthAi folder or a bad line does nothing (exit 2)", RunRefuses);
|
||||
Scenario("command: no VTank folder at all gives zero counts", RunNothingFound);
|
||||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (string f in Directory.GetFiles(_temp, "*", SearchOption.AllDirectories)) File.SetAttributes(f, FileAttributes.Normal);
|
||||
Directory.Delete(_temp, recursive: true);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
Console.WriteLine();
|
||||
Console.WriteLine($"{_checks} check(s), {_failed} failed.");
|
||||
return _failed == 0 ? 0 : 1;
|
||||
}
|
||||
|
||||
private static void Scenario(string name, Action body)
|
||||
{
|
||||
int before = _failed;
|
||||
try { body(); }
|
||||
catch (Exception ex) { Check(false, $"threw {ex.GetType().Name}: {ex.Message}"); }
|
||||
Console.WriteLine($"[{(_failed == before ? "PASS" : "FAIL")}] {name}");
|
||||
}
|
||||
|
||||
private static void Check(bool ok, string what)
|
||||
{
|
||||
_checks++;
|
||||
if (ok) return;
|
||||
_failed++;
|
||||
Console.WriteLine(" - " + what);
|
||||
}
|
||||
|
||||
private static string NewDir(string name)
|
||||
{
|
||||
string d = Path.Combine(_temp, Guid.NewGuid().ToString("N")[..8], name);
|
||||
Directory.CreateDirectory(d);
|
||||
return d;
|
||||
}
|
||||
|
||||
private static string Put(string dir, string name, string text = "")
|
||||
{
|
||||
Directory.CreateDirectory(dir);
|
||||
string p = Path.Combine(dir, name);
|
||||
File.WriteAllText(p, text.Length > 0 ? text : "content of " + name);
|
||||
return p;
|
||||
}
|
||||
|
||||
/// <summary>A RynthAi folder like the installer's (three subfolders made).</summary>
|
||||
private static string RynthAi()
|
||||
{
|
||||
string d = NewDir("Rynth Suite");
|
||||
string ai = Path.Combine(d, "RynthAi");
|
||||
foreach (string s in new[] { "MetaFiles", "NavProfiles", "LootProfiles" }) Directory.CreateDirectory(Path.Combine(ai, s));
|
||||
return ai;
|
||||
}
|
||||
|
||||
/// <summary>A VTank folder as a real install has it: everything at the top level.</summary>
|
||||
private static string VTank(params string[] names)
|
||||
{
|
||||
string d = NewDir("Virindi Tank");
|
||||
foreach (string n in names) Put(d, n);
|
||||
return d;
|
||||
}
|
||||
|
||||
private static Dictionary<string, (long, DateTime, FileAttributes, string)> Snapshot(string dir)
|
||||
{
|
||||
var map = new Dictionary<string, (long, DateTime, FileAttributes, string)>(StringComparer.OrdinalIgnoreCase);
|
||||
foreach (string f in Directory.GetFiles(dir, "*", SearchOption.AllDirectories))
|
||||
{
|
||||
var fi = new FileInfo(f);
|
||||
map[f] = (fi.Length, fi.LastWriteTimeUtc, fi.Attributes, File.ReadAllText(f));
|
||||
}
|
||||
foreach (string d in Directory.GetDirectories(dir, "*", SearchOption.AllDirectories)) map[d + "\\"] = (0, default, default, "");
|
||||
return map;
|
||||
}
|
||||
|
||||
private static bool SameSnapshot(Dictionary<string, (long, DateTime, FileAttributes, string)> a,
|
||||
Dictionary<string, (long, DateTime, FileAttributes, string)> b) =>
|
||||
a.Count == b.Count && a.All(kv => b.TryGetValue(kv.Key, out var v) && v.Equals(kv.Value));
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
||||
private static void PluginEntries()
|
||||
{
|
||||
var got = VTankPathsFromPluginEntries(new (string, string?, string?)[]
|
||||
{
|
||||
("{642F1F48-16BE-48BF-B1D4-286652C4533E}", "uTank2.PluginCore", @"C:\Games\VirindiPlugins\VirindiTank\"),
|
||||
("{642f1f48-16be-48bf-b1d4-286652c4533e}", null, @"D:\VT by guid"),
|
||||
("{00000000-0000-0000-0000-000000000001}", "uTank2.PluginCore", "\"E:\\VT by object\""),
|
||||
("{0A7B25AC-79A9-4F6A-9751-419B87A7BB05}", "VCS5.PluginCore", @"C:\Games\VirindiPlugins\VirindiChatSystem5\"),
|
||||
("{642F1F48-16BE-48BF-B1D4-286652C4533E}", "uTank2.PluginCore", @"relative\VirindiTank"),
|
||||
("{642F1F48-16BE-48BF-B1D4-286652C4533E}", "uTank2.PluginCore", ""),
|
||||
("{642F1F48-16BE-48BF-B1D4-286652C4533E}", "uTank2.PluginCore", null),
|
||||
});
|
||||
Check(got.Count == 3, $"3 VTank folders expected, got {got.Count}: {string.Join(" | ", got)}");
|
||||
Check(got.Contains(@"C:\Games\VirindiPlugins\VirindiTank\"), "the GUID+object entry");
|
||||
Check(got.Contains(@"D:\VT by guid"), "matched by GUID (any case)");
|
||||
Check(got.Contains(@"E:\VT by object"), "matched by object name, quotes removed");
|
||||
Check(!got.Any(g => g.Contains("ChatSystem")), "another Virindi plugin is not VTank");
|
||||
}
|
||||
|
||||
private static void Candidates()
|
||||
{
|
||||
var c = CandidateRoots(new[] { @"D:\Decal VT\", @"c:\games\virindiplugins\virinditank\" },
|
||||
@"C:\Users\P\Documents", @"C:\Users\P\AppData\Local", @"C:\Program Files (x86)", @"C:\Program Files");
|
||||
Check(c.Count > 0 && c[0] == @"D:\Decal VT", $"Decal's folder first, without the slash: {string.Join(" | ", c)}");
|
||||
Check(c.Count(x => x.Equals(@"C:\Games\VirindiPlugins\VirindiTank", StringComparison.OrdinalIgnoreCase)) == 1, "C:\\Games one listed once");
|
||||
foreach (string want in new[]
|
||||
{
|
||||
@"C:\Users\P\Documents\VirindiPlugins\VirindiTank",
|
||||
@"C:\Users\P\Documents\Decal\VirindiPlugins\VirindiTank",
|
||||
@"C:\Users\P\AppData\Local\VirindiPlugins\VirindiTank",
|
||||
@"C:\Program Files (x86)\VirindiPlugins\VirindiTank",
|
||||
@"C:\Program Files\VirindiPlugins\VirindiTank",
|
||||
})
|
||||
Check(c.Contains(want, StringComparer.OrdinalIgnoreCase), "listed: " + want);
|
||||
Check(c.Count == 7, $"7 folders, got {c.Count}");
|
||||
var none = CandidateRoots(Array.Empty<string>(), null, null, null, null);
|
||||
Check(none.Count == 1 && none[0] == @"C:\Games\VirindiPlugins\VirindiTank", "with no known folders only C:\\Games");
|
||||
}
|
||||
|
||||
private static void TopLevelOnly()
|
||||
{
|
||||
string vt = VTank("Hunt.met", "Town.nav", "Loot.utl", "Server_Char.usd", "utank2-i.dll", "Hunt.af",
|
||||
"notes.meta", "route.navx", "loot.utlx", "UPPER.MET", "readme.txt", "x.afx", "Char.cdf", "Char.ast",
|
||||
"--Char_Server.met", "--Char_Server.nav", "--Char_Server.usd", "--Other_Server.met");
|
||||
Put(Path.Combine(vt, "old"), "Deep.met");
|
||||
Put(Path.Combine(vt, "old", "older"), "Deeper.nav");
|
||||
string ai = RynthAi();
|
||||
var s = Find(new[] { vt }, ai);
|
||||
var names = s.Files.Select(f => Path.GetFileName(f.Source)).OrderBy(n => n, StringComparer.OrdinalIgnoreCase).ToList();
|
||||
Check(names.SequenceEqual(new[] { "Hunt.af", "Hunt.met", "Loot.utl", "Town.nav", "UPPER.MET" }, StringComparer.OrdinalIgnoreCase),
|
||||
"found: " + string.Join(", ", names));
|
||||
Check(s.Files.Single(f => f.Source.EndsWith("UPPER.MET")).Kind == Kind.Meta, "extension case ignored");
|
||||
Check(s.Files.All(f => Path.GetDirectoryName(f.Source) == vt), "only the top level");
|
||||
Check(s.Files.Single(f => f.Source.EndsWith("Hunt.af")).Kind == Kind.Meta
|
||||
&& s.Files.Single(f => f.Source.EndsWith("Hunt.af")).Destination.EndsWith(@"MetaFiles\Hunt.af"), ".af (metaf text metas) go to MetaFiles");
|
||||
Check(s.StateFilesLeftOut == 3, $"3 VTank \"--\" state files (.met/.nav) left out, got {s.StateFilesLeftOut}");
|
||||
Check(s.Log.Any(l => l.Contains("state file")), "the left-out state files are logged");
|
||||
Check(s.Count(Kind.Meta) == 3, $"3 metas (Hunt.met, Hunt.af, UPPER.MET), got {s.Count(Kind.Meta)}");
|
||||
}
|
||||
|
||||
private static void CountsAndExisting()
|
||||
{
|
||||
string vt = VTank("a.met", "b.met", "c.met", "r1.nav", "r2.nav", "l.utl");
|
||||
string ai = RynthAi();
|
||||
Put(Path.Combine(ai, "MetaFiles"), "B.MET", "the player's own");
|
||||
Put(Path.Combine(ai, "LootProfiles"), "l.utl", "the player's own");
|
||||
var s = Find(new[] { vt }, ai);
|
||||
Check(s.Count(Kind.Meta) == 3 && s.Count(Kind.Nav) == 2 && s.Count(Kind.Loot) == 1,
|
||||
$"counts {s.Count(Kind.Meta)}/{s.Count(Kind.Nav)}/{s.Count(Kind.Loot)}");
|
||||
Check(s.NewCount == 4, $"4 new (b.met and l.utl are there), got {s.NewCount}");
|
||||
var b = s.Files.Single(f => f.Source.EndsWith("b.met"));
|
||||
Check(b.State == State.AlreadyInRynthAi, "b.met already in RynthAi (any case)");
|
||||
Check(b.Destination == Path.Combine(ai, "MetaFiles", "b.met"), "destination in MetaFiles");
|
||||
Check(s.Files.Single(f => f.Source.EndsWith("r1.nav")).Destination == Path.Combine(ai, "NavProfiles", "r1.nav"), "navs to NavProfiles");
|
||||
Check(s.Files.Single(f => f.Source.EndsWith("l.utl")).Destination == Path.Combine(ai, "LootProfiles", "l.utl"), "loot to LootProfiles");
|
||||
}
|
||||
|
||||
private static void DuplicateNames()
|
||||
{
|
||||
string vt1 = VTank("same.met", "only1.nav");
|
||||
string vt2 = VTank("SAME.met", "only2.nav");
|
||||
File.WriteAllText(Path.Combine(vt2, "SAME.met"), "second folder's");
|
||||
string ai = RynthAi();
|
||||
var s = Find(new[] { vt1, vt2 }, ai);
|
||||
Check(s.Count(Kind.Meta) == 1, $"one meta by name, got {s.Count(Kind.Meta)}");
|
||||
Check(s.Count(Kind.Nav) == 2, "two different navs");
|
||||
Check(s.Files.Single(f => f.Source.StartsWith(vt1) && f.Kind == Kind.Meta).State == State.New, "the first folder's is offered");
|
||||
Check(s.Files.Single(f => f.Source.StartsWith(vt2) && f.Kind == Kind.Meta).State == State.DuplicateName, "the second is a duplicate");
|
||||
var c = Copy(s);
|
||||
Check(File.ReadAllText(Path.Combine(ai, "MetaFiles", "same.met")) == "content of same.met", "the first folder's file copied");
|
||||
Check(c.Copied == 3 && c.Skipped == 1, $"3 copied 1 skipped, got {c.Copied}/{c.Skipped}");
|
||||
}
|
||||
|
||||
private static void MissingAndInside()
|
||||
{
|
||||
string ai = RynthAi();
|
||||
Put(Path.Combine(ai, "MetaFiles"), "mine.met");
|
||||
string inside = Path.Combine(ai, "MetaFiles");
|
||||
string vt = VTank("x.met");
|
||||
var s = Find(new[] { Path.Combine(_temp, "no such folder"), ai, inside, vt }, ai);
|
||||
Check(s.Roots.Count == 1 && s.Roots[0] == vt, "only the real VTank folder read: " + string.Join(" | ", s.Roots));
|
||||
Check(s.Files.Count == 1, $"one file, got {s.Files.Count}");
|
||||
Check(s.Log.Count(l => l.Contains("inside RynthAi")) == 2, "the two RynthAi folders are logged as not read");
|
||||
}
|
||||
|
||||
private static void ScanChangesNothing()
|
||||
{
|
||||
string vt = VTank("a.met", "b.nav", "c.utl");
|
||||
string ai = RynthAi();
|
||||
Directory.Delete(Path.Combine(ai, "LootProfiles"));
|
||||
var beforeVt = Snapshot(vt);
|
||||
var beforeAi = Snapshot(ai);
|
||||
Find(new[] { vt }, ai);
|
||||
Check(SameSnapshot(beforeVt, Snapshot(vt)), "VTank folder unchanged");
|
||||
Check(SameSnapshot(beforeAi, Snapshot(ai)), "RynthAi folder unchanged (no folder created by a scan)");
|
||||
}
|
||||
|
||||
private static void CopiesIntoFolders()
|
||||
{
|
||||
string vt = VTank();
|
||||
Put(vt, "Hunt Meta.met", "meta bytes\u00e9");
|
||||
Put(vt, "Route.nav", "uTank2 NAV 1.2\r\n4\r\n");
|
||||
Put(vt, "Loot.utl", "UTL\0binary-ish");
|
||||
string ai = RynthAi();
|
||||
Directory.Delete(Path.Combine(ai, "NavProfiles"));
|
||||
var c = Copy(Find(new[] { vt }, ai));
|
||||
Check(c.Copied == 3 && c.Skipped == 0 && c.Failed == 0, $"3 copied, got {c.Copied}/{c.Skipped}/{c.Failed}");
|
||||
foreach (var (sub, name) in new[] { ("MetaFiles", "Hunt Meta.met"), ("NavProfiles", "Route.nav"), ("LootProfiles", "Loot.utl") })
|
||||
{
|
||||
string dest = Path.Combine(ai, sub, name);
|
||||
Check(File.Exists(dest) && File.ReadAllBytes(dest).SequenceEqual(File.ReadAllBytes(Path.Combine(vt, name))), $"{sub}\\{name} identical");
|
||||
}
|
||||
}
|
||||
|
||||
private static void NeverOverwrites()
|
||||
{
|
||||
string vt = VTank("a.met", "b.nav");
|
||||
string ai = RynthAi();
|
||||
string mine = Put(Path.Combine(ai, "MetaFiles"), "a.met", "the player's own edited meta");
|
||||
File.SetLastWriteTimeUtc(mine, new DateTime(2020, 1, 2, 3, 4, 5, DateTimeKind.Utc));
|
||||
var c = Copy(Find(new[] { vt }, ai));
|
||||
Check(File.ReadAllText(mine) == "the player's own edited meta", "the player's file kept");
|
||||
Check(File.GetLastWriteTimeUtc(mine) == new DateTime(2020, 1, 2, 3, 4, 5, DateTimeKind.Utc), "not even touched");
|
||||
Check(c.Copied == 1 && c.Skipped == 1, $"1 copied 1 skipped, got {c.Copied}/{c.Skipped}");
|
||||
|
||||
// A file that appears after the scan, before the copy: still not replaced.
|
||||
string vt2 = VTank("late.met");
|
||||
var scan = Find(new[] { vt2 }, ai);
|
||||
string late = Put(Path.Combine(ai, "MetaFiles"), "late.met", "arrived in between");
|
||||
var c2 = Copy(scan);
|
||||
Check(File.ReadAllText(late) == "arrived in between", "a file that arrived after the scan is kept");
|
||||
Check(c2.Copied == 0 && c2.Skipped == 1, $"0 copied 1 skipped, got {c2.Copied}/{c2.Skipped}");
|
||||
}
|
||||
|
||||
private static void SourceUntouched()
|
||||
{
|
||||
string vt = VTank("a.met", "b.nav", "c.utl", "Char.usd", "utank2-i.dll");
|
||||
Put(Path.Combine(vt, "sub"), "d.met");
|
||||
string ai = RynthAi();
|
||||
Put(Path.Combine(ai, "NavProfiles"), "b.nav", "mine");
|
||||
var before = Snapshot(vt);
|
||||
Copy(Find(new[] { vt }, ai));
|
||||
Check(SameSnapshot(before, Snapshot(vt)), "every VTank file still there, same size, time, attributes and content");
|
||||
}
|
||||
|
||||
private static void ReadOnlySource()
|
||||
{
|
||||
string vt = VTank("ro.met");
|
||||
string src = Path.Combine(vt, "ro.met");
|
||||
File.SetAttributes(src, FileAttributes.ReadOnly);
|
||||
string ai = RynthAi();
|
||||
var c = Copy(Find(new[] { vt }, ai));
|
||||
string dest = Path.Combine(ai, "MetaFiles", "ro.met");
|
||||
Check(c.Copied == 1, "copied");
|
||||
Check(File.Exists(dest) && (File.GetAttributes(dest) & FileAttributes.ReadOnly) == 0, "the copy is writable");
|
||||
Check((File.GetAttributes(src) & FileAttributes.ReadOnly) != 0, "the VTank file is still read-only");
|
||||
}
|
||||
|
||||
private static void SecondRun()
|
||||
{
|
||||
string vt = VTank("a.met", "b.nav", "c.utl");
|
||||
string ai = RynthAi();
|
||||
var first = Copy(Find(new[] { vt }, ai));
|
||||
var again = Find(new[] { vt }, ai);
|
||||
var second = Copy(again);
|
||||
Check(first.Copied == 3, "first run copies 3");
|
||||
Check(again.NewCount == 0, "nothing new the second time");
|
||||
Check(again.SameCount == 3, $"all 3 are the same file as RynthAi's now, got {again.SameCount}");
|
||||
Check(second.Copied == 0 && second.Skipped == 0 && second.AlreadyThere == 3 && second.Failed == 0,
|
||||
$"0 copied 3 already there, got {second.Copied}/{second.Skipped}/{second.AlreadyThere}/{second.Failed}");
|
||||
}
|
||||
|
||||
private static void Logged()
|
||||
{
|
||||
string vt = VTank("new.met", "old.nav");
|
||||
string ai = RynthAi();
|
||||
Put(Path.Combine(ai, "NavProfiles"), "old.nav", "the player's own old.nav");
|
||||
var c = Copy(Find(new[] { vt }, ai));
|
||||
Check(c.Log.Count == 2, $"two lines, got {c.Log.Count}");
|
||||
Check(c.Log.Any(l => l.Contains("copied") && l.Contains("new.met") && l.Contains("MetaFiles")), "copied line names source and destination");
|
||||
Check(c.Log.Any(l => l.Contains("skipped") && l.Contains("old.nav") && l.Contains("already has")), "skipped line says why");
|
||||
}
|
||||
|
||||
private static void Kinds()
|
||||
{
|
||||
Check(KindOf("a.met") == Kind.Meta && KindOf("A.MET") == Kind.Meta && KindOf("a.af") == Kind.Meta, "metas");
|
||||
Check(KindOf("r.nav") == Kind.Nav && KindOf("l.utl") == Kind.Loot, "navs and loot");
|
||||
foreach (string n in new[] { "c.usd", "c.cdf", "c.ast", "g.ugd", "x.meta", "x.afx", "x.navx", "readme.txt", "noext" })
|
||||
Check(KindOf(n) == null, "not imported: " + n);
|
||||
Check(RynthAiSubfolder(Kind.Meta) == "MetaFiles" && RynthAiSubfolder(Kind.Nav) == "NavProfiles" && RynthAiSubfolder(Kind.Loot) == "LootProfiles",
|
||||
"RynthAi's three folders");
|
||||
Check(IsVTankStateFile(@"C:\VT\--Char_Server.met") && !IsVTankStateFile(@"C:\VT\-one dash.met") && !IsVTankStateFile("Hunt--x.met"),
|
||||
"state files are the \"--\" names");
|
||||
|
||||
string vt = VTank("a.met", "b.af", "c.nav", "d.utl");
|
||||
string ai = RynthAi();
|
||||
var s = Find(new[] { vt }, ai);
|
||||
foreach (var f in s.Files)
|
||||
Check(Path.GetDirectoryName(f.Destination) == Path.Combine(ai, RynthAiSubfolder(f.Kind)),
|
||||
$"{Path.GetFileName(f.Source)} goes to the top level of {RynthAiSubfolder(f.Kind)} (no server or character subfolder)");
|
||||
}
|
||||
|
||||
private static void SameVersusConflict()
|
||||
{
|
||||
string vt = VTank("same.met", "diff.met", "same.nav");
|
||||
string ai = RynthAi();
|
||||
File.Copy(Path.Combine(vt, "same.met"), Path.Combine(ai, "MetaFiles", "same.met"));
|
||||
File.Copy(Path.Combine(vt, "same.nav"), Path.Combine(ai, "NavProfiles", "SAME.NAV"));
|
||||
Put(Path.Combine(ai, "MetaFiles"), "diff.met", "the player's own diff.met");
|
||||
var s = Find(new[] { vt }, ai);
|
||||
Check(s.Files.Single(f => f.Source.EndsWith("same.met")).State == State.SameInRynthAi, "identical meta: same");
|
||||
Check(s.Files.Single(f => f.Source.EndsWith("same.nav")).State == State.SameInRynthAi, "identical nav, name in another case: same");
|
||||
Check(s.Files.Single(f => f.Source.EndsWith("diff.met")).State == State.AlreadyInRynthAi, "different content: conflict");
|
||||
Check(s.NewCount == 0 && s.SameCount == 2 && s.ConflictCount == 1, $"0 new 2 same 1 conflict, got {s.NewCount}/{s.SameCount}/{s.ConflictCount}");
|
||||
// Same length, different bytes is still a conflict.
|
||||
string vt2 = VTank();
|
||||
Put(vt2, "len.met", "AAAA");
|
||||
Put(Path.Combine(ai, "MetaFiles"), "len.met", "AAAB");
|
||||
Check(Find(new[] { vt2 }, ai).Files.Single().State == State.AlreadyInRynthAi, "same length, other bytes: conflict");
|
||||
Check(SameFile(Path.Combine(vt, "same.met"), Path.Combine(ai, "MetaFiles", "same.met")), "SameFile on identical files");
|
||||
Check(!SameFile(Path.Combine(vt, "same.met"), Path.Combine(_temp, "missing.met")), "SameFile with a missing file is false");
|
||||
}
|
||||
|
||||
private static void SkipMode()
|
||||
{
|
||||
string vt = VTank("new.met", "diff.met", "same.utl");
|
||||
string ai = RynthAi();
|
||||
string mine = Put(Path.Combine(ai, "MetaFiles"), "diff.met", "the player's own diff.met");
|
||||
File.Copy(Path.Combine(vt, "same.utl"), Path.Combine(ai, "LootProfiles", "same.utl"));
|
||||
var c = Copy(Find(new[] { vt }, ai), ConflictMode.Skip);
|
||||
Check(c.Copied == 1 && c.Skipped == 1 && c.AlreadyThere == 1 && c.KeptBoth == 0 && c.Failed == 0,
|
||||
$"1 copied 1 skipped 1 already there, got {c.Copied}/{c.Skipped}/{c.AlreadyThere}/{c.KeptBoth}/{c.Failed}");
|
||||
Check(File.ReadAllText(mine) == "the player's own diff.met", "RynthAi's file kept");
|
||||
Check(!File.Exists(Path.Combine(ai, "MetaFiles", "diff (VTank).met")), "no keep-both copy in skip mode");
|
||||
Check(c.Log.Any(l => l.Contains("skipped") && l.Contains("different")), "the skip line says RynthAi's file is different");
|
||||
}
|
||||
|
||||
private static void KeepBothMode()
|
||||
{
|
||||
string vt = VTank();
|
||||
Put(vt, "diff.met", "VTank's diff.met");
|
||||
Put(vt, "Route.nav", "VTank's Route.nav");
|
||||
Put(vt, "new.utl", "VTank's new.utl");
|
||||
Put(vt, "same.met", "the same");
|
||||
string ai = RynthAi();
|
||||
string mineMeta = Put(Path.Combine(ai, "MetaFiles"), "diff.met", "the player's own diff.met");
|
||||
string mineNav = Put(Path.Combine(ai, "NavProfiles"), "route.NAV", "the player's own route");
|
||||
Put(Path.Combine(ai, "MetaFiles"), "same.met", "the same");
|
||||
var before = Snapshot(vt);
|
||||
var c = Copy(Find(new[] { vt }, ai), ConflictMode.KeepBoth);
|
||||
Check(c.Copied == 3 && c.KeptBoth == 2 && c.AlreadyThere == 1 && c.Skipped == 0 && c.Failed == 0,
|
||||
$"3 copied (2 kept both) 1 already there, got {c.Copied}/{c.KeptBoth}/{c.AlreadyThere}/{c.Skipped}/{c.Failed}");
|
||||
Check(File.ReadAllText(mineMeta) == "the player's own diff.met" && File.ReadAllText(mineNav) == "the player's own route", "RynthAi's files kept");
|
||||
Check(File.ReadAllText(Path.Combine(ai, "MetaFiles", "diff (VTank).met")) == "VTank's diff.met", "meta copied as 'diff (VTank).met'");
|
||||
Check(File.ReadAllText(Path.Combine(ai, "NavProfiles", "route (VTank).NAV")) == "VTank's Route.nav"
|
||||
|| File.ReadAllText(Path.Combine(ai, "NavProfiles", "Route (VTank).nav")) == "VTank's Route.nav", "nav copied beside it as '(VTank)'");
|
||||
Check(File.ReadAllText(Path.Combine(ai, "LootProfiles", "new.utl")) == "VTank's new.utl", "a new file keeps its own name");
|
||||
Check(!File.Exists(Path.Combine(ai, "MetaFiles", "same (VTank).met")), "an identical file is never copied, even with keep both");
|
||||
Check(Path.GetExtension(Path.Combine(ai, "MetaFiles", "diff (VTank).met")) == ".met", "the copy keeps its extension, so RynthAi lists it");
|
||||
Check(SameSnapshot(before, Snapshot(vt)), "VTank folder unchanged");
|
||||
Check(c.Log.Any(l => l.Contains("diff (VTank).met") && l.Contains("kept")), "the log names the new name and says RynthAi's was kept");
|
||||
}
|
||||
|
||||
private static void KeepBothAgain()
|
||||
{
|
||||
string vt = VTank();
|
||||
Put(vt, "diff.met", "VTank's diff.met");
|
||||
string ai = RynthAi();
|
||||
Put(Path.Combine(ai, "MetaFiles"), "diff.met", "the player's own");
|
||||
var first = Copy(Find(new[] { vt }, ai), ConflictMode.KeepBoth);
|
||||
var again = Find(new[] { vt }, ai);
|
||||
var second = Copy(again, ConflictMode.KeepBoth);
|
||||
Check(first.KeptBoth == 1, "first run keeps both");
|
||||
Check(again.SameCount == 1 && again.ConflictCount == 0, "second scan: the '(VTank)' copy is the same file");
|
||||
Check(second.Copied == 0 && second.AlreadyThere == 1, $"second run copies nothing, got {second.Copied}/{second.AlreadyThere}");
|
||||
Check(!File.Exists(Path.Combine(ai, "MetaFiles", "diff (VTank 2).met")), "no '(VTank 2)' from a second run");
|
||||
|
||||
// A different VTank file of that name later: "(VTank)" is taken by the older copy -> "(VTank 2)".
|
||||
string vt2 = VTank();
|
||||
Put(vt2, "diff.met", "a newer VTank diff.met");
|
||||
var third = Copy(Find(new[] { vt2 }, ai), ConflictMode.KeepBoth);
|
||||
Check(third.KeptBoth == 1 && File.ReadAllText(Path.Combine(ai, "MetaFiles", "diff (VTank 2).met")) == "a newer VTank diff.met",
|
||||
"copied as 'diff (VTank 2).met'");
|
||||
Check(File.ReadAllText(Path.Combine(ai, "MetaFiles", "diff (VTank).met")) == "VTank's diff.met", "the earlier copy kept");
|
||||
}
|
||||
|
||||
private static void KeepBothNames()
|
||||
{
|
||||
string d = @"C:\R\MetaFiles\Hunt Here.met";
|
||||
Check(KeepBothName(d, 1) == @"C:\R\MetaFiles\Hunt Here (VTank).met", "n=1: " + KeepBothName(d, 1));
|
||||
Check(KeepBothName(d, 2) == @"C:\R\MetaFiles\Hunt Here (VTank 2).met", "n=2: " + KeepBothName(d, 2));
|
||||
Check(KeepBothName(@"C:\R\NavProfiles\a.b.nav", 1) == @"C:\R\NavProfiles\a.b (VTank).nav", "only the last extension");
|
||||
var taken = new HashSet<string>(StringComparer.OrdinalIgnoreCase) { KeepBothName(d, 1), KeepBothName(d, 2) };
|
||||
Check(FreeKeepBothName(d, taken.Contains) == KeepBothName(d, 3), "first free one");
|
||||
Check(FreeKeepBothName(d, _ => true) == null, "none free: null (the file is skipped)");
|
||||
}
|
||||
|
||||
private static void PickedFolder()
|
||||
{
|
||||
string plugins = NewDir("VirindiPlugins");
|
||||
string vt = Path.Combine(plugins, "VirindiTank");
|
||||
Put(vt, "a.met");
|
||||
Check(ResolvePickedFolder(vt) == vt, "the VTank folder itself");
|
||||
Check(ResolvePickedFolder(vt + "\\") == vt, "trailing slash");
|
||||
Check(ResolvePickedFolder(plugins) == vt, "the VirindiPlugins folder above it -> VirindiTank");
|
||||
string games = Path.GetDirectoryName(plugins)!;
|
||||
Check(ResolvePickedFolder(games) == vt, "the folder above VirindiPlugins -> VirindiPlugins\\VirindiTank");
|
||||
string empty = NewDir("empty");
|
||||
Check(ResolvePickedFolder(empty) == empty, "a folder without VTank files: itself (the scan then says so)");
|
||||
string onlyState = VTank("--Char_Server.met", "--Char_Server.nav", "Char.usd");
|
||||
Check(!HasImportableFiles(onlyState), "only state files and settings: nothing to import");
|
||||
Check(HasImportableFiles(vt) && !HasImportableFiles(Path.Combine(_temp, "missing")), "HasImportableFiles");
|
||||
}
|
||||
|
||||
private static void PlainWords()
|
||||
{
|
||||
string vt = VTank("a.met", "b.met", "r.nav", "l.utl", "--Char_Server.met");
|
||||
string ai = RynthAi();
|
||||
Put(Path.Combine(ai, "MetaFiles"), "b.met", "mine");
|
||||
File.Copy(Path.Combine(vt, "l.utl"), Path.Combine(ai, "LootProfiles", "l.utl"));
|
||||
var s = Find(new[] { vt }, ai);
|
||||
string plan = DescribePlan(s);
|
||||
Check(plan.Contains(vt), "names the folder");
|
||||
Check(plan.Contains("2 metas (1 new) -> MetaFiles") && plan.Contains("1 nav route (1 new) -> NavProfiles")
|
||||
&& plan.Contains("1 loot profile (0 new) -> LootProfiles"), "counts per kind and where they go:\n" + plan);
|
||||
Check(plan.Contains("2 files are new"), "how many are new");
|
||||
Check(plan.Contains("1 file is already in RynthAi"), "how many are already there");
|
||||
Check(plan.Contains("1 file has the same name") && plan.Contains("keep both") && plan.Contains("never replaced"), "the conflict and the choice");
|
||||
Check(plan.Contains("1 VirindiTank character file") && plan.Contains("left out"), "the state files left out");
|
||||
|
||||
var noConflict = DescribePlan(Find(new[] { VTank("x.nav") }, RynthAi()));
|
||||
Check(!noConflict.Contains("keep both") && !noConflict.Contains("character file"), "no conflict or state lines when there are none");
|
||||
|
||||
var r = new CopyResult { Copied = 3, KeptBoth = 1, Skipped = 2, AlreadyThere = 4, Failed = 1 };
|
||||
string text = DescribeResult(r, ai);
|
||||
Check(text.Contains("Copied 3 files to " + ai), "copied count and where: " + text);
|
||||
Check(text.Contains("1 of them was copied as \"<name> (VTank)\""), "kept both");
|
||||
Check(text.Contains("4 files were already in RynthAi"), "already there");
|
||||
Check(text.Contains("2 files were skipped") && text.Contains("yours was kept"), "skipped");
|
||||
Check(text.Contains("1 file could not be copied"), "failed");
|
||||
Check(text.Contains("within a few seconds"), "when they show in RynthAi");
|
||||
Check(DescribeResult(new CopyResult(), ai).StartsWith("No files copied."), "nothing copied");
|
||||
}
|
||||
|
||||
private static string[] SplitCommandLine(string line)
|
||||
{
|
||||
// Enough for these lines: quoted parts, no embedded quotes.
|
||||
var list = new List<string>();
|
||||
var sb = new StringBuilder();
|
||||
bool q = false, any = false;
|
||||
foreach (char ch in line)
|
||||
{
|
||||
if (ch == '"') { q = !q; any = true; continue; }
|
||||
if (ch == ' ' && !q) { if (any) list.Add(sb.ToString()); sb.Clear(); any = false; continue; }
|
||||
sb.Append(ch); any = true;
|
||||
}
|
||||
if (any) list.Add(sb.ToString());
|
||||
return list.ToArray();
|
||||
}
|
||||
|
||||
private static void Arguments()
|
||||
{
|
||||
string folder = @"C:\Games\Rynth Suite\RynthAi";
|
||||
string report = @"C:\Users\A B\AppData\Local\Temp\is-X.tmp\rynthcore-vtank-import-scan.txt";
|
||||
foreach (bool copy in new[] { false, true })
|
||||
{
|
||||
string[] args = SplitCommandLine(BuildArguments(copy, folder, report));
|
||||
Check(TryParseArguments(args, out bool c, out string f, out string r) && c == copy && f == folder && r == report,
|
||||
$"round trip ({(copy ? "copy" : "scan")}): {string.Join(" | ", args)}");
|
||||
}
|
||||
string[][] bad =
|
||||
{
|
||||
new[] { "--vtank-import" },
|
||||
new[] { "--vtank-import", "scan" },
|
||||
new[] { "--vtank-import", "move", folder, "--report", report },
|
||||
new[] { "--vtank-import", "delete", folder, "--report", report },
|
||||
new[] { "--vtank-import", "scan", @"relative\RynthAi", "--report", report },
|
||||
new[] { "--vtank-import", "scan", "--report", report },
|
||||
new[] { "--vtank-import", "scan", folder },
|
||||
new[] { "--vtank-import", "scan", folder, "--report" },
|
||||
new[] { "--vtank-import", "scan", folder, "--report", @"C:\Windows\win.ini" },
|
||||
new[] { "--vtank-import", "scan", folder, "--report", @"C:\x\rynthcore-vtank-import.log" },
|
||||
new[] { "--vtank-import", "scan", folder, "--report", @"relative\rynthcore-vtank-import.txt" },
|
||||
new[] { "--decal-bridge-status" },
|
||||
};
|
||||
foreach (string[] b in bad)
|
||||
Check(!TryParseArguments(b, out _, out _, out _), "refused: " + string.Join(" ", b));
|
||||
}
|
||||
|
||||
private static Dictionary<string, string> ReadReport(string path, out List<string> logs, out bool bom)
|
||||
{
|
||||
byte[] bytes = File.ReadAllBytes(path);
|
||||
bom = bytes.Length >= 3 && bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF;
|
||||
var map = new Dictionary<string, string>();
|
||||
logs = new List<string>();
|
||||
foreach (string line in File.ReadAllLines(path))
|
||||
{
|
||||
int eq = line.IndexOf('=');
|
||||
if (eq <= 0) continue;
|
||||
string k = line[..eq], v = line[(eq + 1)..];
|
||||
if (k == "log") logs.Add(v); else map[k] = v;
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
private static string ReportPath(string tag) => Path.Combine(NewDir("tmp"), $"rynthcore-vtank-import-{tag}.txt");
|
||||
|
||||
private static void RunScan()
|
||||
{
|
||||
string vt = VTank("a.met", "b.met", "r.nav", "l.utl");
|
||||
string ai = RynthAi();
|
||||
Put(Path.Combine(ai, "MetaFiles"), "b.met");
|
||||
Put(Path.Combine(ai, "LootProfiles"), "l.utl", "a different loot profile");
|
||||
string report = ReportPath("scan");
|
||||
var before = Snapshot(ai);
|
||||
int code = Run(new[] { "--vtank-import", "scan", ai, "--report", report }, new[] { vt }, out string summary);
|
||||
Check(code == 0, $"exit 0, got {code} ({summary})");
|
||||
var m = ReadReport(report, out var logs, out bool bom);
|
||||
Check(bom, "UTF-8 BOM (paths with any characters)");
|
||||
Check(File.ReadAllLines(report)[0].StartsWith("report="), "the first line is the header nothing reads (BOM-safe)");
|
||||
Check(m.GetValueOrDefault("metas") == "2" && m.GetValueOrDefault("navs") == "1" && m.GetValueOrDefault("loot") == "1",
|
||||
"counts: " + string.Join(", ", m.Select(kv => kv.Key + "=" + kv.Value)));
|
||||
Check(m.GetValueOrDefault("new") == "2", "2 new (a.met, r.nav)");
|
||||
Check(m.GetValueOrDefault("same") == "1", "b.met is the same file: same=1");
|
||||
Check(m.GetValueOrDefault("conflicts") == "1", "l.utl differs: conflicts=1");
|
||||
Check(!m.ContainsKey("copied"), "a scan has no copy counts");
|
||||
Check(logs.Any(l => l.Contains(vt)), "the folder looked in is logged");
|
||||
Check(SameSnapshot(before, Snapshot(ai)), "nothing copied");
|
||||
}
|
||||
|
||||
private static void RunCopy()
|
||||
{
|
||||
string vt = VTank("a.met", "b.met", "r.nav", "l.utl");
|
||||
string ai = RynthAi();
|
||||
Put(Path.Combine(ai, "MetaFiles"), "b.met", "the player's own b.met");
|
||||
Put(Path.Combine(ai, "LootProfiles"), "l.utl");
|
||||
string report = ReportPath("copy");
|
||||
int code = Run(new[] { "--vtank-import", "copy", ai, "--report", report }, new[] { vt }, out string summary);
|
||||
Check(code == 0, $"exit 0, got {code} ({summary})");
|
||||
var m = ReadReport(report, out var logs, out _);
|
||||
Check(m.GetValueOrDefault("copied") == "2" && m.GetValueOrDefault("skipped") == "1" && m.GetValueOrDefault("already") == "1"
|
||||
&& m.GetValueOrDefault("failed") == "0",
|
||||
"copy counts: " + string.Join(", ", m.Select(kv => kv.Key + "=" + kv.Value)));
|
||||
Check(logs.Count(l => l.Contains("copied ")) == 2 && logs.Count(l => l.Contains("skipped ")) == 1
|
||||
&& logs.Count(l => l.Contains("already in RynthAi")) == 1, "a line per file");
|
||||
Check(File.Exists(Path.Combine(ai, "NavProfiles", "r.nav")) && File.Exists(Path.Combine(ai, "MetaFiles", "a.met")), "files there");
|
||||
Check(File.ReadAllText(Path.Combine(ai, "MetaFiles", "b.met")) == "the player's own b.met", "the command never replaces");
|
||||
Check(!Directory.EnumerateFiles(ai, "*(VTank*", SearchOption.AllDirectories).Any(), "the command never keeps both");
|
||||
Check(summary.Contains("2 copied"), "summary for launcher.log: " + summary);
|
||||
}
|
||||
|
||||
private static void RunRefuses()
|
||||
{
|
||||
string vt = VTank("a.met");
|
||||
string ai = RynthAi();
|
||||
string report = ReportPath("exists");
|
||||
File.WriteAllText(report, "someone else's");
|
||||
int code = Run(new[] { "--vtank-import", "copy", ai, "--report", report }, new[] { vt }, out _);
|
||||
Check(code == 2, $"existing report: exit 2, got {code}");
|
||||
Check(File.ReadAllText(report) == "someone else's", "the existing file is not overwritten");
|
||||
Check(!File.Exists(Path.Combine(ai, "MetaFiles", "a.met")), "and nothing copied");
|
||||
|
||||
string missing = Path.Combine(_temp, "no RynthAi here");
|
||||
code = Run(new[] { "--vtank-import", "copy", missing, "--report", ReportPath("missing") }, new[] { vt }, out _);
|
||||
Check(code == 2 && !Directory.Exists(missing), $"missing RynthAi folder: exit 2 and not created, got {code}");
|
||||
|
||||
code = Run(new[] { "--vtank-import", "copy" }, new[] { vt }, out _);
|
||||
Check(code == 2, $"malformed: exit 2, got {code}");
|
||||
}
|
||||
|
||||
private static void RunNothingFound()
|
||||
{
|
||||
string ai = RynthAi();
|
||||
string report = ReportPath("none");
|
||||
int code = Run(new[] { "--vtank-import", "scan", ai, "--report", report }, new[] { Path.Combine(_temp, "nope") }, out _);
|
||||
var m = ReadReport(report, out var logs, out _);
|
||||
Check(code == 0 && m.GetValueOrDefault("metas") == "0" && m.GetValueOrDefault("navs") == "0"
|
||||
&& m.GetValueOrDefault("loot") == "0" && m.GetValueOrDefault("new") == "0", "all zero");
|
||||
Check(logs.Any(l => l.Contains("no VirindiTank folder")), "says no folder was found");
|
||||
}
|
||||
}
|
||||
26
tools/VTankFileImportTests/VTankFileImportTests.csproj
Normal file
26
tools/VTankFileImportTests/VTankFileImportTests.csproj
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<!--
|
||||
Offline tests for the VirindiTank file copy (src/RynthCore.App/VTankFileImport.cs, compiled in;
|
||||
installer\RynthCore.iss OfferVTankImport and the launcher's Import VirindiTank files button): which folders are looked in (Decal's VTank
|
||||
entry, the usual locations), top level only with exact extensions (.met .af .nav .utl, no VTank state files), counts,
|
||||
identical files, conflicts and keep both, never overwriting,
|
||||
never changing the VTank folder, read-only copies made writable, the command line and report.
|
||||
Writes only under %TEMP%\VTankFileImportTests-*. The registry is never written; the real VTank
|
||||
folders are never read (every test passes its own folders).
|
||||
Run: dotnet run -c Release (exit 0 = pass, 1 = fail)
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<InvariantGlobalization>true</InvariantGlobalization>
|
||||
<RootNamespace>VTankFileImportTests</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="../../src/RynthCore.App/VTankFileImport.cs" Link="App/VTankFileImport.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"version": 1,
|
||||
"generated": "2026-10-15T00:53:47Z",
|
||||
"generated": "2026-11-19T12:11:31Z",
|
||||
"source": "world database",
|
||||
"counts": {"Bindstone": 25, "Dungeon": 559, "Landmark": 6, "Lifestone": 255, "NPC": 4711, "Portal": 4058, "Town": 50, "Vendor": 1042},
|
||||
"locations": [
|
||||
|
|
@ -659,7 +659,7 @@
|
|||
{"name":"Eastham Portal","type":"Portal","wcid":42815,"cell":"00070161","place":"dungeon","dest":{"cell":"CE940035","place":"outdoor","ns":16.92,"ew":63.48},"desc":"This portal goes to Eastham, a coastal Aluvian town that contains a portal to Asheron's island home. This is a good town for characters over level 20. In Town Network.","id":653},
|
||||
{"name":"Portal to Rithwic","type":"Portal","wcid":42817,"cell":"00070162","place":"dungeon","dest":{"cell":"C98C0028","place":"outdoor","ns":10.84,"ew":59.32},"desc":"This portal goes to Rithwic, an Aluvian town on the shores of Lake Blessed. This is a good town for characters over level 10. In Town Network.","id":654},
|
||||
{"name":"Portal to Arwic","type":"Portal","wcid":42819,"cell":"00070163","place":"dungeon","dest":{"cell":"C6A90009","place":"outdoor","ns":33.27,"ew":56.65},"desc":"This portal goes to Arwic, a walled Aluvian town that has fully recovered from a devastating attack by a Shadow Spire. This is a good town for characters over level 20. In Town Network.","id":655},
|
||||
{"name":"The Marketplace of Dereth","type":"Portal","wcid":23032,"cell":"00070165","place":"dungeon","dest":{"cell":"016C01BC","place":"dungeon"},"desc":"In Town Network.","id":656},
|
||||
{"name":"The Marketplace of Dereth","type":"Portal","wcid":23032,"cell":"00070165","place":"dungeon","dest":{"cell":"016C01BC","place":"dungeon"},"rules":["noOlthoi"],"desc":"In Town Network.","id":656},
|
||||
{"name":"Portal to Sanamar","type":"Portal","wcid":42835,"cell":"00070166","place":"dungeon","dest":{"cell":"33D90015","place":"outdoor","ns":72.07,"ew":-60.9},"desc":"This portal goes to Sanamar, the capital of New Viamont and town where many new adventurers enter Dereth. This is a good town for characters of all levels. In Town Network.","id":657},
|
||||
{"name":"Portal to Redspire","type":"Portal","wcid":42836,"cell":"00070167","place":"dungeon","dest":{"cell":"17B2002A","place":"outdoor","ns":40.56,"ew":-83.0},"desc":"This portal goes to the town of Redspire on the island of Marae Lassel. This is a good town for characters over level 10. In Town Network.","id":658},
|
||||
{"name":"Portal to Westwatch","type":"Portal","wcid":42837,"cell":"00070168","place":"dungeon","dest":{"cell":"23DA002C","place":"outdoor","ns":72.81,"ew":-73.36},"desc":"This portal is tied to the Viamontian outpost of Westwatch. This outpost is a good place for characters above level 20. In Town Network.","id":659},
|
||||
|
|
@ -1516,7 +1516,7 @@
|
|||
{"name":"Destroyed Portal to Samsur","type":"Portal","wcid":1026,"cell":"01AC0104","place":"dungeon","dest":{"cell":"977B000C","place":"outdoor","ns":-3.24,"ew":18.96},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans. In Adventurer's Haven.","id":1510},
|
||||
{"name":"Destroyed Portal to Yanshi","type":"Portal","wcid":1029,"cell":"01AC0108","place":"dungeon","dest":{"cell":"B9720021","place":"outdoor","ns":-10.74,"ew":46.55},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans. In Adventurer's Haven.","id":1511},
|
||||
{"name":"Surface","type":"Portal","wcid":2081,"cell":"01AC0112","place":"dungeon","dest":{"cell":"AB840038","place":"outdoor","ns":4.4,"ew":35.55},"desc":"In Adventurer's Haven.","id":1512},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"01AC0104","place":"dungeon","dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth. In Adventurer's Haven.","id":1513},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"01AC0104","place":"dungeon","dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth. In Adventurer's Haven.","id":1513},
|
||||
{"name":"Surface","type":"Portal","wcid":2077,"cell":"01AD0117","place":"dungeon","dest":{"cell":"C68C001F","place":"outdoor","ns":10.67,"ew":56.84},"desc":"In Dungeon Gallery Tower.","id":1514},
|
||||
{"name":"Surface Portal","type":"Portal","wcid":1548,"cell":"01AE0117","place":"dungeon","dest":{"cell":"AFC6015C","place":"building","ns":56.69,"ew":38.48},"desc":"In Colier Mine.","id":1515},
|
||||
{"name":"Colier Mine Portal","type":"Portal","wcid":1543,"cell":"01AE019B","place":"dungeon","dest":{"cell":"01AE020A","place":"dungeon","name":"Colier Mine"},"desc":"In Colier Mine.","id":1516},
|
||||
|
|
@ -1950,9 +1950,9 @@
|
|||
{"name":"Surface Portal","type":"Portal","wcid":7950,"cell":"02E0046A","place":"dungeon","dest":{"cell":"4E320007","place":"outdoor","ns":-61.27,"ew":-39.54},"desc":"In Shendolain Vestibule.","id":1944},
|
||||
{"name":"The Floating City","type":"Portal","wcid":7935,"cell":"02E10295","place":"dungeon","dest":{"cell":"02CD014F","place":"dungeon"},"desc":"In a dungeon (landblock 02E1).","id":1945},
|
||||
{"name":"Surface Portal","type":"Portal","wcid":7892,"cell":"02E201A3","place":"dungeon","dest":{"cell":"84690011","place":"outdoor","ns":-17.93,"ew":3.86},"desc":"In Arena.","id":1946},
|
||||
{"name":"Judging Station","type":"Portal","wcid":7893,"cell":"02E201A6","place":"dungeon","dest":{"cell":"02E3015A","place":"dungeon","name":"Arena"},"desc":"In Arena.","id":1947},
|
||||
{"name":"Judging Station","type":"Portal","wcid":7893,"cell":"02E201A6","place":"dungeon","dest":{"cell":"02E3015A","place":"dungeon","name":"Arena"},"rules":["noNPK"],"desc":"In Arena.","id":1947},
|
||||
{"name":"Surface Portal","type":"Portal","wcid":7892,"cell":"02E301A3","place":"dungeon","dest":{"cell":"84690011","place":"outdoor","ns":-17.93,"ew":3.86},"desc":"In Arena.","id":1948},
|
||||
{"name":"Judging Station","type":"Portal","wcid":7893,"cell":"02E301A6","place":"dungeon","dest":{"cell":"02E3015A","place":"dungeon","name":"Arena"},"desc":"In Arena.","id":1949},
|
||||
{"name":"Judging Station","type":"Portal","wcid":7893,"cell":"02E301A6","place":"dungeon","dest":{"cell":"02E3015A","place":"dungeon","name":"Arena"},"rules":["noNPK"],"desc":"In Arena.","id":1949},
|
||||
{"name":"Surface","type":"Portal","wcid":29097,"cell":"02E40197","place":"dungeon","dest":{"cell":"35DB001C","place":"outdoor","ns":73.64,"ew":-59.21},"desc":"In a dungeon (landblock 02E4).","id":1950},
|
||||
{"name":"Surface","type":"Portal","wcid":29097,"cell":"02E40146","place":"dungeon","dest":{"cell":"35DB001C","place":"outdoor","ns":73.64,"ew":-59.21},"desc":"In a dungeon (landblock 02E4).","id":1951},
|
||||
{"name":"Surface","type":"Portal","wcid":29097,"cell":"02E40116","place":"dungeon","dest":{"cell":"35DB001C","place":"outdoor","ns":73.64,"ew":-59.21},"desc":"In a dungeon (landblock 02E4).","id":1952},
|
||||
|
|
@ -2072,7 +2072,7 @@
|
|||
{"name":"Venemous Nidus","type":"Portal","wcid":14888,"cell":"0C6F0000","place":"outdoor","ns":-13.14,"ew":-91.78,"dest":{"cell":"536E027C","place":"dungeon","name":"Venemous Nidus"},"minLevel":40,"id":2066},
|
||||
{"name":"Caul Asylum","type":"Portal","wcid":22927,"cell":"0D080000","place":"outdoor","ns":-94.8,"ew":-91.03,"dest":{"cell":"6045026F","place":"dungeon","name":"Caul Asylum"},"minLevel":90,"id":2067},
|
||||
{"name":"Gatekeepers","type":"Portal","wcid":32125,"cell":"0E340001","place":"outdoor","ns":-60.3,"ew":-90.69,"dest":{"cell":"79110040","place":"outdoor","ns":-87.62,"ew":-4.42},"minLevel":130,"quest":true,"desc":"You must obtain the blessing of the Gatekeepers before using this portal.","id":2068},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"0EBA0023","place":"outdoor","ns":47.07,"ew":-90.26,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2069},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"0EBA0023","place":"outdoor","ns":47.07,"ew":-90.26,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2069},
|
||||
{"name":"Stinging Corner","type":"Portal","wcid":52223,"cell":"0F080013","place":"outdoor","ns":-95.3,"ew":-89.73,"dest":{"cell":"586503B9","place":"dungeon","name":"Stinging Corner"},"minLevel":180,"id":2070},
|
||||
{"name":"Blighted Grimy Moarsman Tunnels","type":"Portal","wcid":38152,"cell":"0F330013","place":"outdoor","ns":-60.9,"ew":-89.66,"dest":{"cell":"00C5037C","place":"dungeon","name":"Blighted Grimy Moarsman Tunnels"},"minLevel":95,"id":2071},
|
||||
{"name":"Blightfinger's Warrens","type":"Portal","wcid":87478,"cell":"0F380150","place":"underground","ns":-56.7,"ew":-88.71,"dest":{"cell":"00D90289","place":"dungeon"},"minLevel":70,"id":2072},
|
||||
|
|
@ -2090,7 +2090,7 @@
|
|||
{"name":"Shade Iron Mine","type":"Portal","wcid":32685,"cell":"112E0101","place":"building","ns":-65.06,"ew":-87.6,"dest":{"cell":"005303B0","place":"dungeon","name":"Shade Iron Mine"},"minLevel":80,"quest":true,"id":2084},
|
||||
{"name":"Destroyed Uziz Portal","type":"Portal","wcid":4036,"cell":"11330000","place":"outdoor","ns":-60.57,"ew":-88.09,"dest":{"cell":"A260003C","place":"outdoor","ns":-24.78,"ew":28.41},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":2085},
|
||||
{"name":"Colossus Foundry Portal","type":"Portal","wcid":19715,"cell":"11340149","place":"building","ns":-59.99,"ew":-87.92,"dest":{"cell":"545701C5","place":"dungeon","name":"Colossus Foundry"},"id":2086},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"11340026","place":"outdoor","ns":-59.79,"ew":-87.91,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2087},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"11340026","place":"outdoor","ns":-59.79,"ew":-87.91,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2087},
|
||||
{"name":"Ancient Temple","type":"Portal","wcid":25396,"cell":"11560100","place":"building","ns":-32.91,"ew":-88.19,"dest":{"cell":"594D03E2","place":"dungeon","name":"Ancient Temple"},"minLevel":80,"id":2088},
|
||||
{"name":"Whispering Blade Chapterhouse","type":"Portal","wcid":32993,"cell":"1234001D","place":"outdoor","ns":-59.92,"ew":-87.22,"dest":{"cell":"00810128","place":"dungeon","name":"Whispering Blade Chapterhouse"},"quest":true,"id":2089},
|
||||
{"name":"Ancient Caves","type":"Portal","wcid":33985,"cell":"12450100","place":"dungeon","dest":{"cell":"00D10E92","place":"dungeon"},"minLevel":40,"desc":"In a dungeon (landblock 1245).","id":2090},
|
||||
|
|
@ -2125,12 +2125,12 @@
|
|||
{"name":"Exit Portal","type":"Portal","wcid":9070,"cell":"177B0000","place":"outdoor","ns":-2.84,"ew":-82.84,"dest":{"cell":"1579003F","place":"outdoor","ns":-4.5,"ew":-84.4},"id":2119},
|
||||
{"name":"Exit Portal","type":"Portal","wcid":9069,"cell":"177B0000","place":"outdoor","ns":-2.84,"ew":-82.76,"dest":{"cell":"1979003F","place":"outdoor","ns":-4.5,"ew":-81.2},"id":2120},
|
||||
{"name":"Destroyed Portal to Sanamar","type":"Portal","wcid":28709,"cell":"17B20024","place":"outdoor","ns":40.81,"ew":-83.07,"dest":{"cell":"33D90015","place":"outdoor","ns":72.07,"ew":-60.9},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":2121},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"17B2001B","place":"outdoor","ns":40.69,"ew":-83.23,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2122},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"17B2001B","place":"outdoor","ns":40.69,"ew":-83.23,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2122},
|
||||
{"name":"Camp Entemarre","type":"Portal","wcid":70752,"cell":"1830000E","place":"outdoor","ns":-62.96,"ew":-82.57,"dest":{"cell":"004901B0","place":"dungeon","name":"Camp Entemarre"},"minLevel":80,"quest":true,"desc":"You must speak to Hashina in Silyun before you may use this portal.","id":2123},
|
||||
{"name":"Destroyed Portal to Greenspire","type":"Portal","wcid":11954,"cell":"18B20000","place":"outdoor","ns":40.58,"ew":-82.41,"dest":{"cell":"2BB5003C","place":"outdoor","ns":43.21,"ew":-66.8},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":2124},
|
||||
{"name":"Tumerok Cave","type":"Portal","wcid":11323,"cell":"18B30000","place":"outdoor","ns":41.67,"ew":-82.48,"dest":{"cell":"028602BF","place":"dungeon","name":"Tumerok Cave"},"id":2125},
|
||||
{"name":"Abandoned Tumerok Site","type":"Portal","wcid":10853,"cell":"18B30000","place":"outdoor","ns":41.98,"ew":-82.17,"dest":{"cell":"02840211","place":"dungeon","name":"Abandoned Tumerok Site"},"id":2126},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43567,"cell":"18B40102","place":"dungeon","dest":{"cell":"E4D00018","place":"outdoor","ns":65.16,"ew":80.73},"desc":"In a dungeon (landblock 18B4).","id":2127},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43567,"cell":"18B40102","place":"dungeon","dest":{"cell":"E4D00018","place":"outdoor","ns":65.16,"ew":80.73},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"desc":"In a dungeon (landblock 18B4).","id":2127},
|
||||
{"name":"Secret Putiputi Place","type":"Portal","wcid":10925,"cell":"18B90000","place":"outdoor","ns":46.25,"ew":-82.05,"dest":{"cell":"57740112","place":"dungeon","name":"Secret Putiputi Place"},"quest":true,"id":2128},
|
||||
{"name":"Archive","type":"Portal","wcid":35563,"cell":"19360140","place":"underground","ns":-58.42,"ew":-81.3,"dest":{"cell":"193604BC","place":"building","ns":-58.79,"ew":-81.34},"minLevel":120,"id":2129},
|
||||
{"name":"Surface","type":"Portal","wcid":35564,"cell":"19360163","place":"underground","ns":-58.96,"ew":-81.19,"dest":{"cell":"19360019","place":"outdoor","ns":-58.73,"ew":-81.59},"id":2130},
|
||||
|
|
@ -2151,7 +2151,7 @@
|
|||
{"name":"Wasteland Hive Portal","type":"Portal","wcid":11231,"cell":"1CBE0000","place":"outdoor","ns":50.8,"ew":-79.1,"dest":{"cell":"028503E6","place":"dungeon","name":"Wasteland Hive"},"minLevel":70,"id":2145},
|
||||
{"name":"Vile Sanctuary","type":"Portal","wcid":30693,"cell":"1D130115","place":"underground","ns":-86.73,"ew":-78.15,"dest":{"cell":"001701CA","place":"dungeon"},"minLevel":100,"id":2146},
|
||||
{"name":"Master Vaserio's Dig","type":"Portal","wcid":32239,"cell":"1D3B000E","place":"outdoor","ns":-54.2,"ew":-78.57,"dest":{"cell":"0043031D","place":"dungeon","name":"Master Vaserio's Dig"},"minLevel":100,"desc":"This dungeon is quest-restricted. Speak with Qath al-Haddash in Qalaba'r to learn more.","id":2147},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"1DB6003C","place":"outdoor","ns":44.04,"ew":-77.99,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2148},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"1DB6003C","place":"outdoor","ns":44.04,"ew":-77.99,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2148},
|
||||
{"name":"Mutilator Tunnels","type":"Portal","wcid":27583,"cell":"1DC10000","place":"outdoor","ns":52.84,"ew":-78.12,"dest":{"cell":"667A0240","place":"dungeon","name":"Mutilator Tunnels"},"minLevel":80,"id":2149},
|
||||
{"name":"Marescent Plateau Portal","type":"Portal","wcid":11958,"cell":"1EB30102","place":"dungeon","dest":{"cell":"1EB4001A","place":"outdoor","ns":42.18,"ew":-77.62},"minLevel":35,"desc":"In a dungeon (landblock 1EB3).","id":2150},
|
||||
{"name":"Base of the Cliffs Portal","type":"Portal","wcid":11957,"cell":"1EB40000","place":"outdoor","ns":42.27,"ew":-77.87,"dest":{"cell":"1EB30010","place":"outdoor","ns":42.04,"ew":-77.81},"minLevel":35,"id":2151},
|
||||
|
|
@ -2171,7 +2171,7 @@
|
|||
{"name":"Mysterious Portal","type":"Portal","wcid":43201,"cell":"21760110","place":"underground","ns":-6.89,"ew":-75.42,"dest":{"cell":"8B03018F","place":"dungeon"},"minLevel":150,"quest":true,"desc":"A portal crackling with defensive magics. Only those properly protected from its fluxuations may enter.","id":2165},
|
||||
{"name":"Destroyed Portal to Holtburg","type":"Portal","wcid":1020,"cell":"21AF0000","place":"outdoor","ns":38.26,"ew":-75.51,"dest":{"cell":"A9B40019","place":"outdoor","ns":42.08,"ew":33.6},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":2166},
|
||||
{"name":"Viamontian Laboratory","type":"Portal","wcid":32710,"cell":"21B0013B","place":"building","ns":39.41,"ew":-75.33,"dest":{"cell":"00680186","place":"dungeon","name":"Viamontian Laboratory"},"minLevel":30,"id":2167},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"21B0000D","place":"outdoor","ns":39.34,"ew":-75.41,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2168},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"21B0000D","place":"outdoor","ns":39.34,"ew":-75.41,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2168},
|
||||
{"name":"Karab Delta Portal","type":"Portal","wcid":11955,"cell":"21C50000","place":"outdoor","ns":55.93,"ew":-75.02,"dest":{"cell":"1EAF0011","place":"outdoor","ns":38.11,"ew":-77.72},"id":2169},
|
||||
{"name":"Waterfall Cave","type":"Portal","wcid":28796,"cell":"21E8000C","place":"outdoor","ns":84.0,"ew":-75.41,"dest":{"cell":"02D50237","place":"dungeon","name":"Waterfall Cave"},"id":2170},
|
||||
{"name":"Empyrean Acid Propylaeum","type":"Portal","wcid":14492,"cell":"22570000","place":"outdoor","ns":-31.63,"ew":-74.21,"dest":{"cell":"526E014B","place":"dungeon","name":"Empyrean Acid Propylaeum"},"minLevel":50,"id":2171},
|
||||
|
|
@ -2188,7 +2188,7 @@
|
|||
{"name":"Chiming Portal","type":"Portal","wcid":51253,"cell":"23B70026","place":"outdoor","ns":44.96,"ew":-73.51,"dest":{"cell":"5868016E","place":"dungeon","name":"Chiming"},"minLevel":180,"id":2182},
|
||||
{"name":"Hive Eviscerator Burrow","type":"Portal","wcid":51321,"cell":"23BC001A","place":"outdoor","ns":48.59,"ew":-73.56,"dest":{"cell":"586D03E2","place":"dungeon","name":"Hive Eviscerator Burrow"},"minLevel":200,"id":2183},
|
||||
{"name":"Destroyed Portal to Sanamar","type":"Portal","wcid":28709,"cell":"23DA003D","place":"outdoor","ns":72.86,"ew":-73.23,"dest":{"cell":"33D90015","place":"outdoor","ns":72.07,"ew":-60.9},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":2184},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"23DA0034","place":"outdoor","ns":72.78,"ew":-73.33,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2185},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"23DA0034","place":"outdoor","ns":72.78,"ew":-73.33,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2185},
|
||||
{"name":"Viamontian Garrison","type":"Portal","wcid":28795,"cell":"23DD000D","place":"outdoor","ns":75.3,"ew":-73.8,"dest":{"cell":"00020224","place":"dungeon","name":"Viamontian Garrison"},"id":2186},
|
||||
{"name":"Amperehelion Vault Portal","type":"Portal","wcid":6389,"cell":"24380000","place":"outdoor","ns":-56.49,"ew":-72.78,"dest":{"cell":"01190371","place":"dungeon","name":"Amperehelion Vault"},"id":2187},
|
||||
{"name":"Portal to Lighthouse","type":"Portal","wcid":2356,"cell":"24840000","place":"outdoor","ns":3.89,"ew":-72.48,"dest":{"cell":"23840014","place":"outdoor","ns":3.99,"ew":-73.69},"minLevel":18,"id":2188},
|
||||
|
|
@ -2204,7 +2204,7 @@
|
|||
{"name":"Empyrean Facility Upper Level","type":"Portal","wcid":42711,"cell":"2545002E","place":"outdoor","ns":-46.21,"ew":-71.81,"dest":{"cell":"890402C4","place":"dungeon","name":"Empyrean Facility Upper Level"},"minLevel":75,"id":2198},
|
||||
{"name":"Beachside","type":"Portal","wcid":1899,"cell":"25730105","place":"building","ns":-9.41,"ew":-71.86,"dest":{"cell":"CE9C0038","place":"outdoor","ns":23.56,"ew":63.52},"id":2199},
|
||||
{"name":"Colossus Foundry Portal","type":"Portal","wcid":19715,"cell":"2581016A","place":"building","ns":1.6,"ew":-72.05,"dest":{"cell":"545701C5","place":"dungeon","name":"Colossus Foundry"},"id":2200},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"2581002C","place":"outdoor","ns":1.55,"ew":-71.77,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2201},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"2581002C","place":"outdoor","ns":1.55,"ew":-71.77,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2201},
|
||||
{"name":"Mountain Citadel Portal","type":"Portal","wcid":25281,"cell":"25860000","place":"outdoor","ns":5.36,"ew":-71.83,"dest":{"cell":"61470152","place":"dungeon","name":"Mountain Citadel"},"id":2202},
|
||||
{"name":"Thrungal Den","type":"Portal","wcid":73054,"cell":"25E2003E","place":"outdoor","ns":79.36,"ew":-71.63,"dest":{"cell":"006502BA","place":"dungeon","name":"Thrungal Den"},"minLevel":100,"quest":true,"id":2203},
|
||||
{"name":"Aerbax's Holding","type":"Portal","wcid":25392,"cell":"26310000","place":"outdoor","ns":-62.4,"ew":-71.1,"dest":{"cell":"594B012B","place":"dungeon","name":"Aerbax's Holding"},"minLevel":60,"id":2204},
|
||||
|
|
@ -2213,7 +2213,7 @@
|
|||
{"name":"Remote Empyrean Vault","type":"Portal","wcid":28782,"cell":"26E5001C","place":"outdoor","ns":81.65,"ew":-71.19,"dest":{"cell":"000102C6","place":"dungeon","name":"Remote Empyrean Vault"},"minLevel":40,"id":2207},
|
||||
{"name":"Destroyed Glenden Wood Portal","type":"Portal","wcid":1017,"cell":"27180000","place":"outdoor","ns":-82.6,"ew":-70.18,"dest":{"cell":"A0A40025","place":"outdoor","ns":29.75,"ew":26.45},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":2208},
|
||||
{"name":"Silyun Chapterhouse","type":"Portal","wcid":32695,"cell":"27EA001A","place":"outdoor","ns":85.38,"ew":-70.4,"dest":{"cell":"005201C9","place":"dungeon","name":"Silyun Chapterhouse"},"minLevel":80,"quest":true,"desc":"This dungeon is quest restricted. Go see Garmasi in the Royal Hall of Sanamar for more information.","id":2209},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"27EC000C","place":"outdoor","ns":87.25,"ew":-70.6,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2210},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"27EC000C","place":"outdoor","ns":87.25,"ew":-70.6,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2210},
|
||||
{"name":"Hidden City","type":"Portal","wcid":28786,"cell":"27F5003C","place":"outdoor","ns":94.4,"ew":-70.0,"dest":{"cell":"02D602CE","place":"dungeon","name":"Hidden City"},"minLevel":50,"id":2211},
|
||||
{"name":"Sotiris Portal","type":"Portal","wcid":8381,"cell":"282A0000","place":"outdoor","ns":-67.98,"ew":-69.24,"dest":{"cell":"02C90280","place":"dungeon","name":"Sotiris"},"minLevel":30,"id":2212},
|
||||
{"name":"Surface","type":"Portal","wcid":40504,"cell":"28420164","place":"dungeon","dest":{"cell":"2942001C","place":"outdoor","ns":-48.83,"ew":-68.79},"desc":"In Apostate Citadel Mines.","id":2213},
|
||||
|
|
@ -2242,7 +2242,7 @@
|
|||
{"name":"Exit Karlun's Fort","type":"Portal","wcid":29501,"cell":"2AEE002D","place":"outdoor","ns":88.88,"ew":-67.78,"dest":{"cell":"2AEE0030","place":"outdoor","ns":89.2,"ew":-67.8},"id":2236},
|
||||
{"name":"Hall of Karlun","type":"Portal","wcid":29502,"cell":"2AEE002D","place":"outdoor","ns":88.91,"ew":-67.81,"dest":{"cell":"0021013E","place":"dungeon","name":"Hall of Karlun"},"minLevel":40,"quest":true,"id":2237},
|
||||
{"name":"South Direlands Portal","type":"Portal","wcid":1107,"cell":"2B100101","place":"underground","ns":-88.48,"ew":-66.8,"dest":{"cell":"5416001A","place":"outdoor","ns":-84.2,"ew":-34.44},"minLevel":12,"id":2238},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"2B110027","place":"outdoor","ns":-87.68,"ew":-67.07,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2239},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"2B110027","place":"outdoor","ns":-87.68,"ew":-67.07,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2239},
|
||||
{"name":"Tree Portal","type":"Portal","wcid":24580,"cell":"2B120000","place":"outdoor","ns":-87.51,"ew":-67.19,"dest":{"cell":"2B120019","place":"outdoor","ns":-87.52,"ew":-67.18},"quest":true,"id":2240},
|
||||
{"name":"Ground Portal","type":"Portal","wcid":24875,"cell":"2B120000","place":"outdoor","ns":-87.54,"ew":-67.16,"dest":{"cell":"2B110028","place":"outdoor","ns":-87.61,"ew":-67.09},"id":2241},
|
||||
{"name":"Bandit Castle","type":"Portal","wcid":31341,"cell":"2B200024","place":"outdoor","ns":-75.99,"ew":-67.1,"dest":{"cell":"BDD00006","place":"outdoor","ns":64.95,"ew":49.32},"id":2242},
|
||||
|
|
@ -2255,7 +2255,7 @@
|
|||
{"name":"Rynthid Genesis","type":"Portal","wcid":51615,"cell":"2C300008","place":"outdoor","ns":-62.79,"ew":-66.73,"dest":{"cell":"58750294","place":"dungeon","name":"Rynthid Genesis"},"minLevel":180,"id":2249},
|
||||
{"name":"Spirited Halls","type":"Portal","wcid":51763,"cell":"2C300004","place":"outdoor","ns":-63.17,"ew":-66.69,"dest":{"cell":"5878030A","place":"dungeon","name":"Spirited Halls"},"minLevel":180,"id":2250},
|
||||
{"name":"Bah'Ktar's Tower","type":"Portal","wcid":51944,"cell":"2C310001","place":"outdoor","ns":-62.68,"ew":-66.67,"dest":{"cell":"59520258","place":"dungeon","name":"Bah'Ktar's Tower"},"minLevel":180,"id":2251},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"2CB50003","place":"outdoor","ns":43.11,"ew":-66.66,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2252},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"2CB50003","place":"outdoor","ns":43.11,"ew":-66.66,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2252},
|
||||
{"name":"Marauder's Lair","type":"Portal","wcid":29361,"cell":"2CE80100","place":"dungeon","dest":{"cell":"0197035D","place":"dungeon"},"desc":"In a dungeon (landblock 2CE8).","id":2253},
|
||||
{"name":"Frozen Cenotaph","type":"Portal","wcid":31432,"cell":"2CF00100","place":"dungeon","dest":{"cell":"003701CC","place":"dungeon"},"minLevel":40,"quest":true,"desc":"This dungeon is quest restricted. Royal scholars in Cragstone or Sanamar might be interested in the secrets it holds. In a dungeon (landblock 2CF0).","id":2254},
|
||||
{"name":"Seed of Misery","type":"Portal","wcid":51569,"cell":"2D30002D","place":"outdoor","ns":-63.13,"ew":-65.44,"dest":{"cell":"58720120","place":"dungeon","name":"Seed of Misery"},"minLevel":180,"id":2255},
|
||||
|
|
@ -2273,7 +2273,7 @@
|
|||
{"name":"Steaming Hovel","type":"Portal","wcid":29099,"cell":"2DDA0100","place":"building","ns":73.14,"ew":-65.6,"dest":{"cell":"039B0177","place":"dungeon","name":"Steaming Hovel"},"maxLevel":20,"desc":"This hovel is home to the thieving Thrungum. Any stolen items found herein should be returned to a Portal Guardian.","id":2267},
|
||||
{"name":"Direlands Desert Edge Portal","type":"Portal","wcid":3612,"cell":"2E0E0101","place":"dungeon","dest":{"cell":"231D0029","place":"outdoor","ns":-78.67,"ew":-73.43},"minLevel":23,"desc":"In a dungeon (landblock 2E0E).","id":2268},
|
||||
{"name":"Destroyed Portal to Hebian-To","type":"Portal","wcid":1018,"cell":"2E110000","place":"outdoor","ns":-88.18,"ew":-64.6,"dest":{"cell":"E64E002F","place":"outdoor","ns":-38.88,"ew":82.63},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":2269},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43559,"cell":"2E110107","place":"building","ns":-87.66,"ew":-65.1,"dest":{"cell":"E3D50001","place":"outdoor","ns":68.5,"ew":79.69},"id":2270},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43559,"cell":"2E110107","place":"building","ns":-87.66,"ew":-65.1,"dest":{"cell":"E3D50001","place":"outdoor","ns":68.5,"ew":79.69},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"id":2270},
|
||||
{"name":"Twisted Refuge","type":"Portal","wcid":45725,"cell":"2E300020","place":"outdoor","ns":-62.77,"ew":-64.8,"dest":{"cell":"576F01B1","place":"dungeon","name":"Twisted Refuge"},"minLevel":150,"quest":true,"id":2271},
|
||||
{"name":"Singular Obsidian Repository","type":"Portal","wcid":12294,"cell":"2E390000","place":"outdoor","ns":-55.93,"ew":-64.79,"dest":{"cell":"039F02F1","place":"dungeon","name":"Singular Obsidian Repository"},"minLevel":45,"id":2272},
|
||||
{"name":"South Gate","type":"Portal","wcid":37051,"cell":"2F2E002A","place":"outdoor","ns":-65.01,"ew":-63.81,"dest":{"cell":"00C00242","place":"dungeon","name":"South Gate"},"id":2273},
|
||||
|
|
@ -2295,7 +2295,7 @@
|
|||
{"name":"Destroyed Portal to Redspire","type":"Portal","wcid":11960,"cell":"32D70001","place":"outdoor","ns":70.08,"ew":-61.88,"dest":{"cell":"17B2002A","place":"outdoor","ns":40.56,"ew":-83.0},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":2289},
|
||||
{"name":"Destroyed Portal to Eastwatch","type":"Portal","wcid":30383,"cell":"32D80034","place":"outdoor","ns":71.24,"ew":-61.33,"dest":{"cell":"49F00013","place":"outdoor","ns":90.34,"ew":-43.26},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":2290},
|
||||
{"name":"Destroyed Portal to Westwatch","type":"Portal","wcid":30384,"cell":"32D80034","place":"outdoor","ns":71.22,"ew":-61.34,"dest":{"cell":"23DA002C","place":"outdoor","ns":72.83,"ew":-73.37},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":2291},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"32D90034","place":"outdoor","ns":72.0,"ew":-61.3,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2292},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"32D90034","place":"outdoor","ns":72.0,"ew":-61.3,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2292},
|
||||
{"name":"Sultry Hovel","type":"Portal","wcid":29095,"cell":"32DB0100","place":"building","ns":74.02,"ew":-61.53,"dest":{"cell":"0114018C","place":"dungeon","name":"Sultry Hovel"},"maxLevel":20,"desc":"This hovel is home to the thieving Thrungum. Any stolen items found herein should be returned to a Portal Guardian.","id":2293},
|
||||
{"name":"Cataracts of Sabella","type":"Portal","wcid":30380,"cell":"32DE0033","place":"outdoor","ns":75.9,"ew":-61.34,"dest":{"cell":"22E60029","place":"outdoor","ns":82.1,"ew":-74.2},"id":2294},
|
||||
{"name":"Tumideon Fortress Portal","type":"Portal","wcid":8392,"cell":"33390000","place":"outdoor","ns":-55.88,"ew":-60.72,"dest":{"cell":"02C70198","place":"dungeon","name":"Tumideon Fortress"},"minLevel":30,"id":2295},
|
||||
|
|
@ -2327,7 +2327,7 @@
|
|||
{"name":"Forgotten Tunnels","type":"Portal","wcid":43119,"cell":"380B0106","place":"dungeon","dest":{"cell":"8B020282","place":"dungeon","name":"Forgotten Tunnels"},"minLevel":180,"desc":"In a dungeon (landblock 380B).","id":2321},
|
||||
{"name":"Mountain Halls","type":"Portal","wcid":3640,"cell":"388C0102","place":"underground","ns":10.11,"ew":-56.7,"dest":{"cell":"019201A8","place":"dungeon"},"minLevel":15,"id":2322},
|
||||
{"name":"Frozen Library","type":"Portal","wcid":28778,"cell":"38F0003F","place":"outdoor","ns":90.72,"ew":-56.38,"dest":{"cell":"02FE044E","place":"dungeon","name":"Frozen Library"},"id":2323},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"38F70019","place":"outdoor","ns":95.71,"ew":-56.81,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2324},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"38F70019","place":"outdoor","ns":95.71,"ew":-56.81,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2324},
|
||||
{"name":"Knath Lair","type":"Portal","wcid":3638,"cell":"39410000","place":"outdoor","ns":-49.76,"ew":-56.28,"dest":{"cell":"0193012A","place":"dungeon","name":"Knath Lair"},"id":2325},
|
||||
{"name":"Apostate Excavation","type":"Portal","wcid":41195,"cell":"39600105","place":"dungeon","dest":{"cell":"39600107","place":"dungeon"},"minLevel":150,"quest":true,"desc":"This portal leads to the deeper regions of the Apostate Excavation. In a dungeon (landblock 3960).","id":2326},
|
||||
{"name":"Surface","type":"Portal","wcid":41196,"cell":"3960018B","place":"dungeon","dest":{"cell":"39600014","place":"outdoor","ns":-24.8,"ew":-56.09},"desc":"In a dungeon (landblock 3960).","id":2327},
|
||||
|
|
@ -2348,13 +2348,13 @@
|
|||
{"name":"Small Black Hill","type":"Portal","wcid":2329,"cell":"3E310000","place":"outdoor","ns":-62.14,"ew":-52.26,"dest":{"cell":"4031001F","place":"outdoor","ns":-62.12,"ew":-50.45},"id":2342},
|
||||
{"name":"Destroyed Glenden Wood Portal","type":"Portal","wcid":1017,"cell":"3E9A0000","place":"outdoor","ns":21.54,"ew":-51.63,"dest":{"cell":"A0A40025","place":"outdoor","ns":29.75,"ew":26.45},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":2343},
|
||||
{"name":"Destroyed Plateau Portal","type":"Portal","wcid":4042,"cell":"3EA40000","place":"outdoor","ns":29.34,"ew":-51.96,"dest":{"cell":"49B70021","place":"outdoor","ns":44.54,"ew":-43.13},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":2344},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43565,"cell":"3EEB0102","place":"dungeon","dest":{"cell":"E3D10034","place":"outdoor","ns":65.64,"ew":80.28},"desc":"In a dungeon (landblock 3EEB).","id":2345},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43565,"cell":"3EEB0102","place":"dungeon","dest":{"cell":"E3D10034","place":"outdoor","ns":65.64,"ew":80.28},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"desc":"In a dungeon (landblock 3EEB).","id":2345},
|
||||
{"name":"Ruschk Icehold","type":"Portal","wcid":29483,"cell":"3EEC002D","place":"outdoor","ns":87.3,"ew":-51.81,"dest":{"cell":"001D012F","place":"dungeon","name":"Ruschk Icehold"},"minLevel":80,"quest":true,"id":2346},
|
||||
{"name":"Penguin Cave Hatchery","type":"Portal","wcid":29048,"cell":"3EF5002B","place":"outdoor","ns":94.25,"ew":-51.76,"dest":{"cell":"01CB0360","place":"dungeon","name":"Penguin Cave Hatchery"},"minLevel":90,"id":2347},
|
||||
{"name":"Temple of the Black Spear","type":"Portal","wcid":87627,"cell":"3EF6000D","place":"outdoor","ns":95.34,"ew":-52.24,"dest":{"cell":"004F0343","place":"dungeon","name":"Temple of the Black Spear"},"minLevel":130,"quest":true,"id":2348},
|
||||
{"name":"Frigid Grotto","type":"Portal","wcid":46304,"cell":"3EF8002F","place":"outdoor","ns":97.09,"ew":-51.78,"dest":{"cell":"584D035A","place":"dungeon","name":"Frigid Grotto"},"minLevel":150,"id":2349},
|
||||
{"name":"Colossus Foundry Portal","type":"Portal","wcid":19715,"cell":"3F310100","place":"building","ns":-61.99,"ew":-51.32,"dest":{"cell":"545701C5","place":"dungeon","name":"Colossus Foundry"},"id":2350},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"3F310017","place":"outdoor","ns":-62.06,"ew":-51.3,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2351},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"3F310017","place":"outdoor","ns":-62.06,"ew":-51.3,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2351},
|
||||
{"name":"Disaster Maze","type":"Portal","wcid":2385,"cell":"3F320000","place":"outdoor","ns":-61.26,"ew":-50.94,"dest":{"cell":"01A60214","place":"dungeon","name":"Disaster Maze"},"minLevel":20,"id":2352},
|
||||
{"name":"Arrival Chamber","type":"Portal","wcid":41234,"cell":"3FB10107","place":"underground","ns":38.45,"ew":-49.98,"dest":{"cell":"3FB10110","place":"underground","ns":38.36,"ew":-49.41},"id":2353},
|
||||
{"name":"Surface","type":"Portal","wcid":41235,"cell":"3FB1010D","place":"underground","ns":38.36,"ew":-49.44,"dest":{"cell":"3FB10024","place":"outdoor","ns":39.99,"ew":-51.12},"id":2354},
|
||||
|
|
@ -2362,7 +2362,7 @@
|
|||
{"name":"Surface","type":"Portal","wcid":41235,"cell":"3FB10172","place":"underground","ns":38.74,"ew":-50.4,"dest":{"cell":"3FB10024","place":"outdoor","ns":39.99,"ew":-51.12},"id":2356},
|
||||
{"name":"Destroyed Portal to Zaikhal","type":"Portal","wcid":1032,"cell":"3FE7000B","place":"outdoor","ns":83.11,"ew":-51.4,"dest":{"cell":"80900013","place":"outdoor","ns":13.48,"ew":0.72},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":2357},
|
||||
{"name":"Portal to Silyun","type":"Portal","wcid":28708,"cell":"3FF00026","place":"outdoor","ns":90.62,"ew":-51.12,"dest":{"cell":"26EC0035","place":"outdoor","ns":87.3,"ew":-70.9},"id":2358},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43577,"cell":"400A0102","place":"dungeon","dest":{"cell":"E3D2002D","place":"outdoor","ns":66.55,"ew":80.21},"desc":"In a dungeon (landblock 400A).","id":2359},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43577,"cell":"400A0102","place":"dungeon","dest":{"cell":"E3D2002D","place":"outdoor","ns":66.55,"ew":80.21},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"desc":"In a dungeon (landblock 400A).","id":2359},
|
||||
{"name":"Sho Roadside","type":"Portal","wcid":1907,"cell":"40310000","place":"outdoor","ns":-62.64,"ew":-50.18,"dest":{"cell":"D45C003D","place":"outdoor","ns":-27.92,"ew":68.38},"id":2360},
|
||||
{"name":"Black Hill","type":"Portal","wcid":2328,"cell":"40310000","place":"outdoor","ns":-62.21,"ew":-50.54,"dest":{"cell":"3E310004","place":"outdoor","ns":-62.36,"ew":-52.3},"id":2361},
|
||||
{"name":"Small Black Hill","type":"Portal","wcid":2329,"cell":"40310000","place":"outdoor","ns":-62.01,"ew":-50.04,"dest":{"cell":"4031001F","place":"outdoor","ns":-62.12,"ew":-50.45},"id":2362},
|
||||
|
|
@ -2421,9 +2421,9 @@
|
|||
{"name":"Plateau Base","type":"Portal","wcid":2550,"cell":"49B60000","place":"outdoor","ns":44.37,"ew":-43.5,"dest":{"cell":"48B80001","place":"outdoor","ns":45.3,"ew":-44.26},"id":2415},
|
||||
{"name":"Mammet Foundry Portal","type":"Portal","wcid":19716,"cell":"49B6012C","place":"building","ns":44.25,"ew":-43.38,"dest":{"cell":"5458025F","place":"dungeon","name":"Mammet Foundry"},"id":2416},
|
||||
{"name":"Oriel Residential Halls Portal","type":"Portal","wcid":19369,"cell":"49B60000","place":"outdoor","ns":44.01,"ew":-43.11,"dest":{"cell":"565E0140","place":"dungeon","name":"Oriel Residential Halls"},"id":2417},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"49B60007","place":"outdoor","ns":44.26,"ew":-43.46,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2418},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"49B60007","place":"outdoor","ns":44.26,"ew":-43.46,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2418},
|
||||
{"name":"Destroyed Portal to Sanamar","type":"Portal","wcid":28709,"cell":"49F0001B","place":"outdoor","ns":90.28,"ew":-43.2,"dest":{"cell":"33D90015","place":"outdoor","ns":72.07,"ew":-60.9},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":2419},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"49F0001C","place":"outdoor","ns":90.36,"ew":-43.19,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2420},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"49F0001C","place":"outdoor","ns":90.36,"ew":-43.19,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":2420},
|
||||
{"name":"Undead Temple","type":"Portal","wcid":28788,"cell":"49F10019","place":"outdoor","ns":90.89,"ew":-43.19,"dest":{"cell":"03A502E2","place":"dungeon","name":"Undead Temple"},"id":2421},
|
||||
{"name":"Thrungus Hole","type":"Portal","wcid":30963,"cell":"49F50100","place":"building","ns":94.11,"ew":-42.97,"dest":{"cell":"002902E7","place":"dungeon","name":"Thrungus Hole"},"minLevel":126,"id":2422},
|
||||
{"name":"South Direlands Portal","type":"Portal","wcid":1107,"cell":"4A1B0000","place":"outdoor","ns":-80.08,"ew":-42.43,"dest":{"cell":"5416001A","place":"outdoor","ns":-84.2,"ew":-34.44},"minLevel":12,"id":2423},
|
||||
|
|
@ -3089,7 +3089,7 @@
|
|||
{"name":"Surface","type":"Portal","wcid":22653,"cell":"5B49010C","place":"dungeon","dest":{"cell":"EA7E002A","place":"outdoor","ns":-0.96,"ew":85.78},"desc":"In Plated Rifts.","id":3083},
|
||||
{"name":"Surface","type":"Portal","wcid":22693,"cell":"5B4A0100","place":"dungeon","dest":{"cell":"F67C003D","place":"outdoor","ns":-2.27,"ew":95.62},"desc":"In Tusker Quarters.","id":3084},
|
||||
{"name":"Desert March Portal","type":"Portal","wcid":9685,"cell":"5B9C0000","place":"outdoor","ns":22.89,"ew":-28.84,"dest":{"cell":"02AA022F","place":"dungeon","name":"Desert March"},"id":3085},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"5B9C002E","place":"outdoor","ns":23.37,"ew":-28.63,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3086},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"5B9C002E","place":"outdoor","ns":23.37,"ew":-28.63,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3086},
|
||||
{"name":"Spirit Cell","type":"Portal","wcid":22895,"cell":"5BA00000","place":"outdoor","ns":26.49,"ew":-28.52,"dest":{"cell":"564A010D","place":"dungeon","name":"Spirit Cell"},"quest":true,"id":3087},
|
||||
{"name":"Black Spear Temple","type":"Portal","wcid":33780,"cell":"5BDB0030","place":"outdoor","ns":74.04,"ew":-28.61,"dest":{"cell":"00740528","place":"dungeon","name":"Black Spear Temple"},"maxLevel":100,"quest":true,"desc":"A Ruschk temple, where those who wish to follow the Black Spear prove their worth.","id":3088},
|
||||
{"name":"Surface","type":"Portal","wcid":22668,"cell":"5C430100","place":"dungeon","dest":{"cell":"F8800026","place":"outdoor","ns":1.03,"ew":96.89},"desc":"In Tusker Cavern.","id":3089},
|
||||
|
|
@ -3310,7 +3310,7 @@
|
|||
{"name":"Surface","type":"Portal","wcid":25976,"cell":"644A0248","place":"dungeon","dest":{"cell":"709D0108","place":"dungeon"},"desc":"In a dungeon (landblock 644A).","id":3304},
|
||||
{"name":"Heartland","type":"Portal","wcid":1900,"cell":"64D50000","place":"outdoor","ns":68.92,"ew":-21.34,"dest":{"cell":"AD9B003E","place":"outdoor","ns":22.58,"ew":37.23},"id":3305},
|
||||
{"name":"Mammet Foundry Portal","type":"Portal","wcid":19716,"cell":"64D50130","place":"building","ns":68.85,"ew":-21.6,"dest":{"cell":"5458025F","place":"dungeon","name":"Mammet Foundry"},"id":3306},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"64D50013","place":"outdoor","ns":68.71,"ew":-21.65,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3307},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"64D50013","place":"outdoor","ns":68.71,"ew":-21.65,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3307},
|
||||
{"name":"Exit","type":"Portal","wcid":27299,"cell":"65480141","place":"dungeon","dest":{"cell":"09040008","place":"outdoor","ns":-97.96,"ew":-94.7},"minLevel":90,"desc":"In a dungeon (landblock 6548).","id":3308},
|
||||
{"name":"Exit to Surface","type":"Portal","wcid":27697,"cell":"65490142","place":"dungeon","dest":{"cell":"5BD8002E","place":"outdoor","ns":71.4,"ew":-28.61},"desc":"In a dungeon (landblock 6549).","id":3309},
|
||||
{"name":"Exit to Surface","type":"Portal","wcid":27699,"cell":"654A0142","place":"dungeon","dest":{"cell":"866A0032","place":"outdoor","ns":-17.05,"ew":5.92},"desc":"In a dungeon (landblock 654A).","id":3310},
|
||||
|
|
@ -3444,7 +3444,7 @@
|
|||
{"name":"Mannikin Foundry Portal","type":"Portal","wcid":19717,"cell":"7D640150","place":"building","ns":-21.54,"ew":-1.7,"dest":{"cell":"545A013C","place":"dungeon","name":"Mannikin Foundry"},"id":3438},
|
||||
{"name":"Yaraq Meeting Hall Portal","type":"Portal","wcid":6111,"cell":"7D640173","place":"building","ns":-21.8,"ew":-1.8,"dest":{"cell":"01340126","place":"dungeon","name":"Yaraq Meeting Hall"},"id":3439},
|
||||
{"name":"Destroyed Portal to Greenspire","type":"Portal","wcid":11954,"cell":"7D640000","place":"outdoor","ns":-21.69,"ew":-1.8,"dest":{"cell":"2BB5003C","place":"outdoor","ns":43.21,"ew":-66.8},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":3440},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"7D640025","place":"outdoor","ns":-21.51,"ew":-1.52,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3441},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"7D640025","place":"outdoor","ns":-21.51,"ew":-1.52,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3441},
|
||||
{"name":"Recovered Temple Portal","type":"Portal","wcid":4949,"cell":"7D870102","place":"dungeon","dest":{"cell":"0142017F","place":"dungeon"},"desc":"In a dungeon (landblock 7D87).","id":3442},
|
||||
{"name":"Majestic Hill Cottages Portal","type":"Portal","wcid":12518,"cell":"7D8F0000","place":"outdoor","ns":12.74,"ew":-1.7,"dest":{"cell":"8AA60029","place":"outdoor","ns":30.89,"ew":9.04},"id":3443},
|
||||
{"name":"Maitland Portal","type":"Portal","wcid":12517,"cell":"7D8F0000","place":"outdoor","ns":12.74,"ew":-1.66,"dest":{"cell":"879F0033","place":"outdoor","ns":25.48,"ew":6.68},"id":3444},
|
||||
|
|
@ -3508,7 +3508,7 @@
|
|||
{"name":"Aqalah Portal","type":"Portal","wcid":12471,"cell":"7F630000","place":"outdoor","ns":-22.47,"ew":0.21,"dest":{"cell":"7C760005","place":"outdoor","ns":-7.07,"ew":-2.67},"id":3502},
|
||||
{"name":"North Yaraq Villas Portal","type":"Portal","wcid":13118,"cell":"7F630000","place":"outdoor","ns":-22.34,"ew":0.17,"dest":{"cell":"7C6C0006","place":"outdoor","ns":-15.04,"ew":-2.73},"id":3503},
|
||||
{"name":"North Tumerok Vanguard Outpost","type":"Portal","wcid":9141,"cell":"7F760000","place":"outdoor","ns":-7.5,"ew":-0.0,"dest":{"cell":"02A50296","place":"dungeon","name":"North Tumerok Vanguard Outpost"},"minLevel":50,"id":3504},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43563,"cell":"7F8F0123","place":"building","ns":12.54,"ew":-0.0,"dest":{"cell":"E3D30036","place":"outdoor","ns":67.4,"ew":80.3},"id":3505},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43563,"cell":"7F8F0123","place":"building","ns":12.54,"ew":-0.0,"dest":{"cell":"E3D30036","place":"outdoor","ns":67.4,"ew":80.3},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"id":3505},
|
||||
{"name":"Upper Shade Stronghold Portal","type":"Portal","wcid":8847,"cell":"7FDB0000","place":"outdoor","ns":73.49,"ew":-0.27,"dest":{"cell":"02B10268","place":"dungeon","name":"Upper Shade Stronghold"},"minLevel":26,"id":3506},
|
||||
{"name":"Shade Stronghold Portal","type":"Portal","wcid":8892,"cell":"7FDB0000","place":"outdoor","ns":73.51,"ew":-0.25,"dest":{"cell":"02B10276","place":"dungeon","name":"Upper Shade Stronghold"},"minLevel":31,"id":3507},
|
||||
{"name":"Oriel Residential Halls Portal","type":"Portal","wcid":19369,"cell":"80000198","place":"dungeon","dest":{"cell":"565E0140","place":"dungeon","name":"Oriel Residential Halls"},"desc":"In a dungeon (landblock 8000).","id":3508},
|
||||
|
|
@ -3531,7 +3531,7 @@
|
|||
{"name":"Sanctum Residential Halls Portal","type":"Portal","wcid":15837,"cell":"80900000","place":"outdoor","ns":13.39,"ew":0.58,"dest":{"cell":"54650140","place":"dungeon","name":"Sanctum Residential Halls"},"id":3525},
|
||||
{"name":"Effigy Foundry Portal","type":"Portal","wcid":19718,"cell":"80900138","place":"building","ns":13.78,"ew":0.57,"dest":{"cell":"545901B0","place":"dungeon","name":"Effigy Foundry"},"id":3526},
|
||||
{"name":"Zaikhal Meeting Hall Portal","type":"Portal","wcid":6112,"cell":"8090015D","place":"building","ns":13.37,"ew":0.69,"dest":{"cell":"01350126","place":"dungeon","name":"Zaikhal Meeting Hall"},"id":3527},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"8090000C","place":"outdoor","ns":13.6,"ew":0.61,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3528},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"8090000C","place":"outdoor","ns":13.6,"ew":0.61,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3528},
|
||||
{"name":"Destroyed Portal to Cragstone","type":"Portal","wcid":1014,"cell":"80910000","place":"outdoor","ns":14.82,"ew":0.69,"dest":{"cell":"BB9F0040","place":"outdoor","ns":25.95,"ew":48.36},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":3529},
|
||||
{"name":"Platinum Legion Keep","type":"Portal","wcid":29437,"cell":"80940009","place":"outdoor","ns":16.52,"ew":0.61,"dest":{"cell":"001A017A","place":"dungeon","name":"Platinum Legion Keep"},"minLevel":100,"id":3530},
|
||||
{"name":"Oriel Residential Halls Portal","type":"Portal","wcid":19369,"cell":"81000198","place":"dungeon","dest":{"cell":"565E0140","place":"dungeon","name":"Oriel Residential Halls"},"desc":"In a dungeon (landblock 8100).","id":3531},
|
||||
|
|
@ -3549,7 +3549,7 @@
|
|||
{"name":"Viamontian Esper Mine","type":"Portal","wcid":32623,"cell":"83D9000E","place":"outdoor","ns":72.2,"ew":3.02,"dest":{"cell":"0048051A","place":"dungeon","name":"Viamontian Direlands Mine"},"minLevel":100,"quest":true,"desc":"This dungeon is quest restricted.","id":3543},
|
||||
{"name":"Oriel Residential Halls Portal","type":"Portal","wcid":19369,"cell":"84000198","place":"dungeon","dest":{"cell":"565E0140","place":"dungeon","name":"Oriel Residential Halls"},"desc":"In a dungeon (landblock 8400).","id":3544},
|
||||
{"name":"Arena","type":"Portal","wcid":7894,"cell":"84680000","place":"outdoor","ns":-18.51,"ew":3.68,"dest":{"cell":"02E201A3","place":"dungeon","name":"Arena"},"id":3545},
|
||||
{"name":"Arena","type":"Portal","wcid":7891,"cell":"84690000","place":"outdoor","ns":-17.91,"ew":3.88,"dest":{"cell":"02E301A3","place":"dungeon","name":"Arena"},"id":3546},
|
||||
{"name":"Arena","type":"Portal","wcid":7891,"cell":"84690000","place":"outdoor","ns":-17.91,"ew":3.88,"dest":{"cell":"02E301A3","place":"dungeon","name":"Arena"},"rules":["noNPK"],"id":3546},
|
||||
{"name":"Four Towers Settlement Portal","type":"Portal","wcid":12499,"cell":"84860000","place":"outdoor","ns":5.7,"ew":4.34,"dest":{"cell":"868E0020","place":"outdoor","ns":12.43,"ew":5.64},"id":3547},
|
||||
{"name":"Bay of Sands Portal","type":"Portal","wcid":12476,"cell":"84860000","place":"outdoor","ns":5.66,"ew":4.33,"dest":{"cell":"79810005","place":"outdoor","ns":1.71,"ew":-5.08},"id":3548},
|
||||
{"name":"Musansayn Portal","type":"Portal","wcid":12525,"cell":"84860000","place":"outdoor","ns":5.66,"ew":4.3,"dest":{"cell":"8E840037","place":"outdoor","ns":4.34,"ew":12.34},"id":3549},
|
||||
|
|
@ -3574,7 +3574,7 @@
|
|||
{"name":"Destroyed Portal to Khayyaban","type":"Portal","wcid":4572,"cell":"85880000","place":"outdoor","ns":7.5,"ew":5.06,"dest":{"cell":"9F440012","place":"outdoor","ns":-47.45,"ew":25.62},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":3568},
|
||||
{"name":"Destroyed Portal to Tou-Tou","type":"Portal","wcid":4568,"cell":"85880000","place":"outdoor","ns":7.09,"ew":4.51,"dest":{"cell":"F5590034","place":"outdoor","ns":-30.41,"ew":94.69},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":3569},
|
||||
{"name":"Effigy Foundry Portal","type":"Portal","wcid":19718,"cell":"85880128","place":"building","ns":7.44,"ew":4.79,"dest":{"cell":"545901B0","place":"dungeon","name":"Effigy Foundry"},"id":3570},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"8588001E","place":"outdoor","ns":7.44,"ew":4.83,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3571},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"8588001E","place":"outdoor","ns":7.44,"ew":4.83,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3571},
|
||||
{"name":"Al-Jalima Meeting Hall Portal","type":"Portal","wcid":6089,"cell":"85890101","place":"building","ns":7.7,"ew":4.9,"dest":{"cell":"011E0126","place":"dungeon","name":"Al-Jalima Meeting Hall"},"id":3572},
|
||||
{"name":"Northern Infiltrator Keep","type":"Portal","wcid":12150,"cell":"85920000","place":"outdoor","ns":15.41,"ew":4.96,"dest":{"cell":"03A30201","place":"dungeon","name":"Northern Infiltrator Keep"},"minLevel":25,"id":3573},
|
||||
{"name":"Haven Residential Halls Portal","type":"Portal","wcid":21464,"cell":"86000198","place":"dungeon","dest":{"cell":"56560140","place":"dungeon","name":"Haven Residential Halls"},"desc":"In a dungeon (landblock 8600).","id":3574},
|
||||
|
|
@ -3589,7 +3589,7 @@
|
|||
{"name":"Outer Courtyard","type":"Portal","wcid":29334,"cell":"86040331","place":"dungeon","desc":"Walk into this portal to enter the Outer Courtyard. In a dungeon (landblock 8604).","id":3583},
|
||||
{"name":"Empyrean Cloister Portal","type":"Portal","wcid":8833,"cell":"86620000","place":"outdoor","ns":-23.47,"ew":5.8,"dest":{"cell":"02AD01E4","place":"dungeon","name":"Empyrean Cloister"},"minLevel":15,"id":3584},
|
||||
{"name":"Mammet Foundry Portal","type":"Portal","wcid":19716,"cell":"866C010A","place":"building","ns":-14.93,"ew":5.81,"dest":{"cell":"5458025F","place":"dungeon","name":"Mammet Foundry"},"id":3585},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"866C002F","place":"outdoor","ns":-14.87,"ew":5.83,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3586},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"866C002F","place":"outdoor","ns":-14.87,"ew":5.83,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3586},
|
||||
{"name":"Burial Temple Portal","type":"Portal","wcid":5515,"cell":"868A0000","place":"outdoor","ns":8.5,"ew":5.93,"dest":{"cell":"013E03FF","place":"dungeon","name":"Burial Temple"},"minLevel":150,"id":3587},
|
||||
{"name":"Mountain Cavern Portal","type":"Portal","wcid":5109,"cell":"86CE0000","place":"outdoor","ns":63.16,"ew":5.51,"dest":{"cell":"015D0250","place":"dungeon","name":"Mountain Cavern"},"minLevel":20,"id":3588},
|
||||
{"name":"Caulnalain Vestibule Portal","type":"Portal","wcid":7945,"cell":"86D50000","place":"outdoor","ns":68.54,"ew":5.49,"dest":{"cell":"02DC035D","place":"dungeon","name":"Caulnalain Vestibule"},"minLevel":40,"id":3589},
|
||||
|
|
@ -3775,13 +3775,13 @@
|
|||
{"name":"Hilltop","type":"Portal","wcid":1902,"cell":"90240000","place":"outdoor","ns":-72.6,"ew":13.79,"dest":{"cell":"AAA80034","place":"outdoor","ns":32.79,"ew":34.68},"id":3769},
|
||||
{"name":"Mannikin Foundry Portal","type":"Portal","wcid":19717,"cell":"90580140","place":"building","ns":-31.17,"ew":13.79,"dest":{"cell":"545A013C","place":"dungeon","name":"Mannikin Foundry"},"id":3770},
|
||||
{"name":"Al-Arqas Meeting Hall Portal","type":"Portal","wcid":6088,"cell":"90580152","place":"building","ns":-31.22,"ew":13.82,"dest":{"cell":"011D0126","place":"dungeon","name":"Al-Arqas Meeting Hall"},"id":3771},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"90580034","place":"outdoor","ns":-31.17,"ew":13.9,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3772},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"90580034","place":"outdoor","ns":-31.17,"ew":13.9,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3772},
|
||||
{"name":"Destroyed Portal to Bluespire","type":"Portal","wcid":11953,"cell":"905C0000","place":"outdoor","ns":-28.27,"ew":13.63,"dest":{"cell":"21B00017","place":"outdoor","ns":39.54,"ew":-75.35},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":3773},
|
||||
{"name":"Cavernous Refuge","type":"Portal","wcid":45722,"cell":"9076000B","place":"outdoor","ns":-7.3,"ew":13.4,"dest":{"cell":"576D0154","place":"dungeon","name":"Cavernous Refuge"},"minLevel":150,"quest":true,"id":3774},
|
||||
{"name":"Hilltop","type":"Portal","wcid":1902,"cell":"90D00114","place":"building","ns":64.78,"ew":13.5,"dest":{"cell":"AAA80034","place":"outdoor","ns":32.79,"ew":34.68},"id":3775},
|
||||
{"name":"Sho Roadside","type":"Portal","wcid":1907,"cell":"90D00116","place":"building","ns":64.92,"ew":13.6,"dest":{"cell":"D45C003D","place":"outdoor","ns":-27.92,"ew":68.38},"id":3776},
|
||||
{"name":"Crater Pathway","type":"Portal","wcid":2554,"cell":"90D00104","place":"building","ns":64.8,"ew":13.72,"dest":{"cell":"01A701AA","place":"dungeon","name":"Crater Pathway"},"id":3777},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"90D00014","place":"outdoor","ns":64.79,"ew":13.54,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3778},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"90D00014","place":"outdoor","ns":64.79,"ew":13.54,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3778},
|
||||
{"name":"Victory Residential Halls Portal","type":"Portal","wcid":22231,"cell":"91000198","place":"dungeon","dest":{"cell":"56500140","place":"dungeon","name":"Victory Residential Halls"},"desc":"In a dungeon (landblock 9100).","id":3779},
|
||||
{"name":"South Tumerok Vanguard Outpost","type":"Portal","wcid":9143,"cell":"91460000","place":"outdoor","ns":-45.89,"ew":14.23,"dest":{"cell":"02A40110","place":"dungeon","name":"South Tumerok Vanguard Outpost"},"minLevel":50,"id":3780},
|
||||
{"name":"Destroyed Portal to Samsur","type":"Portal","wcid":1026,"cell":"91560000","place":"outdoor","ns":-32.64,"ew":14.38,"dest":{"cell":"977B000C","place":"outdoor","ns":-3.24,"ew":18.96},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":3781},
|
||||
|
|
@ -3819,7 +3819,7 @@
|
|||
{"name":"Uninhabited Area Portal","type":"Portal","wcid":8220,"cell":"934B0133","place":"underground","ns":-41.6,"ew":16.3,"dest":{"cell":"02D2011F","place":"dungeon"},"minLevel":1,"maxLevel":25,"id":3813},
|
||||
{"name":"Surface Portal","type":"Portal","wcid":8219,"cell":"934B0134","place":"underground","ns":-41.83,"ew":16.43,"dest":{"cell":"934B0021","place":"outdoor","ns":-41.92,"ew":16.1},"id":3814},
|
||||
{"name":"Xarabydun Lifestone Portal","type":"Portal","wcid":8221,"cell":"934B021B","place":"underground","ns":-41.95,"ew":15.89,"dest":{"cell":"02D30116","place":"dungeon"},"minLevel":1,"maxLevel":25,"id":3815},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"934B0009","place":"outdoor","ns":-41.87,"ew":15.81,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3816},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"934B0009","place":"outdoor","ns":-41.87,"ew":15.81,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3816},
|
||||
{"name":"Bookcase","type":"Portal","wcid":32811,"cell":"934B01F7","place":"underground","ns":-41.82,"ew":16.06,"dest":{"cell":"005B02D9","place":"dungeon"},"quest":true,"desc":"A simple bookcase.","id":3817},
|
||||
{"name":"Desert Ruin Portal","type":"Portal","wcid":4929,"cell":"93570102","place":"dungeon","dest":{"cell":"016701A7","place":"dungeon"},"desc":"In a dungeon (landblock 9357).","id":3818},
|
||||
{"name":"Mnemosyne Collection Site","type":"Portal","wcid":9322,"cell":"937C0000","place":"outdoor","ns":-2.54,"ew":16.39,"dest":{"cell":"029D0100","place":"dungeon","name":"Mnemosyne Collection Site"},"id":3819},
|
||||
|
|
@ -3857,7 +3857,7 @@
|
|||
{"name":"A Small Cave","type":"Portal","wcid":1325,"cell":"957A0000","place":"outdoor","ns":-4.2,"ew":17.32,"dest":{"cell":"01E70121","place":"dungeon","name":"A Small Cave"},"id":3851},
|
||||
{"name":"Base of Mt. Alphus","type":"Portal","wcid":433,"cell":"95970000","place":"outdoor","ns":19.49,"ew":17.47,"dest":{"cell":"94970030","place":"outdoor","ns":19.56,"ew":17.0},"id":3852},
|
||||
{"name":"South Zabool","type":"Portal","wcid":432,"cell":"95980000","place":"outdoor","ns":19.73,"ew":17.84,"dest":{"cell":"96990024","place":"outdoor","ns":20.77,"ew":18.47},"id":3853},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"95D6001C","place":"outdoor","ns":69.56,"ew":17.56,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3854},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"95D6001C","place":"outdoor","ns":69.56,"ew":17.56,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3854},
|
||||
{"name":"Victory Residential Halls Portal","type":"Portal","wcid":22231,"cell":"96000198","place":"dungeon","dest":{"cell":"56500140","place":"dungeon","name":"Victory Residential Halls"},"desc":"In a dungeon (landblock 9600).","id":3855},
|
||||
{"name":"Lugian Outpost","type":"Portal","wcid":1590,"cell":"961A0000","place":"outdoor","ns":-80.6,"ew":18.12,"dest":{"cell":"01C70121","place":"dungeon","name":"Lugian Outpost"},"id":3856},
|
||||
{"name":"Hebian-to Portal","type":"Portal","wcid":1019,"cell":"96230000","place":"outdoor","ns":-73.19,"ew":18.13,"dest":{"cell":"E64E002F","place":"outdoor","ns":-38.88,"ew":82.63},"id":3857},
|
||||
|
|
@ -3867,7 +3867,7 @@
|
|||
{"name":"Musansayn's Vaults Portal","type":"Portal","wcid":5202,"cell":"967E0100","place":"building","ns":-0.99,"ew":18.67,"dest":{"cell":"01550198","place":"dungeon","name":"Musansayn's Vaults"},"minLevel":40,"id":3861},
|
||||
{"name":"Mount Alphus","type":"Portal","wcid":431,"cell":"96990000","place":"outdoor","ns":20.75,"ew":18.46,"dest":{"cell":"95980029","place":"outdoor","ns":19.72,"ew":17.83},"id":3862},
|
||||
{"name":"Top of Zabool Tower","type":"Portal","wcid":370,"cell":"96990000","place":"outdoor","ns":21.14,"ew":18.47,"dest":{"cell":"01D301BA","place":"dungeon","name":"Top of Zabool Tower"},"id":3863},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43571,"cell":"96D6010A","place":"underground","ns":69.84,"ew":18.8,"dest":{"cell":"E6CF0025","place":"outdoor","ns":64.12,"ew":82.52},"id":3864},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43571,"cell":"96D6010A","place":"underground","ns":69.84,"ew":18.8,"dest":{"cell":"E6CF0025","place":"outdoor","ns":64.12,"ew":82.52},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"id":3864},
|
||||
{"name":"Mage Academy Portal","type":"Portal","wcid":5667,"cell":"96DC0000","place":"outdoor","ns":74.72,"ew":18.49,"dest":{"cell":"01390396","place":"dungeon","name":"Mage Academy"},"minLevel":150,"id":3865},
|
||||
{"name":"Rogue Delvings","type":"Portal","wcid":38646,"cell":"96DC0020","place":"outdoor","ns":74.78,"ew":18.36,"dest":{"cell":"00E001A0","place":"dungeon","name":"Rogue Delvings"},"minLevel":180,"quest":true,"id":3866},
|
||||
{"name":"Victory Residential Halls Portal","type":"Portal","wcid":22231,"cell":"97000198","place":"dungeon","dest":{"cell":"56500140","place":"dungeon","name":"Victory Residential Halls"},"desc":"In a dungeon (landblock 9700).","id":3867},
|
||||
|
|
@ -3875,12 +3875,12 @@
|
|||
{"name":"Mammet Foundry Portal","type":"Portal","wcid":19716,"cell":"9722015E","place":"building","ns":-74.24,"ew":19.18,"dest":{"cell":"5458025F","place":"dungeon","name":"Mammet Foundry"},"id":3869},
|
||||
{"name":"Atrium Residential Halls Portal","type":"Portal","wcid":19358,"cell":"97220000","place":"outdoor","ns":-74.08,"ew":19.16,"dest":{"cell":"56610140","place":"dungeon","name":"Atrium Residential Halls"},"id":3870},
|
||||
{"name":"Qalaba'r Meeting Hall Portal","type":"Portal","wcid":6102,"cell":"97220162","place":"building","ns":-74.2,"ew":19.0,"dest":{"cell":"012B0126","place":"dungeon","name":"Qalaba'r Meeting Hall"},"id":3871},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"9722001D","place":"outdoor","ns":-74.34,"ew":19.16,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3872},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"9722001D","place":"outdoor","ns":-74.34,"ew":19.16,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3872},
|
||||
{"name":"Lugian Post","type":"Portal","wcid":1592,"cell":"97260000","place":"outdoor","ns":-71.24,"ew":19.01,"dest":{"cell":"01C80111","place":"dungeon","name":"Lugian Post"},"id":3873},
|
||||
{"name":"Mosswart Maze Portal","type":"Portal","wcid":8367,"cell":"975F0000","place":"outdoor","ns":-25.23,"ew":19.38,"dest":{"cell":"02CA0247","place":"dungeon","name":"Mosswart Maze"},"id":3874},
|
||||
{"name":"Mannikin Foundry Portal","type":"Portal","wcid":19717,"cell":"977B015E","place":"building","ns":-2.88,"ew":19.38,"dest":{"cell":"545A013C","place":"dungeon","name":"Mannikin Foundry"},"id":3875},
|
||||
{"name":"Victory Residential Halls Portal","type":"Portal","wcid":22231,"cell":"977B0000","place":"outdoor","ns":-3.21,"ew":19.08,"dest":{"cell":"56500140","place":"dungeon","name":"Victory Residential Halls"},"id":3876},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"977B002F","place":"outdoor","ns":-2.93,"ew":19.44,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3877},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"977B002F","place":"outdoor","ns":-2.93,"ew":19.44,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3877},
|
||||
{"name":"Adventurer's Haven Cottages Portal","type":"Portal","wcid":12467,"cell":"977E0000","place":"outdoor","ns":-0.87,"ew":19.03,"dest":{"cell":"AC810024","place":"outdoor","ns":1.63,"ew":36.07},"id":3878},
|
||||
{"name":"Samsur Butte Cottages Portal","type":"Portal","wcid":12540,"cell":"977E0000","place":"outdoor","ns":-0.9,"ew":19.04,"dest":{"cell":"92770033","place":"outdoor","ns":-6.48,"ew":15.5},"id":3879},
|
||||
{"name":"Yushad Ridge Cottages Portal","type":"Portal","wcid":12570,"cell":"977E0000","place":"outdoor","ns":-0.87,"ew":18.99,"dest":{"cell":"9C70003C","place":"outdoor","ns":-12.03,"ew":23.56},"id":3880},
|
||||
|
|
@ -3913,7 +3913,7 @@
|
|||
{"name":"A Ruin","type":"Portal","wcid":2088,"cell":"997B0000","place":"outdoor","ns":-3.26,"ew":20.5,"dest":{"cell":"01B9011F","place":"dungeon","name":"A Ruin"},"id":3907},
|
||||
{"name":"Underground Forest Portal","type":"Portal","wcid":5604,"cell":"99A60000","place":"outdoor","ns":31.49,"ew":20.74,"dest":{"cell":"013C0201","place":"dungeon","name":"Underground Forest"},"id":3908},
|
||||
{"name":"Entrance to Portal Space","type":"Portal","wcid":14579,"cell":"99E60000","place":"outdoor","ns":82.77,"ew":21.17,"dest":{"cell":"526C040D","place":"dungeon","name":"Entrance to Portal Space"},"minLevel":70,"id":3909},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43573,"cell":"9A210102","place":"dungeon","dest":{"cell":"E7D1003A","place":"outdoor","ns":65.36,"ew":83.6},"desc":"In a dungeon (landblock 9A21).","id":3910},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43573,"cell":"9A210102","place":"dungeon","dest":{"cell":"E7D1003A","place":"outdoor","ns":65.36,"ew":83.6},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"desc":"In a dungeon (landblock 9A21).","id":3910},
|
||||
{"name":"Nevius Passage Portal","type":"Portal","wcid":5507,"cell":"9A460000","place":"outdoor","ns":-45.59,"ew":21.64,"dest":{"cell":"014C0158","place":"dungeon","name":"Nevius Passage"},"minLevel":8,"id":3911},
|
||||
{"name":"Destroyed Portal to Redspire","type":"Portal","wcid":11960,"cell":"9B7B0000","place":"outdoor","ns":-3.48,"ew":22.41,"dest":{"cell":"17B2002A","place":"outdoor","ns":40.56,"ew":-83.0},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":3912},
|
||||
{"name":"Ridge Citadel Portal","type":"Portal","wcid":7319,"cell":"9D270000","place":"outdoor","ns":-70.19,"ew":24.23,"dest":{"cell":"02F10152","place":"dungeon","name":"Ridge Citadel"},"id":3913},
|
||||
|
|
@ -3924,7 +3924,7 @@
|
|||
{"name":"Destroyed Al-Jalima Portal","type":"Portal","wcid":5486,"cell":"9E430000","place":"outdoor","ns":-48.13,"ew":24.56,"dest":{"cell":"8588002C","place":"outdoor","ns":7.25,"ew":4.95},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":3918},
|
||||
{"name":"Effigy Foundry Portal","type":"Portal","wcid":19718,"cell":"9E430131","place":"building","ns":-47.56,"ew":24.71,"dest":{"cell":"545901B0","place":"dungeon","name":"Effigy Foundry"},"id":3919},
|
||||
{"name":"Victory Residential Halls Portal","type":"Portal","wcid":22231,"cell":"9E430000","place":"outdoor","ns":-48.03,"ew":24.52,"dest":{"cell":"56500140","place":"dungeon","name":"Victory Residential Halls"},"id":3920},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"9E430018","place":"outdoor","ns":-47.55,"ew":24.71,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3921},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"9E430018","place":"outdoor","ns":-47.55,"ew":24.71,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3921},
|
||||
{"name":"Oriel Residential Halls Portal","type":"Portal","wcid":19369,"cell":"9E440000","place":"outdoor","ns":-47.4,"ew":25.11,"dest":{"cell":"565E0140","place":"dungeon","name":"Oriel Residential Halls"},"id":3922},
|
||||
{"name":"Matron Hive North","type":"Portal","wcid":24436,"cell":"9E440000","place":"outdoor","ns":-47.49,"ew":24.88,"dest":{"cell":"6347036E","place":"dungeon","name":"Matron Hive North"},"minLevel":60,"id":3923},
|
||||
{"name":"Winthura's Garden Portal","type":"Portal","wcid":5509,"cell":"9E490000","place":"outdoor","ns":-43.09,"ew":24.68,"dest":{"cell":"014B0213","place":"dungeon","name":"Winthura's Garden"},"minLevel":8,"id":3924},
|
||||
|
|
@ -3968,16 +3968,16 @@
|
|||
{"name":"Effigy Foundry Portal","type":"Portal","wcid":19718,"cell":"A1A40161","place":"building","ns":29.92,"ew":27.43,"dest":{"cell":"545901B0","place":"dungeon","name":"Effigy Foundry"},"id":3962},
|
||||
{"name":"Atrium Residential Halls Portal","type":"Portal","wcid":19358,"cell":"A1A40000","place":"outdoor","ns":29.68,"ew":27.03,"dest":{"cell":"56610140","place":"dungeon","name":"Atrium Residential Halls"},"id":3963},
|
||||
{"name":"Glenden Wood Meeting Hall Portal","type":"Portal","wcid":6094,"cell":"A1A40167","place":"building","ns":29.98,"ew":27.42,"dest":{"cell":"01230126","place":"dungeon","name":"Glenden Wood Meeting Hall"},"id":3964},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"A1A40035","place":"outdoor","ns":29.74,"ew":27.46,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3965},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"A1A40035","place":"outdoor","ns":29.74,"ew":27.46,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3965},
|
||||
{"name":"Outside Linvak Tukal","type":"Portal","wcid":9410,"cell":"A21E0000","place":"outdoor","ns":-77.41,"ew":27.97,"dest":{"cell":"A220002F","place":"outdoor","ns":-75.74,"ew":28.23},"id":3966},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"A21E0024","place":"outdoor","ns":-77.6,"ew":28.12,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3967},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"A21E0024","place":"outdoor","ns":-77.6,"ew":28.12,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3967},
|
||||
{"name":"Linvak Tukal Entryway","type":"Portal","wcid":9411,"cell":"A21F0000","place":"outdoor","ns":-76.69,"ew":27.98,"dest":{"cell":"029C010C","place":"dungeon","name":"Linvak Tukal Entryway"},"id":3968},
|
||||
{"name":"Portal to Linvak Tukal","type":"Portal","wcid":8401,"cell":"A2200000","place":"outdoor","ns":-75.71,"ew":28.22,"dest":{"cell":"A21E001A","place":"outdoor","ns":-77.79,"ew":28.0},"desc":"This portal goes to Linvak Tukal, the fortress bastion of our Lugian allies in the Linvak Range. This is a good town for characters over level 40.","id":3969},
|
||||
{"name":"Uziz Meeting Hall Portal","type":"Portal","wcid":6109,"cell":"A25F0166","place":"building","ns":-25.2,"ew":28.19,"dest":{"cell":"01320126","place":"dungeon","name":"Uziz Meeting Hall"},"id":3970},
|
||||
{"name":"Effigy Foundry Portal","type":"Portal","wcid":19718,"cell":"A2600121","place":"building","ns":-25.06,"ew":28.33,"dest":{"cell":"545901B0","place":"dungeon","name":"Effigy Foundry"},"id":3971},
|
||||
{"name":"Haven Residential Halls Portal","type":"Portal","wcid":21464,"cell":"A2600000","place":"outdoor","ns":-24.93,"ew":28.33,"dest":{"cell":"56560140","place":"dungeon","name":"Haven Residential Halls"},"id":3972},
|
||||
{"name":"Matron Hive West","type":"Portal","wcid":24434,"cell":"A2600000","place":"outdoor","ns":-24.95,"ew":28.2,"dest":{"cell":"6145036E","place":"dungeon","name":"Matron Hive West"},"minLevel":90,"id":3973},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"A2600029","place":"outdoor","ns":-25.14,"ew":28.19,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3974},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43066,"cell":"A2600029","place":"outdoor","ns":-25.14,"ew":28.19,"dest":{"cell":"00070133","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":3974},
|
||||
{"name":"Tusker Temple","type":"Portal","wcid":22698,"cell":"A2CA0000","place":"outdoor","ns":59.79,"ew":28.43,"dest":{"cell":"5D4302F9","place":"dungeon","name":"Tusker Temple"},"minLevel":20,"maxLevel":40,"id":3975},
|
||||
{"name":"Serac Vault Portal","type":"Portal","wcid":6397,"cell":"A3200000","place":"outdoor","ns":-75.89,"ew":28.98,"dest":{"cell":"01170140","place":"dungeon","name":"Serac Vault"},"id":3976},
|
||||
{"name":"Daiklos Dungeon","type":"Portal","wcid":4158,"cell":"A3A90000","place":"outdoor","ns":33.73,"ew":29.23,"dest":{"cell":"0185020F","place":"dungeon","name":"Daiklos Dungeon"},"id":3977},
|
||||
|
|
@ -4038,7 +4038,7 @@
|
|||
{"name":"Mannikin Foundry Portal","type":"Portal","wcid":19717,"cell":"A9B40176","place":"building","ns":42.7,"ew":33.58,"dest":{"cell":"545A013C","place":"dungeon","name":"Mannikin Foundry"},"id":4032},
|
||||
{"name":"Holtburg Meeting Hall Portal","type":"Portal","wcid":6096,"cell":"A9B4017A","place":"building","ns":42.21,"ew":33.91,"dest":{"cell":"01250126","place":"dungeon","name":"Holtburg Meeting Hall"},"id":4033},
|
||||
{"name":"Destroyed Portal to Redspire","type":"Portal","wcid":11960,"cell":"A9B40000","place":"outdoor","ns":42.62,"ew":33.36,"dest":{"cell":"17B2002A","place":"outdoor","ns":40.56,"ew":-83.0},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":4034},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"A9B40003","place":"outdoor","ns":42.28,"ew":33.31,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4035},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"A9B40003","place":"outdoor","ns":42.28,"ew":33.31,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4035},
|
||||
{"name":"Dungeon Nye","type":"Portal","wcid":4156,"cell":"AA870102","place":"building","ns":6.2,"ew":34.42,"dest":{"cell":"01810161","place":"dungeon","name":"Dungeon Nye"},"id":4036},
|
||||
{"name":"Holtburg Redoubt","type":"Portal","wcid":4935,"cell":"AAB10000","place":"outdoor","ns":40.4,"ew":34.47,"dest":{"cell":"016301AC","place":"dungeon","name":"Holtburg Redoubt"},"minLevel":1,"maxLevel":20,"desc":"This is a good adventure for someone who is newly arrived in Dereth.","id":4037},
|
||||
{"name":"Underground Passage","type":"Portal","wcid":14449,"cell":"AAB30101","place":"building","ns":41.6,"ew":34.2,"dest":{"cell":"01C20123","place":"dungeon","name":"Underground Passage"},"minLevel":20,"quest":true,"id":4038},
|
||||
|
|
@ -4095,10 +4095,10 @@
|
|||
{"name":"Trap Floor Portal","type":"Portal","wcid":42956,"cell":"B3700024","place":"outdoor","ns":-12.05,"ew":41.72,"dest":{"cell":"B36F0024","place":"outdoor","ns":-12.79,"ew":41.68},"id":4089},
|
||||
{"name":"Trap Floor Portal","type":"Portal","wcid":42956,"cell":"B370002B","place":"outdoor","ns":-12.06,"ew":41.81,"dest":{"cell":"B36F0024","place":"outdoor","ns":-12.79,"ew":41.68},"id":4090},
|
||||
{"name":"Yanshi Meeting Hall Portal","type":"Portal","wcid":6110,"cell":"B46F0106","place":"building","ns":-12.49,"ew":42.8,"dest":{"cell":"01330126","place":"dungeon","name":"Yanshi Meeting Hall"},"id":4091},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"B470002B","place":"outdoor","ns":-12.13,"ew":42.58,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4092},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"B470002B","place":"outdoor","ns":-12.13,"ew":42.58,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4092},
|
||||
{"name":"Tenkarrdun Foundry Portal","type":"Portal","wcid":7488,"cell":"B4EE0100","place":"building","ns":88.9,"ew":42.76,"dest":{"cell":"0116042F","place":"dungeon","name":"Tenkarrdun Foundry"},"minLevel":40,"id":4093},
|
||||
{"name":"Temple of the Font","type":"Portal","wcid":53477,"cell":"B54A002E","place":"outdoor","ns":-42.19,"ew":43.41,"dest":{"cell":"596B012C","place":"dungeon","name":"Radiant Blood Gauntlet"},"minLevel":275,"id":4094},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43575,"cell":"B56D0102","place":"dungeon","dest":{"cell":"E5D00040","place":"outdoor","ns":65.22,"ew":81.98},"desc":"In a dungeon (landblock B56D).","id":4095},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43575,"cell":"B56D0102","place":"dungeon","dest":{"cell":"E5D00040","place":"outdoor","ns":65.22,"ew":81.98},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"desc":"In a dungeon (landblock B56D).","id":4095},
|
||||
{"name":"A Cave","type":"Portal","wcid":3636,"cell":"B59D0100","place":"dungeon","dest":{"cell":"018B0191","place":"dungeon"},"desc":"In a dungeon (landblock B59D).","id":4096},
|
||||
{"name":"Olthoi Horde Nest","type":"Portal","wcid":7258,"cell":"B5C50000","place":"outdoor","ns":55.78,"ew":43.48,"dest":{"cell":"02FB03B4","place":"dungeon","name":"Olthoi Horde Nest"},"minLevel":20,"id":4097},
|
||||
{"name":"Aerlinthe Reservoir Portal","type":"Portal","wcid":7289,"cell":"B5EA0102","place":"building","ns":85.53,"ew":43.4,"dest":{"cell":"02EE03D2","place":"dungeon","name":"Aerlinthe Reservoir"},"minLevel":40,"id":4098},
|
||||
|
|
@ -4151,7 +4151,7 @@
|
|||
{"name":"Charged Niche","type":"Portal","wcid":52222,"cell":"B9F10040","place":"outdoor","ns":91.64,"ew":46.84,"dest":{"cell":"595E020F","place":"dungeon","name":"Frozen Recess"},"minLevel":180,"id":4145},
|
||||
{"name":"Sho Roadside","type":"Portal","wcid":1907,"cell":"BA170000","place":"outdoor","ns":-83.52,"ew":47.13,"dest":{"cell":"D45C003D","place":"outdoor","ns":-27.92,"ew":68.38},"id":4146},
|
||||
{"name":"Colossus Foundry Portal","type":"Portal","wcid":19715,"cell":"BA170142","place":"building","ns":-83.33,"ew":47.13,"dest":{"cell":"545701C5","place":"dungeon","name":"Colossus Foundry"},"id":4147},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"BA170013","place":"outdoor","ns":-83.29,"ew":47.06,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4148},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"BA170013","place":"outdoor","ns":-83.29,"ew":47.06,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4148},
|
||||
{"name":"Watery Grotto","type":"Portal","wcid":28265,"cell":"BA610100","place":"underground","ns":-23.8,"ew":47.17,"dest":{"cell":"017B0154","place":"dungeon"},"minLevel":40,"id":4149},
|
||||
{"name":"Deserted Ruin Portal","type":"Portal","wcid":4931,"cell":"BA6B0102","place":"dungeon","dest":{"cell":"0166015A","place":"dungeon"},"minLevel":40,"desc":"In a dungeon (landblock BA6B).","id":4150},
|
||||
{"name":"A Ruin","type":"Portal","wcid":1343,"cell":"BA6F0000","place":"outdoor","ns":-12.96,"ew":47.33,"dest":{"cell":"01DA010F","place":"dungeon","name":"A Ruin"},"id":4151},
|
||||
|
|
@ -4187,7 +4187,7 @@
|
|||
{"name":"Sanctum Residential Halls Portal","type":"Portal","wcid":15837,"cell":"BC9F0000","place":"outdoor","ns":25.48,"ew":48.72,"dest":{"cell":"54650140","place":"dungeon","name":"Sanctum Residential Halls"},"id":4181},
|
||||
{"name":"Effigy Foundry Portal","type":"Portal","wcid":19718,"cell":"BC9F0165","place":"building","ns":25.73,"ew":49.21,"dest":{"cell":"545901B0","place":"dungeon","name":"Effigy Foundry"},"id":4182},
|
||||
{"name":"Cragstone Meeting Hall Portal","type":"Portal","wcid":6092,"cell":"BC9F0169","place":"building","ns":26.0,"ew":49.1,"dest":{"cell":"01210126","place":"dungeon","name":"Cragstone Meeting Hall"},"id":4183},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"BC9F003C","place":"outdoor","ns":25.58,"ew":49.19,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4184},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"BC9F003C","place":"outdoor","ns":25.58,"ew":49.19,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4184},
|
||||
{"name":"Destroyed Portal to Zaikhal","type":"Portal","wcid":1032,"cell":"BCA00000","place":"outdoor","ns":26.38,"ew":48.57,"dest":{"cell":"80900013","place":"outdoor","ns":13.48,"ew":0.72},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":4185},
|
||||
{"name":"Vesayen Isles Portal","type":"Portal","wcid":8618,"cell":"BCCC0000","place":"outdoor","ns":61.68,"ew":48.56,"dest":{"cell":"E5240007","place":"outdoor","ns":-72.51,"ew":81.3},"id":4186},
|
||||
{"name":"Destroyed Portal to Holtburg","type":"Portal","wcid":1020,"cell":"BD810000","place":"outdoor","ns":1.69,"ew":49.94,"dest":{"cell":"A9B40019","place":"outdoor","ns":42.08,"ew":33.6},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":4187},
|
||||
|
|
@ -4198,14 +4198,14 @@
|
|||
{"name":"Eotensfang Portal","type":"Portal","wcid":1103,"cell":"BDD00000","place":"outdoor","ns":64.98,"ew":49.3,"dest":{"cell":"CBB40003","place":"outdoor","ns":42.33,"ew":60.48},"id":4192},
|
||||
{"name":"Bandit Castle Prison","type":"Portal","wcid":1306,"cell":"BDD20128","place":"building","ns":66.4,"ew":49.94,"dest":{"cell":"01E20231","place":"dungeon","name":"Bandit Castle Prison"},"id":4193},
|
||||
{"name":"KEEP OUT!","type":"Portal","wcid":31342,"cell":"BDD20036","place":"outdoor","ns":66.59,"ew":49.89,"dest":{"cell":"2B200024","place":"outdoor","ns":-75.98,"ew":-67.08},"quest":true,"id":4194},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"BDD20033","place":"outdoor","ns":66.29,"ew":49.94,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4195},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"BDD20033","place":"outdoor","ns":66.29,"ew":49.94,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4195},
|
||||
{"name":"Destroyed Portal to Yanshi","type":"Portal","wcid":1029,"cell":"BDF10101","place":"building","ns":91.3,"ew":49.7,"dest":{"cell":"B9720021","place":"outdoor","ns":-10.74,"ew":46.55},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":4196},
|
||||
{"name":"Banderling Conquest Dungeon","type":"Portal","wcid":8379,"cell":"BE5B0000","place":"outdoor","ns":-29.03,"ew":50.47,"dest":{"cell":"02C80258","place":"dungeon","name":"Banderling Conquest Dungeon"},"id":4197},
|
||||
{"name":"Tainted Grotto","type":"Portal","wcid":25227,"cell":"BE690000","place":"outdoor","ns":-17.79,"ew":50.6,"dest":{"cell":"634C03D3","place":"dungeon","name":"Tainted Grotto"},"id":4198},
|
||||
{"name":"Cells of the Black Book","type":"Portal","wcid":32674,"cell":"BE72010B","place":"dungeon","dest":{"cell":"008902DC","place":"dungeon"},"minLevel":60,"quest":true,"desc":"This dungeon is quest restricted and PK restricted. Speak with Hassha about gaining entry. In a dungeon (landblock BE72).","id":4199},
|
||||
{"name":"Cells of the Black Book","type":"Portal","wcid":32675,"cell":"BE72010B","place":"dungeon","dest":{"cell":"008902F5","place":"dungeon"},"minLevel":60,"quest":true,"desc":"This dungeon is quest restricted and PK restricted. Speak with Hassha about gaining entry. In a dungeon (landblock BE72).","id":4200},
|
||||
{"name":"Cells of the Black Book","type":"Portal","wcid":32676,"cell":"BE720108","place":"dungeon","dest":{"cell":"008902FF","place":"dungeon"},"minLevel":60,"quest":true,"desc":"This dungeon is quest restricted and PK restricted. Speak with Hassha about gaining entry. In a dungeon (landblock BE72).","id":4201},
|
||||
{"name":"Cells of the Black Book","type":"Portal","wcid":32677,"cell":"BE720108","place":"dungeon","dest":{"cell":"00890318","place":"dungeon"},"minLevel":60,"quest":true,"desc":"This dungeon is quest restricted and PK restricted. Speak with Hassha about gaining entry. In a dungeon (landblock BE72).","id":4202},
|
||||
{"name":"Cells of the Black Book","type":"Portal","wcid":32674,"cell":"BE72010B","place":"dungeon","dest":{"cell":"008902DC","place":"dungeon"},"minLevel":60,"quest":true,"rules":["noPKLite","noNPK"],"desc":"This dungeon is quest restricted and PK restricted. Speak with Hassha about gaining entry. In a dungeon (landblock BE72).","id":4199},
|
||||
{"name":"Cells of the Black Book","type":"Portal","wcid":32675,"cell":"BE72010B","place":"dungeon","dest":{"cell":"008902F5","place":"dungeon"},"minLevel":60,"quest":true,"rules":["noPKLite","noNPK"],"desc":"This dungeon is quest restricted and PK restricted. Speak with Hassha about gaining entry. In a dungeon (landblock BE72).","id":4200},
|
||||
{"name":"Cells of the Black Book","type":"Portal","wcid":32676,"cell":"BE720108","place":"dungeon","dest":{"cell":"008902FF","place":"dungeon"},"minLevel":60,"quest":true,"rules":["noPKLite","noNPK"],"desc":"This dungeon is quest restricted and PK restricted. Speak with Hassha about gaining entry. In a dungeon (landblock BE72).","id":4201},
|
||||
{"name":"Cells of the Black Book","type":"Portal","wcid":32677,"cell":"BE720108","place":"dungeon","dest":{"cell":"00890318","place":"dungeon"},"minLevel":60,"quest":true,"rules":["noPKLite","noNPK"],"desc":"This dungeon is quest restricted and PK restricted. Speak with Hassha about gaining entry. In a dungeon (landblock BE72).","id":4202},
|
||||
{"name":"Hollow Lair near Lytelthorpe","type":"Portal","wcid":12692,"cell":"BE7C0000","place":"outdoor","ns":-2.2,"ew":50.75,"dest":{"cell":"039C0202","place":"dungeon","name":"Hollow Lair near Lytelthorpe"},"minLevel":20,"id":4203},
|
||||
{"name":"Maedew Portal","type":"Portal","wcid":12516,"cell":"BE820000","place":"outdoor","ns":2.2,"ew":50.33,"dest":{"cell":"D0740003","place":"outdoor","ns":-8.87,"ew":64.53},"id":4204},
|
||||
{"name":"East Lytelthorpe Settlement Portal","type":"Portal","wcid":12490,"cell":"BE820000","place":"outdoor","ns":2.24,"ew":50.36,"dest":{"cell":"C77F0036","place":"outdoor","ns":0.2,"ew":57.93},"id":4205},
|
||||
|
|
@ -4228,7 +4228,7 @@
|
|||
{"name":"Mannikin Foundry Portal","type":"Portal","wcid":19717,"cell":"BF80017C","place":"building","ns":0.66,"ew":51.41,"dest":{"cell":"545A013C","place":"dungeon","name":"Mannikin Foundry"},"id":4222},
|
||||
{"name":"Haven Residential Halls Portal","type":"Portal","wcid":21464,"cell":"BF800000","place":"outdoor","ns":0.63,"ew":51.61,"dest":{"cell":"56560140","place":"dungeon","name":"Haven Residential Halls"},"id":4223},
|
||||
{"name":"Lytelthorpe Meeting Hall Portal","type":"Portal","wcid":6099,"cell":"BF800191","place":"building","ns":0.81,"ew":51.6,"dest":{"cell":"01280126","place":"dungeon","name":"Lytelthorpe Meeting Hall"},"id":4224},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"BF80002B","place":"outdoor","ns":0.74,"ew":51.43,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4225},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"BF80002B","place":"outdoor","ns":0.74,"ew":51.43,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4225},
|
||||
{"name":"Destroyed Portal to Yaraq","type":"Portal","wcid":1030,"cell":"C0260101","place":"building","ns":-70.98,"ew":52.3,"dest":{"cell":"7D64000D","place":"outdoor","ns":-21.51,"ew":-1.82},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":4226},
|
||||
{"name":"Swamp Ruin","type":"Portal","wcid":2344,"cell":"C0600101","place":"dungeon","dest":{"cell":"01C50138","place":"dungeon"},"minLevel":6,"desc":"In a dungeon (landblock C060).","id":4227},
|
||||
{"name":"Destroyed Portal to Rithwic","type":"Portal","wcid":1025,"cell":"C0820000","place":"outdoor","ns":2.3,"ew":51.98,"dest":{"cell":"C98C0028","place":"outdoor","ns":10.84,"ew":59.32},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":4228},
|
||||
|
|
@ -4262,7 +4262,7 @@
|
|||
{"name":"Soul Hunter's Lair","type":"Portal","wcid":34318,"cell":"C55C000F","place":"outdoor","ns":-27.67,"ew":55.77,"dest":{"cell":"007C02B2","place":"dungeon","name":"Soul Hunter's Lair"},"minLevel":60,"quest":true,"desc":"This dungeon is quest-restricted. See Hasin Lin in Sawato for more information.","id":4256},
|
||||
{"name":"Forgotten Temple Portal","type":"Portal","wcid":4961,"cell":"C5800102","place":"dungeon","dest":{"cell":"015101FE","place":"dungeon"},"desc":"In a dungeon (landblock C580).","id":4257},
|
||||
{"name":"Mammet Foundry Portal","type":"Portal","wcid":19716,"cell":"C5A6011B","place":"building","ns":30.92,"ew":56.4,"dest":{"cell":"5458025F","place":"dungeon","name":"Mammet Foundry"},"id":4258},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43569,"cell":"C5A70102","place":"dungeon","dest":{"cell":"E5CE0037","place":"outdoor","ns":63.51,"ew":81.86},"desc":"In a dungeon (landblock C5A7).","id":4259},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43569,"cell":"C5A70102","place":"dungeon","dest":{"cell":"E5CE0037","place":"outdoor","ns":63.51,"ew":81.86},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"desc":"In a dungeon (landblock C5A7).","id":4259},
|
||||
{"name":"Arwic Meeting Hall Portal","type":"Portal","wcid":6090,"cell":"C5A90101","place":"building","ns":33.57,"ew":55.78,"dest":{"cell":"011F0126","place":"dungeon","name":"Arwic Meeting Hall"},"id":4260},
|
||||
{"name":"Destroyed Portal to Tou-Tou","type":"Portal","wcid":4568,"cell":"C5A90000","place":"outdoor","ns":33.84,"ew":56.42,"dest":{"cell":"F5590034","place":"outdoor","ns":-30.41,"ew":94.69},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":4261},
|
||||
{"name":"Mountain Shortcut","type":"Portal","wcid":1904,"cell":"C5AB0000","place":"outdoor","ns":34.89,"ew":56.01,"dest":{"cell":"C5B2001E","place":"outdoor","ns":40.98,"ew":56.03},"id":4262},
|
||||
|
|
@ -4272,7 +4272,7 @@
|
|||
{"name":"Dungeon Gallery Tower","type":"Portal","wcid":2076,"cell":"C68C0000","place":"outdoor","ns":10.71,"ew":56.8,"dest":{"cell":"01AD0116","place":"dungeon","name":"Dungeon Gallery Tower"},"id":4266},
|
||||
{"name":"Arwic Mines Portal","type":"Portal","wcid":1088,"cell":"C6A90000","place":"outdoor","ns":33.83,"ew":56.83,"dest":{"cell":"01EF03DD","place":"dungeon","name":"Arwic Mines"},"id":4267},
|
||||
{"name":"Destroyed Al-Jalima Portal","type":"Portal","wcid":5486,"cell":"C6A90000","place":"outdoor","ns":33.6,"ew":57.18,"dest":{"cell":"8588002C","place":"outdoor","ns":7.25,"ew":4.95},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":4268},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"C6A9001B","place":"outdoor","ns":33.49,"ew":56.78,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4269},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"C6A9001B","place":"outdoor","ns":33.49,"ew":56.78,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4269},
|
||||
{"name":"Mite Maze Portal","type":"Portal","wcid":1121,"cell":"C6B20000","place":"outdoor","ns":41.1,"ew":57.24,"dest":{"cell":"01F801D4","place":"dungeon","name":"Mite Maze"},"id":4270},
|
||||
{"name":"Trial of the Deep","type":"Portal","wcid":37070,"cell":"C6EA003B","place":"outdoor","ns":85.47,"ew":57.15,"dest":{"cell":"00A90122","place":"dungeon","name":"Trial of the Deep"},"id":4271},
|
||||
{"name":"Mines of Despair","type":"Portal","wcid":4053,"cell":"C7210100","place":"building","ns":-75.48,"ew":57.26,"dest":{"cell":"01880307","place":"dungeon","name":"Mines of Despair"},"minLevel":14,"id":4272},
|
||||
|
|
@ -4285,11 +4285,11 @@
|
|||
{"name":"Paradox Queen's Lair","type":"Portal","wcid":72092,"cell":"C7B70104","place":"dungeon","dest":{"cell":"C7B7011B","place":"dungeon"},"desc":"In a dungeon (landblock C7B7).","id":4279},
|
||||
{"name":"Portal to Arwic","type":"Portal","wcid":42819,"cell":"C7E3000A","place":"outdoor","ns":79.8,"ew":57.37,"dest":{"cell":"C6A90009","place":"outdoor","ns":33.27,"ew":56.65},"desc":"This portal goes to Arwic, a walled Aluvian town that has fully recovered from a devastating attack by a Shadow Spire. This is a good town for characters over level 20.","id":4280},
|
||||
{"name":"Vissidal Island","type":"Portal","wcid":32127,"cell":"C7E90017","place":"outdoor","ns":85.13,"ew":57.53,"dest":{"cell":"C8E2002A","place":"outdoor","ns":79.03,"ew":58.62},"minLevel":130,"quest":true,"desc":"You must obtain the blessing of the Watcher of the Deep before you may use this portal.","id":4281},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43705,"cell":"C7EA0102","place":"dungeon","dest":{"cell":"E3D60032","place":"outdoor","ns":69.4,"ew":80.31},"desc":"In Olthoi Tunnel.","id":4282},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43705,"cell":"C7EA0102","place":"dungeon","dest":{"cell":"E3D60032","place":"outdoor","ns":69.4,"ew":80.31},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"desc":"In Olthoi Tunnel.","id":4282},
|
||||
{"name":"Old Warehouse","type":"Portal","wcid":4933,"cell":"C88A0100","place":"dungeon","dest":{"cell":"0165015B","place":"dungeon"},"minLevel":40,"desc":"In a dungeon (landblock C88A).","id":4283},
|
||||
{"name":"Mannikin Foundry Portal","type":"Portal","wcid":19717,"cell":"C88C0170","place":"building","ns":10.54,"ew":58.27,"dest":{"cell":"545A013C","place":"dungeon","name":"Mannikin Foundry"},"id":4284},
|
||||
{"name":"Martine's Retreat","type":"Portal","wcid":20919,"cell":"C88C0000","place":"outdoor","ns":10.62,"ew":58.27,"dest":{"cell":"56600187","place":"dungeon","name":"Martine's Retreat"},"id":4285},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"C88C0016","place":"outdoor","ns":10.55,"ew":58.27,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4286},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"C88C0016","place":"outdoor","ns":10.55,"ew":58.27,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4286},
|
||||
{"name":"Rithwic Meeting Hall Portal","type":"Portal","wcid":6103,"cell":"C88D0101","place":"building","ns":10.91,"ew":58.2,"dest":{"cell":"012C0126","place":"dungeon","name":"Rithwic Meeting Hall"},"id":4287},
|
||||
{"name":"Cave","type":"Portal","wcid":1331,"cell":"C8960000","place":"outdoor","ns":18.36,"ew":58.11,"dest":{"cell":"01F1010A","place":"dungeon","name":"Cave"},"id":4288},
|
||||
{"name":"Lair of Death","type":"Portal","wcid":2086,"cell":"C8B30000","place":"outdoor","ns":41.99,"ew":58.11,"dest":{"cell":"01AA01EC","place":"dungeon","name":"Lair of Death"},"minLevel":15,"id":4289},
|
||||
|
|
@ -4297,7 +4297,7 @@
|
|||
{"name":"Lost Garden Ruins","type":"Portal","wcid":1601,"cell":"C92D0100","place":"dungeon","dest":{"cell":"01B102BD","place":"dungeon"},"desc":"In a dungeon (landblock C92D).","id":4291},
|
||||
{"name":"Mammet Foundry Portal","type":"Portal","wcid":19716,"cell":"C95B0168","place":"building","ns":-28.64,"ew":59.3,"dest":{"cell":"5458025F","place":"dungeon","name":"Mammet Foundry"},"id":4292},
|
||||
{"name":"Sawato Meeting Hall Portal","type":"Portal","wcid":6105,"cell":"C95B0175","place":"building","ns":-28.48,"ew":59.3,"dest":{"cell":"012E0126","place":"dungeon","name":"Sawato Meeting Hall"},"id":4293},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"C95B002D","place":"outdoor","ns":-28.73,"ew":59.39,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4294},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"C95B002D","place":"outdoor","ns":-28.73,"ew":59.39,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4294},
|
||||
{"name":"Destroyed Portal to Shoushi","type":"Portal","wcid":1027,"cell":"C98D0000","place":"outdoor","ns":11.04,"ew":59.26,"dest":{"cell":"DA55001D","place":"outdoor","ns":-33.54,"ew":72.8},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":4295},
|
||||
{"name":"Destroyed Portal to Greenspire","type":"Portal","wcid":11954,"cell":"C98D0000","place":"outdoor","ns":11.12,"ew":59.58,"dest":{"cell":"2BB5003C","place":"outdoor","ns":43.21,"ew":-66.8},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":4296},
|
||||
{"name":"Rithwic Crypt","type":"Portal","wcid":1432,"cell":"C9900000","place":"outdoor","ns":14.03,"ew":59.11,"dest":{"cell":"01CD0144","place":"dungeon","name":"Rithwic Crypt"},"id":4297},
|
||||
|
|
@ -4380,7 +4380,7 @@
|
|||
{"name":"Mammet Foundry Portal","type":"Portal","wcid":19716,"cell":"CD41018A","place":"building","ns":-49.44,"ew":62.51,"dest":{"cell":"5458025F","place":"dungeon","name":"Mammet Foundry"},"id":4374},
|
||||
{"name":"Atrium Residential Halls Portal","type":"Portal","wcid":19358,"cell":"CD410000","place":"outdoor","ns":-49.25,"ew":62.4,"dest":{"cell":"56610140","place":"dungeon","name":"Atrium Residential Halls"},"id":4375},
|
||||
{"name":"Baishi Meeting Hall Portal","type":"Portal","wcid":6091,"cell":"CD41018E","place":"building","ns":-49.42,"ew":62.28,"dest":{"cell":"01200126","place":"dungeon","name":"Baishi Meeting Hall"},"id":4376},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"CD410026","place":"outdoor","ns":-49.43,"ew":62.5,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4377},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"CD410026","place":"outdoor","ns":-49.43,"ew":62.5,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4377},
|
||||
{"name":"Filos' Doom","type":"Portal","wcid":4927,"cell":"CD8E0100","place":"dungeon","dest":{"cell":"0150018A","place":"dungeon"},"desc":"In a dungeon (landblock CD8E).","id":4378},
|
||||
{"name":"Simple Tower Portal","type":"Portal","wcid":2092,"cell":"CD950000","place":"outdoor","ns":17.39,"ew":62.54,"dest":{"cell":"019D0118","place":"dungeon","name":"Simple Tower"},"id":4379},
|
||||
{"name":"Cave","type":"Portal","wcid":1331,"cell":"CD960004","place":"outdoor","ns":18.36,"ew":62.11,"dest":{"cell":"01F1010A","place":"dungeon","name":"Cave"},"id":4380},
|
||||
|
|
@ -4414,7 +4414,7 @@
|
|||
{"name":"Proving Grounds Uber","type":"Portal","wcid":46925,"cell":"CE940102","place":"building","ns":17.18,"ew":63.02,"dest":{"cell":"5852019F","place":"dungeon","name":"Proving Grounds Uber"},"minLevel":150,"quest":true,"id":4408},
|
||||
{"name":"Effigy Foundry Portal","type":"Portal","wcid":19718,"cell":"CE950169","place":"building","ns":17.65,"ew":63.33,"dest":{"cell":"545901B0","place":"dungeon","name":"Effigy Foundry"},"id":4409},
|
||||
{"name":"Eastham Meeting Hall Portal","type":"Portal","wcid":6093,"cell":"CE950172","place":"building","ns":17.6,"ew":63.52,"dest":{"cell":"01220126","place":"dungeon","name":"Eastham Meeting Hall"},"id":4410},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"CE95002D","place":"outdoor","ns":17.73,"ew":63.37,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4411},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"CE95002D","place":"outdoor","ns":17.73,"ew":63.37,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4411},
|
||||
{"name":"Patriarch's Valley","type":"Portal","wcid":39409,"cell":"CE950034","place":"outdoor","ns":17.59,"ew":63.47,"dest":{"cell":"72C80025","place":"outdoor","ns":58.5,"ew":-10.3},"id":4412},
|
||||
{"name":"Eastham Sewer","type":"Portal","wcid":1323,"cell":"CE960000","place":"outdoor","ns":18.77,"ew":63.43,"dest":{"cell":"01CF0237","place":"dungeon","name":"Eastham Sewer"},"minLevel":50,"id":4413},
|
||||
{"name":"Destroyed Sawato Portal","type":"Portal","wcid":4043,"cell":"CF180000","place":"outdoor","ns":-82.46,"ew":63.78,"dest":{"cell":"C95B0001","place":"outdoor","ns":-29.15,"ew":58.91},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":4414},
|
||||
|
|
@ -4473,17 +4473,17 @@
|
|||
{"name":"Lin Meeting Hall Portal","type":"Portal","wcid":6098,"cell":"DA3A010B","place":"building","ns":-54.8,"ew":73.22,"dest":{"cell":"01270126","place":"dungeon","name":"Lin Meeting Hall"},"id":4467},
|
||||
{"name":"Effigy Foundry Portal","type":"Portal","wcid":19718,"cell":"DA3B013B","place":"building","ns":-54.42,"ew":73.2,"dest":{"cell":"545901B0","place":"dungeon","name":"Effigy Foundry"},"id":4468},
|
||||
{"name":"Victory Residential Halls Portal","type":"Portal","wcid":22231,"cell":"DA3B0000","place":"outdoor","ns":-54.35,"ew":73.24,"dest":{"cell":"56500140","place":"dungeon","name":"Victory Residential Halls"},"id":4469},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"DA3B003B","place":"outdoor","ns":-54.53,"ew":73.21,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4470},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"DA3B003B","place":"outdoor","ns":-54.53,"ew":73.21,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4470},
|
||||
{"name":"Shoushi Grotto Portal","type":"Portal","wcid":1124,"cell":"DA540000","place":"outdoor","ns":-34.46,"ew":72.83,"dest":{"cell":"01F701ED","place":"dungeon","name":"Shoushi Grotto"},"id":4471},
|
||||
{"name":"Mannikin Foundry Portal","type":"Portal","wcid":19717,"cell":"DA5501E7","place":"building","ns":-33.37,"ew":72.85,"dest":{"cell":"545A013C","place":"dungeon","name":"Mannikin Foundry"},"id":4472},
|
||||
{"name":"Shoushi Meeting Hall Portal","type":"Portal","wcid":6106,"cell":"DA5501EB","place":"building","ns":-33.18,"ew":72.88,"dest":{"cell":"012F0126","place":"dungeon","name":"Shoushi Meeting Hall"},"id":4473},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"DA550014","place":"outdoor","ns":-33.57,"ew":72.73,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4474},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"DA550014","place":"outdoor","ns":-33.57,"ew":72.73,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4474},
|
||||
{"name":"Banderling Hovel","type":"Portal","wcid":28267,"cell":"DA570000","place":"outdoor","ns":-31.98,"ew":72.81,"dest":{"cell":"017A0137","place":"dungeon","name":"Banderling Hovel"},"minLevel":10,"id":4475},
|
||||
{"name":"Mosswart Place Cottages Portal","type":"Portal","wcid":12522,"cell":"DA580000","place":"outdoor","ns":-31.33,"ew":72.56,"dest":{"cell":"DB630016","place":"outdoor","ns":-22.22,"ew":73.53},"id":4476},
|
||||
{"name":"Aimaru Plains Cottages Portal","type":"Portal","wcid":12468,"cell":"DA580000","place":"outdoor","ns":-31.3,"ew":72.56,"dest":{"cell":"DD5C0012","place":"outdoor","ns":-28.16,"ew":75.13},"id":4477},
|
||||
{"name":"Chi Zou Cottages Portal","type":"Portal","wcid":12484,"cell":"DA580000","place":"outdoor","ns":-31.27,"ew":72.57,"dest":{"cell":"D65A003F","place":"outdoor","ns":-29.27,"ew":69.95},"id":4478},
|
||||
{"name":"Shou-Zin Portal","type":"Portal","wcid":13127,"cell":"DA580000","place":"outdoor","ns":-31.33,"ew":72.6,"dest":{"cell":"D5510005","place":"outdoor","ns":-36.66,"ew":68.54},"id":4479},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"DA75002D","place":"outdoor","ns":-7.9,"ew":72.97,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4480},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43065,"cell":"DA75002D","place":"outdoor","ns":-7.9,"ew":72.97,"dest":{"cell":"00070143","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4480},
|
||||
{"name":"Destroyed Portal to Tou-Tou","type":"Portal","wcid":4568,"cell":"DB3B0000","place":"outdoor","ns":-53.99,"ew":73.9,"dest":{"cell":"F5590034","place":"outdoor","ns":-30.41,"ew":94.69},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":4481},
|
||||
{"name":"Destroyed Portal to Sanamar","type":"Portal","wcid":28709,"cell":"DB54000D","place":"outdoor","ns":-34.3,"ew":73.4,"dest":{"cell":"33D90015","place":"outdoor","ns":72.07,"ew":-60.9},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":4482},
|
||||
{"name":"Underground Passage","type":"Portal","wcid":14449,"cell":"DB560101","place":"building","ns":-32.8,"ew":73.3,"dest":{"cell":"01C20123","place":"dungeon","name":"Underground Passage"},"minLevel":20,"quest":true,"id":4483},
|
||||
|
|
@ -4493,8 +4493,8 @@
|
|||
{"name":"Mossy Cave","type":"Portal","wcid":28835,"cell":"DD540100","place":"dungeon","dest":{"cell":"03FE0228","place":"dungeon"},"desc":"In a dungeon (landblock DD54).","id":4487},
|
||||
{"name":"Mask Clan Training Camp","type":"Portal","wcid":23895,"cell":"DD6B0000","place":"outdoor","ns":-16.0,"ew":74.99,"dest":{"cell":"56440103","place":"dungeon","name":"Mask Clan Training Camp"},"id":4488},
|
||||
{"name":"Falcon Clan Training Camp","type":"Portal","wcid":23891,"cell":"DD810000","place":"outdoor","ns":2.01,"ew":74.97,"dest":{"cell":"5777040D","place":"dungeon","name":"Falcon Clan Training Camp"},"id":4489},
|
||||
{"name":"Passage to Olthoi Island","type":"Portal","wcid":43536,"cell":"DDCF0039","place":"outdoor","ns":63.7,"ew":75.58,"dest":{"cell":"E4D60014","place":"outdoor","ns":69.6,"ew":80.7},"id":4490},
|
||||
{"name":"Passage to Olthoi Island","type":"Portal","wcid":43580,"cell":"DECE003B","place":"outdoor","ns":63.12,"ew":76.37,"dest":{"cell":"E8D2002B","place":"outdoor","ns":66.3,"ew":84.2},"id":4491},
|
||||
{"name":"Passage to Olthoi Island","type":"Portal","wcid":43536,"cell":"DDCF0039","place":"outdoor","ns":63.7,"ew":75.58,"dest":{"cell":"E4D60014","place":"outdoor","ns":69.6,"ew":80.7},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"id":4490},
|
||||
{"name":"Passage to Olthoi Island","type":"Portal","wcid":43580,"cell":"DECE003B","place":"outdoor","ns":63.12,"ew":76.37,"dest":{"cell":"E8D2002B","place":"outdoor","ns":66.3,"ew":84.2},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"id":4491},
|
||||
{"name":"South Direlands Portal","type":"Portal","wcid":1107,"cell":"DF310000","place":"outdoor","ns":-62.19,"ew":77.09,"dest":{"cell":"5416001A","place":"outdoor","ns":-84.2,"ew":-34.44},"minLevel":12,"id":4492},
|
||||
{"name":"Saadia's Retreat","type":"Portal","wcid":5530,"cell":"DF3C0000","place":"outdoor","ns":-53.6,"ew":76.62,"dest":{"cell":"013F01C5","place":"dungeon","name":"Saadia's Retreat"},"id":4493},
|
||||
{"name":"Nanto Rat Lair Portal","type":"Portal","wcid":5127,"cell":"E23B0100","place":"building","ns":-54.17,"ew":79.5,"dest":{"cell":"015C0101","place":"dungeon","name":"Nanto Rat Lair"},"id":4494},
|
||||
|
|
@ -4513,16 +4513,16 @@
|
|||
{"name":"Destroyed Portal to Yanshi","type":"Portal","wcid":1029,"cell":"E33D0000","place":"outdoor","ns":-52.7,"ew":80.32,"dest":{"cell":"B9720021","place":"outdoor","ns":-10.74,"ew":46.55},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":4507},
|
||||
{"name":"Destroyed Portal to Bluespire","type":"Portal","wcid":11953,"cell":"E33D0000","place":"outdoor","ns":-52.69,"ew":79.79,"dest":{"cell":"21B00017","place":"outdoor","ns":39.54,"ew":-75.35},"desc":"This portal was destroyed by Asheron's foray into opening a portal to the lost Empyreans.","id":4508},
|
||||
{"name":"Water Temple Portal","type":"Portal","wcid":4923,"cell":"E33E0100","place":"dungeon","dest":{"cell":"0168012A","place":"dungeon"},"minLevel":40,"desc":"In a dungeon (landblock E33E).","id":4509},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43544,"cell":"E3D10035","place":"outdoor","ns":65.67,"ew":80.29,"dest":{"cell":"3EEB0001","place":"outdoor","ns":86.14,"ew":-52.31},"id":4510},
|
||||
{"name":"Queen's Burrow","type":"Portal","wcid":43586,"cell":"E3D20102","place":"building","ns":66.34,"ew":80.4,"dest":{"cell":"E5D40019","place":"outdoor","ns":67.75,"ew":81.6},"id":4511},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43556,"cell":"E3D2002D","place":"outdoor","ns":66.52,"ew":80.18,"dest":{"cell":"400A001E","place":"outdoor","ns":-93.35,"ew":-50.41},"id":4512},
|
||||
{"name":"Queen's Burrow","type":"Portal","wcid":43585,"cell":"E3D30102","place":"building","ns":67.64,"ew":80.2,"dest":{"cell":"E5D4002C","place":"outdoor","ns":68.03,"ew":81.8},"id":4513},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43542,"cell":"E3D30036","place":"outdoor","ns":67.39,"ew":80.33,"dest":{"cell":"7F8F0019","place":"outdoor","ns":12.45,"ew":0.02},"id":4514},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43540,"cell":"E3D3000F","place":"outdoor","ns":67.51,"ew":79.81,"dest":{"cell":"F65D0008","place":"outdoor","ns":-26.85,"ew":94.89},"id":4515},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":90131,"cell":"E3D50001","place":"outdoor","ns":68.5,"ew":79.69,"dest":{"cell":"2E110006","place":"outdoor","ns":-87.8,"ew":-65.1},"id":4516},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":90130,"cell":"E3D60032","place":"outdoor","ns":69.4,"ew":80.31,"dest":{"cell":"C7EA0100","place":"dungeon","name":"Olthoi Tunnel"},"id":4517},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43590,"cell":"E4CF000D","place":"outdoor","ns":64.12,"ew":80.58,"dest":{"cell":"F7300030","place":"outdoor","ns":-62.84,"ew":96.17},"id":4518},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43546,"cell":"E4D00018","place":"outdoor","ns":65.19,"ew":80.71,"dest":{"cell":"18B40001","place":"outdoor","ns":42.05,"ew":-82.7},"id":4519},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43544,"cell":"E3D10035","place":"outdoor","ns":65.67,"ew":80.29,"dest":{"cell":"3EEB0001","place":"outdoor","ns":86.14,"ew":-52.31},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"id":4510},
|
||||
{"name":"Queen's Burrow","type":"Portal","wcid":43586,"cell":"E3D20102","place":"building","ns":66.34,"ew":80.4,"dest":{"cell":"E5D40019","place":"outdoor","ns":67.75,"ew":81.6},"rules":["onlyOlthoi"],"id":4511},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43556,"cell":"E3D2002D","place":"outdoor","ns":66.52,"ew":80.18,"dest":{"cell":"400A001E","place":"outdoor","ns":-93.35,"ew":-50.41},"rules":["noPKLite","noNPK","onlyOlthoi","noVitae","noNewAccounts"],"id":4512},
|
||||
{"name":"Queen's Burrow","type":"Portal","wcid":43585,"cell":"E3D30102","place":"building","ns":67.64,"ew":80.2,"dest":{"cell":"E5D4002C","place":"outdoor","ns":68.03,"ew":81.8},"rules":["onlyOlthoi"],"id":4513},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43542,"cell":"E3D30036","place":"outdoor","ns":67.39,"ew":80.33,"dest":{"cell":"7F8F0019","place":"outdoor","ns":12.45,"ew":0.02},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"id":4514},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43540,"cell":"E3D3000F","place":"outdoor","ns":67.51,"ew":79.81,"dest":{"cell":"F65D0008","place":"outdoor","ns":-26.85,"ew":94.89},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"id":4515},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":90131,"cell":"E3D50001","place":"outdoor","ns":68.5,"ew":79.69,"dest":{"cell":"2E110006","place":"outdoor","ns":-87.8,"ew":-65.1},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"id":4516},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":90130,"cell":"E3D60032","place":"outdoor","ns":69.4,"ew":80.31,"dest":{"cell":"C7EA0100","place":"dungeon","name":"Olthoi Tunnel"},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"id":4517},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43590,"cell":"E4CF000D","place":"outdoor","ns":64.12,"ew":80.58,"dest":{"cell":"F7300030","place":"outdoor","ns":-62.84,"ew":96.17},"rules":["noPKLite","noNPK","onlyOlthoi","noVitae","noNewAccounts"],"id":4518},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43546,"cell":"E4D00018","place":"outdoor","ns":65.19,"ew":80.71,"dest":{"cell":"18B40001","place":"outdoor","ns":42.05,"ew":-82.7},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"id":4519},
|
||||
{"name":"Mud Cave","type":"Portal","wcid":8474,"cell":"E5240100","place":"building","ns":-73.05,"ew":81.35,"dest":{"cell":"02C1017E","place":"dungeon","name":"Mud Cave"},"id":4520},
|
||||
{"name":"A Ruin","type":"Portal","wcid":1341,"cell":"E5310000","place":"outdoor","ns":-62.64,"ew":81.39,"dest":{"cell":"01DE0195","place":"dungeon","name":"A Ruin"},"id":4521},
|
||||
{"name":"Mammet Foundry Portal","type":"Portal","wcid":19716,"cell":"E5320135","place":"building","ns":-61.91,"ew":81.97,"dest":{"cell":"5458025F","place":"dungeon","name":"Mammet Foundry"},"id":4522},
|
||||
|
|
@ -4534,17 +4534,17 @@
|
|||
{"name":"Qalaba'r Portal","type":"Portal","wcid":1024,"cell":"E54C0000","place":"outdoor","ns":-40.75,"ew":81.86,"dest":{"cell":"9722003A","place":"outdoor","ns":-74.65,"ew":19.55},"id":4528},
|
||||
{"name":"Thief Trail","type":"Portal","wcid":1597,"cell":"E54D0000","place":"outdoor","ns":-39.76,"ew":81.69,"dest":{"cell":"01BB0155","place":"dungeon","name":"Thief Trail"},"minLevel":7,"id":4529},
|
||||
{"name":"Cragstone Portal","type":"Portal","wcid":1015,"cell":"E54E0000","place":"outdoor","ns":-39.4,"ew":81.35,"dest":{"cell":"BB9F0040","place":"outdoor","ns":25.95,"ew":48.36},"id":4530},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43548,"cell":"E5CE0037","place":"outdoor","ns":63.47,"ew":81.89,"dest":{"cell":"C5A70037","place":"outdoor","ns":32.35,"ew":56.3},"id":4531},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43554,"cell":"E5D00040","place":"outdoor","ns":65.18,"ew":82.01,"dest":{"cell":"B56D0016","place":"outdoor","ns":-14.25,"ew":43.09},"id":4532},
|
||||
{"name":"Queen's Burrow","type":"Portal","wcid":43583,"cell":"E5D30143","place":"dungeon","dest":{"cell":"E6CE002A","place":"outdoor","ns":62.96,"ew":82.56},"desc":"In a dungeon (landblock E5D3).","id":4533},
|
||||
{"name":"Queen's Burrow","type":"Portal","wcid":43584,"cell":"E5D3013F","place":"dungeon","dest":{"cell":"E6D10020","place":"outdoor","ns":66.05,"ew":82.4},"desc":"In a dungeon (landblock E5D3).","id":4534},
|
||||
{"name":"Queen's Burrow","type":"Portal","wcid":43581,"cell":"E5D40102","place":"dungeon","dest":{"cell":"E3D30030","place":"outdoor","ns":67.57,"ew":80.16},"desc":"In a dungeon (landblock E5D4).","id":4535},
|
||||
{"name":"Queen's Burrow","type":"Portal","wcid":43582,"cell":"E5D40106","place":"dungeon","dest":{"cell":"E3D2003A","place":"outdoor","ns":66.25,"ew":80.37},"desc":"In a dungeon (landblock E5D4).","id":4536},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43548,"cell":"E5CE0037","place":"outdoor","ns":63.47,"ew":81.89,"dest":{"cell":"C5A70037","place":"outdoor","ns":32.35,"ew":56.3},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"id":4531},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43554,"cell":"E5D00040","place":"outdoor","ns":65.18,"ew":82.01,"dest":{"cell":"B56D0016","place":"outdoor","ns":-14.25,"ew":43.09},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"id":4532},
|
||||
{"name":"Queen's Burrow","type":"Portal","wcid":43583,"cell":"E5D30143","place":"dungeon","dest":{"cell":"E6CE002A","place":"outdoor","ns":62.96,"ew":82.56},"rules":["onlyOlthoi"],"desc":"In a dungeon (landblock E5D3).","id":4533},
|
||||
{"name":"Queen's Burrow","type":"Portal","wcid":43584,"cell":"E5D3013F","place":"dungeon","dest":{"cell":"E6D10020","place":"outdoor","ns":66.05,"ew":82.4},"rules":["onlyOlthoi"],"desc":"In a dungeon (landblock E5D3).","id":4534},
|
||||
{"name":"Queen's Burrow","type":"Portal","wcid":43581,"cell":"E5D40102","place":"dungeon","dest":{"cell":"E3D30030","place":"outdoor","ns":67.57,"ew":80.16},"rules":["onlyOlthoi"],"desc":"In a dungeon (landblock E5D4).","id":4535},
|
||||
{"name":"Queen's Burrow","type":"Portal","wcid":43582,"cell":"E5D40106","place":"dungeon","dest":{"cell":"E3D2003A","place":"outdoor","ns":66.25,"ew":80.37},"rules":["onlyOlthoi"],"desc":"In a dungeon (landblock E5D4).","id":4536},
|
||||
{"name":"Eastham Beach Portal","type":"Portal","wcid":8616,"cell":"E6240000","place":"outdoor","ns":-72.36,"ew":82.17,"dest":{"cell":"D196002D","place":"outdoor","ns":18.47,"ew":65.82},"id":4537},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"E6320002","place":"outdoor","ns":-61.8,"ew":82.09,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4538},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"E6320002","place":"outdoor","ns":-61.8,"ew":82.09,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4538},
|
||||
{"name":"Mannikin Foundry Portal","type":"Portal","wcid":19717,"cell":"E63D0153","place":"building","ns":-52.53,"ew":82.12,"dest":{"cell":"545A013C","place":"dungeon","name":"Mannikin Foundry"},"id":4539},
|
||||
{"name":"Nanto Meeting Hall Portal","type":"Portal","wcid":6101,"cell":"E63D0166","place":"building","ns":-52.51,"ew":82.53,"dest":{"cell":"012A0126","place":"dungeon","name":"Nanto Meeting Hall"},"id":4540},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"E63D0015","place":"outdoor","ns":-52.68,"ew":82.27,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4541},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"E63D0015","place":"outdoor","ns":-52.68,"ew":82.27,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4541},
|
||||
{"name":"Bluewater Cottages Portal","type":"Portal","wcid":12478,"cell":"E64B0000","place":"outdoor","ns":-41.47,"ew":82.23,"dest":{"cell":"E1660021","place":"outdoor","ns":-20.33,"ew":78.51},"id":4542},
|
||||
{"name":"Southwest Hebian-To Settlement Portal","type":"Portal","wcid":12554,"cell":"E64B0000","place":"outdoor","ns":-41.5,"ew":82.24,"dest":{"cell":"EC49001D","place":"outdoor","ns":-43.14,"ew":87.22},"id":4543},
|
||||
{"name":"South Hebian-To Cottages Portal","type":"Portal","wcid":12550,"cell":"E64B0000","place":"outdoor","ns":-41.54,"ew":82.24,"dest":{"cell":"E348003C","place":"outdoor","ns":-44.0,"ew":80.41},"id":4544},
|
||||
|
|
@ -4558,9 +4558,9 @@
|
|||
{"name":"Tia-Leh Homestead Portal","type":"Portal","wcid":15198,"cell":"E64B0000","place":"outdoor","ns":-41.44,"ew":82.1,"dest":{"cell":"5BA2001B","place":"outdoor","ns":27.92,"ew":-28.78},"id":4552},
|
||||
{"name":"Arrowdale Cottages Portal","type":"Portal","wcid":15664,"cell":"E64B0000","place":"outdoor","ns":-41.4,"ew":82.13,"dest":{"cell":"D9D00024","place":"outdoor","ns":64.81,"ew":72.07},"id":4553},
|
||||
{"name":"Majestic Saddle Cottages Portal","type":"Portal","wcid":19152,"cell":"E64B0000","place":"outdoor","ns":-41.57,"ew":82.22,"dest":{"cell":"63B00017","place":"outdoor","ns":39.46,"ew":-22.48},"id":4554},
|
||||
{"name":"Queen's Burrow","type":"Portal","wcid":43587,"cell":"E6CE0102","place":"dungeon","dest":{"cell":"E5D30016","place":"outdoor","ns":67.45,"ew":81.49},"desc":"In a dungeon (landblock E6CE).","id":4555},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43550,"cell":"E6CF0025","place":"outdoor","ns":64.08,"ew":82.52,"dest":{"cell":"96D6003E","place":"outdoor","ns":69.75,"ew":18.79},"id":4556},
|
||||
{"name":"Queen's Burrow","type":"Portal","wcid":43588,"cell":"E6D20102","place":"dungeon","dest":{"cell":"E5D3001C","place":"outdoor","ns":67.23,"ew":81.62},"desc":"In a dungeon (landblock E6D2).","id":4557},
|
||||
{"name":"Queen's Burrow","type":"Portal","wcid":43587,"cell":"E6CE0102","place":"dungeon","dest":{"cell":"E5D30016","place":"outdoor","ns":67.45,"ew":81.49},"rules":["onlyOlthoi"],"desc":"In a dungeon (landblock E6CE).","id":4555},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43550,"cell":"E6CF0025","place":"outdoor","ns":64.08,"ew":82.52,"dest":{"cell":"96D6003E","place":"outdoor","ns":69.75,"ew":18.79},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"id":4556},
|
||||
{"name":"Queen's Burrow","type":"Portal","wcid":43588,"cell":"E6D20102","place":"dungeon","dest":{"cell":"E5D3001C","place":"outdoor","ns":67.23,"ew":81.62},"rules":["onlyOlthoi"],"desc":"In a dungeon (landblock E6D2).","id":4557},
|
||||
{"name":"Umbral Hall","type":"Portal","wcid":28263,"cell":"E7200103","place":"dungeon","dest":{"cell":"0179010D","place":"dungeon"},"minLevel":30,"desc":"In a dungeon (landblock E720).","id":4558},
|
||||
{"name":"Dark Mosswart Halls","type":"Portal","wcid":28259,"cell":"E7220100","place":"building","ns":-74.21,"ew":83.6,"dest":{"cell":"017801F5","place":"dungeon","name":"Dark Mosswart Halls"},"minLevel":30,"id":4559},
|
||||
{"name":"Blighted Disgusting Moarsman Tunnels","type":"Portal","wcid":38155,"cell":"E733000D","place":"outdoor","ns":-60.7,"ew":82.96,"dest":{"cell":"00C2037C","place":"dungeon","name":"Blighted Disgusting Moarsman Tunnels"},"minLevel":35,"id":4560},
|
||||
|
|
@ -4571,9 +4571,9 @@
|
|||
{"name":"Celestial Hand Gauntlet","type":"Portal","wcid":53446,"cell":"E74D003F","place":"outdoor","ns":-39.74,"ew":83.63,"dest":{"cell":"596B0118","place":"dungeon","name":"Radiant Blood Gauntlet"},"minLevel":180,"id":4565},
|
||||
{"name":"Effigy Foundry Portal","type":"Portal","wcid":19718,"cell":"E74E01A6","place":"building","ns":-39.41,"ew":83.14,"dest":{"cell":"545901B0","place":"dungeon","name":"Effigy Foundry"},"id":4566},
|
||||
{"name":"Hebian-to Meeting Hall Portal","type":"Portal","wcid":6095,"cell":"E74E01C9","place":"building","ns":-39.31,"ew":83.3,"dest":{"cell":"01240126","place":"dungeon","name":"Hebian-to Meeting Hall"},"id":4567},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"E74E0014","place":"outdoor","ns":-39.17,"ew":83.13,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4568},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43552,"cell":"E7D1003A","place":"outdoor","ns":65.39,"ew":83.6,"dest":{"cell":"9A210014","place":"outdoor","ns":-75.15,"ew":21.5},"id":4569},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"E822003D","place":"outdoor","ns":-74.31,"ew":84.41,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4570},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"E74E0014","place":"outdoor","ns":-39.17,"ew":83.13,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4568},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43552,"cell":"E7D1003A","place":"outdoor","ns":65.39,"ew":83.6,"dest":{"cell":"9A210014","place":"outdoor","ns":-75.15,"ew":21.5},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"id":4569},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"E822003D","place":"outdoor","ns":-74.31,"ew":84.41,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4570},
|
||||
{"name":"Hebian-to Sewers","type":"Portal","wcid":1599,"cell":"E84E0000","place":"outdoor","ns":-38.77,"ew":83.81,"dest":{"cell":"01CA027F","place":"dungeon","name":"Hebian-to Sewers"},"minLevel":4,"id":4571},
|
||||
{"name":"Tusker Assault","type":"Portal","wcid":22659,"cell":"E87A0000","place":"outdoor","ns":-3.89,"ew":84.26,"dest":{"cell":"584902C8","place":"dungeon","name":"Tusker Assault"},"minLevel":85,"id":4572},
|
||||
{"name":"Effigy Foundry Portal","type":"Portal","wcid":19718,"cell":"E9220140","place":"building","ns":-74.27,"ew":84.63,"dest":{"cell":"545901B0","place":"dungeon","name":"Effigy Foundry"},"id":4573},
|
||||
|
|
@ -4613,7 +4613,7 @@
|
|||
{"name":"Exit","type":"Portal","wcid":5520,"cell":"F15A0102","place":"building","ns":-29.6,"ew":91.31,"dest":{"cell":"F25B0002","place":"outdoor","ns":-28.97,"ew":91.7},"id":4607},
|
||||
{"name":"Smugglers Hideaway","type":"Portal","wcid":5501,"cell":"F15A0000","place":"outdoor","ns":-29.52,"ew":91.38,"dest":{"cell":"014E025C","place":"dungeon","name":"Smugglers Hideaway"},"id":4608},
|
||||
{"name":"Mammet Foundry Portal","type":"Portal","wcid":19716,"cell":"F2220121","place":"building","ns":-74.12,"ew":92.31,"dest":{"cell":"5458025F","place":"dungeon","name":"Mammet Foundry"},"id":4609},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"F2220030","place":"outdoor","ns":-73.96,"ew":92.19,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4610},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"F2220030","place":"outdoor","ns":-73.96,"ew":92.19,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4610},
|
||||
{"name":"Smugglers Fort","type":"Portal","wcid":5519,"cell":"F25B0102","place":"building","ns":-29.08,"ew":91.7,"dest":{"cell":"F15A0024","place":"outdoor","ns":-29.56,"ew":91.32},"id":4611},
|
||||
{"name":"Tusker Pits","type":"Portal","wcid":22690,"cell":"F2800000","place":"outdoor","ns":1.21,"ew":91.79,"dest":{"cell":"5A4A0275","place":"dungeon","name":"Tusker Pits"},"minLevel":45,"id":4612},
|
||||
{"name":"Moars","type":"Portal","wcid":8598,"cell":"F3270100","place":"dungeon","dest":{"cell":"02BA01F8","place":"dungeon"},"desc":"In a dungeon (landblock F327).","id":4613},
|
||||
|
|
@ -4629,7 +4629,7 @@
|
|||
{"name":"Jungle Shadows","type":"Portal","wcid":8497,"cell":"F5280102","place":"dungeon","dest":{"cell":"02BB0197","place":"dungeon"},"desc":"In a dungeon (landblock F528).","id":4623},
|
||||
{"name":"Moars Laboratory","type":"Portal","wcid":8600,"cell":"F5290102","place":"building","ns":-68.37,"ew":94.4,"dest":{"cell":"02B301F6","place":"dungeon","name":"Moars Laboratory"},"id":4624},
|
||||
{"name":"Haven Residential Halls Portal","type":"Portal","wcid":21464,"cell":"F559003B","place":"outdoor","ns":-30.49,"ew":94.79,"dest":{"cell":"56560140","place":"dungeon","name":"Haven Residential Halls"},"id":4625},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"F559003D","place":"outdoor","ns":-30.28,"ew":94.77,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4626},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":43067,"cell":"F559003D","place":"outdoor","ns":-30.28,"ew":94.77,"dest":{"cell":"00070156","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4626},
|
||||
{"name":"Ong-Hau Village Portal","type":"Portal","wcid":14655,"cell":"F559002C","place":"outdoor","ns":-30.45,"ew":94.56,"dest":{"cell":"EC450025","place":"outdoor","ns":-46.26,"ew":87.3},"id":4627},
|
||||
{"name":"Dryreach Beach Cottages Portal","type":"Portal","wcid":12487,"cell":"F559002B","place":"outdoor","ns":-30.49,"ew":94.56,"dest":{"cell":"DF6F003C","place":"outdoor","ns":-12.83,"ew":77.17},"id":4628},
|
||||
{"name":"Snowy Valley Portal","type":"Portal","wcid":13130,"cell":"F559002B","place":"outdoor","ns":-30.47,"ew":94.57,"dest":{"cell":"74EA0019","place":"outdoor","ns":85.33,"ew":-8.83},"id":4629},
|
||||
|
|
@ -4640,14 +4640,14 @@
|
|||
{"name":"Tou-Tou Road Villas Portal","type":"Portal","wcid":13137,"cell":"F5590023","place":"outdoor","ns":-30.49,"ew":94.52,"dest":{"cell":"F14A0006","place":"outdoor","ns":-42.21,"ew":90.93},"id":4634},
|
||||
{"name":"Ariake Portal","type":"Portal","wcid":12472,"cell":"F5590023","place":"outdoor","ns":-30.5,"ew":94.54,"dest":{"cell":"DF6A0035","place":"outdoor","ns":-16.69,"ew":77.07},"id":4635},
|
||||
{"name":"The Shadows","type":"Portal","wcid":43865,"cell":"F55A0103","place":"dungeon","dest":{"cell":"7E020325","place":"dungeon"},"minLevel":200,"desc":"In a dungeon (landblock F55A).","id":4636},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43561,"cell":"F65D0102","place":"dungeon","dest":{"cell":"E3D3000F","place":"outdoor","ns":67.46,"ew":79.81},"desc":"In a dungeon (landblock F65D).","id":4637},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43561,"cell":"F65D0102","place":"dungeon","dest":{"cell":"E3D3000F","place":"outdoor","ns":67.46,"ew":79.81},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"desc":"In a dungeon (landblock F65D).","id":4637},
|
||||
{"name":"Tusker Abode","type":"Portal","wcid":22654,"cell":"F67B0000","place":"outdoor","ns":-3.16,"ew":94.97,"dest":{"cell":"5C450384","place":"dungeon","name":"Tusker Abode"},"minLevel":20,"id":4638},
|
||||
{"name":"Tusker Quarters","type":"Portal","wcid":22692,"cell":"F67C0000","place":"outdoor","ns":-2.26,"ew":95.6,"dest":{"cell":"5B4A0210","place":"dungeon","name":"Tusker Quarters"},"minLevel":30,"id":4639},
|
||||
{"name":"Tusker Freehold","type":"Portal","wcid":22672,"cell":"F67D0000","place":"outdoor","ns":-1.58,"ew":95.54,"dest":{"cell":"58480128","place":"dungeon","name":"Tusker Freehold"},"minLevel":25,"id":4640},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"F6820033","place":"outdoor","ns":2.31,"ew":95.46,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4641},
|
||||
{"name":"Portal to Town Network","type":"Portal","wcid":42852,"cell":"F6820033","place":"outdoor","ns":2.31,"ew":95.46,"dest":{"cell":"00070145","place":"dungeon","name":"Town Network"},"rules":["noOlthoi"],"desc":"This portal goes to the Town Network, a place which connects many of the towns of Dereth.","id":4641},
|
||||
{"name":"Ancient Cloister","type":"Portal","wcid":38730,"cell":"F7180100","place":"dungeon","dest":{"cell":"00EB014E","place":"dungeon"},"minLevel":150,"quest":true,"desc":"In a dungeon (landblock F718).","id":4642},
|
||||
{"name":"Ithaenc Archipelago","type":"Portal","wcid":38075,"cell":"F7300104","place":"building","ns":-63.1,"ew":96.0,"dest":{"cell":"EE18001A","place":"outdoor","ns":-82.57,"ew":88.8},"id":4643},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43591,"cell":"F7300128","place":"building","ns":-62.76,"ew":96.2,"dest":{"cell":"E4CF000D","place":"outdoor","ns":64.1,"ew":80.6},"id":4644},
|
||||
{"name":"Olthoi Tunnel","type":"Portal","wcid":43591,"cell":"F7300128","place":"building","ns":-62.76,"ew":96.2,"dest":{"cell":"E4CF000D","place":"outdoor","ns":64.1,"ew":80.6},"rules":["noPKLite","noNPK","noVitae","noNewAccounts"],"id":4644},
|
||||
{"name":"Damp Caverns Portal","type":"Portal","wcid":5503,"cell":"F7570000","place":"outdoor","ns":-31.72,"ew":96.03,"dest":{"cell":"014D0191","place":"dungeon","name":"Damp Caverns"},"minLevel":5,"id":4645},
|
||||
{"name":"Shadowy Refuge","type":"Portal","wcid":45726,"cell":"F75D0020","place":"outdoor","ns":-26.77,"ew":96.01,"dest":{"cell":"576E0187","place":"dungeon","name":"Shadowy Refuge"},"minLevel":150,"quest":true,"id":4646},
|
||||
{"name":"Tusker Habitat","type":"Portal","wcid":22678,"cell":"F77E0000","place":"outdoor","ns":-0.51,"ew":95.87,"dest":{"cell":"5B470177","place":"dungeon","name":"Tusker Habitat"},"minLevel":25,"id":4647},
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue