feat: Adds AdvancedSearch (XmlFind) (#1649)
### Summary Adds Advanced Search (XmlFind) using `[AS` command. Notable differences from XmlFind: * No save to file. * No "Display from" option (might add that later). * No advanced XmlSpawner property test syntax. Only basic property operator comparisons. * This version will freeze your shard, but fans out to all processors just like world saves. (So it should be stupid fast, especially if you have lots of cores) * Does not support spawn entry/type/error searching. We have a spawn search command to do that already. * I haven't set up correct "defaults" for the options when you first open it. I'll do that later. ### Screenshots <img width="575" alt="image" src="https://github.com/modernuo/ModernUO/assets/3953314/2b08e586-0ea6-41c4-b7cd-f70e2ee62b86"> <img width="575" alt="image" src="https://github.com/modernuo/ModernUO/assets/3953314/da3f16b9-6a9e-4d2c-9d93-6cdfa67b4ddc"> <img width="572" alt="image" src="https://github.com/modernuo/ModernUO/assets/3953314/ae1d0a3f-a30d-497c-99ea-2cc988147f8f">
This commit is contained in:
parent
fe6e9dfe5c
commit
fbbc407954
10 changed files with 2129 additions and 0 deletions
|
|
@ -0,0 +1,39 @@
|
|||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.AdvancedSearch;
|
||||
|
||||
public class AdvancedSearchConfirmBringGump : AdvancedSearchWarningGump
|
||||
{
|
||||
private readonly AdvancedSearchGump _gump;
|
||||
|
||||
public AdvancedSearchConfirmBringGump(AdvancedSearchGump gump, int count) : base(
|
||||
"Bring selected objects",
|
||||
30720,
|
||||
$"Bring {count} objects?",
|
||||
0xFFC000,
|
||||
480,
|
||||
360
|
||||
) => _gump = gump;
|
||||
|
||||
protected override void OnClickResponse(NetState sender, bool okay)
|
||||
{
|
||||
var from = sender.Mobile;
|
||||
var loc = from.Location;
|
||||
var map = from.Map;
|
||||
|
||||
if (okay && _gump.SearchResults != null)
|
||||
{
|
||||
for (var i = 0; i < _gump.SearchResults.Length; i++)
|
||||
{
|
||||
var entry = _gump.SearchResults[i];
|
||||
|
||||
if (entry.Selected)
|
||||
{
|
||||
entry.Entity?.MoveToWorld(loc, map);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_gump.Resend(from);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue