#W# Change: [Go menu now uses 1 file Data/go.json. It also excepts a 'map' destination.
This commit is contained in:
parent
3aeeb3705b
commit
6388a96fa9
23 changed files with 519 additions and 38 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -14,6 +14,7 @@
|
|||
/Distribution/Backups
|
||||
/Distribution/Saves
|
||||
/Distribution/docs
|
||||
/Distribution/Client
|
||||
/docs/
|
||||
/Distribution/temp
|
||||
/Distribution/*.dylib
|
||||
|
|
|
|||
128
Distribution/Configuration/FeatureFlags/flags.json
Normal file
128
Distribution/Configuration/FeatureFlags/flags.json
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
[
|
||||
{
|
||||
"Key": "player_trading",
|
||||
"Description": "Allow secure trades between players",
|
||||
"Enabled": true,
|
||||
"DefaultEnabled": true,
|
||||
"Category": "Economy",
|
||||
"LastModified": "2026-09-21T12:58:21.3413169Z",
|
||||
"LastModifiedBy": "System"
|
||||
},
|
||||
{
|
||||
"Key": "pvp_combat",
|
||||
"Description": "Allow player vs player combat",
|
||||
"Enabled": true,
|
||||
"DefaultEnabled": true,
|
||||
"Category": "Combat",
|
||||
"LastModified": "2026-09-21T12:58:21.3413169Z",
|
||||
"LastModifiedBy": "System"
|
||||
},
|
||||
{
|
||||
"Key": "bank_access",
|
||||
"Description": "Allow players to access their bank boxes",
|
||||
"Enabled": true,
|
||||
"DefaultEnabled": true,
|
||||
"Category": "Economy",
|
||||
"LastModified": "2026-09-21T12:58:21.3413169Z",
|
||||
"LastModifiedBy": "System"
|
||||
},
|
||||
{
|
||||
"Key": "speedhack_detection",
|
||||
"Description": "Enable speedhack detection",
|
||||
"Enabled": false,
|
||||
"DefaultEnabled": false,
|
||||
"Category": "System",
|
||||
"LastModified": "2026-09-21T12:58:21.3413169Z",
|
||||
"LastModifiedBy": "System"
|
||||
},
|
||||
{
|
||||
"Key": "insurance",
|
||||
"Description": "Enable item insurance",
|
||||
"Enabled": false,
|
||||
"DefaultEnabled": false,
|
||||
"Category": "Economy",
|
||||
"LastModified": "2026-09-21T12:58:21.3413169Z",
|
||||
"LastModifiedBy": "System"
|
||||
},
|
||||
{
|
||||
"Key": "vendor_purchase",
|
||||
"Description": "Allow purchasing from NPC vendors",
|
||||
"Enabled": true,
|
||||
"DefaultEnabled": true,
|
||||
"Category": "Economy",
|
||||
"LastModified": "2026-09-21T12:58:21.3413169Z",
|
||||
"LastModifiedBy": "System"
|
||||
},
|
||||
{
|
||||
"Key": "vendor_sell",
|
||||
"Description": "Allow selling to NPC vendors",
|
||||
"Enabled": true,
|
||||
"DefaultEnabled": true,
|
||||
"Category": "Economy",
|
||||
"LastModified": "2026-09-21T12:58:21.3413169Z",
|
||||
"LastModifiedBy": "System"
|
||||
},
|
||||
{
|
||||
"Key": "player_vendors",
|
||||
"Description": "Allow player vendor interactions",
|
||||
"Enabled": true,
|
||||
"DefaultEnabled": true,
|
||||
"Category": "Economy",
|
||||
"LastModified": "2026-09-21T12:58:21.3413169Z",
|
||||
"LastModifiedBy": "System"
|
||||
},
|
||||
{
|
||||
"Key": "house_placement",
|
||||
"Description": "Allow new house placements",
|
||||
"Enabled": true,
|
||||
"DefaultEnabled": true,
|
||||
"Category": "Housing",
|
||||
"LastModified": "2026-09-21T12:58:21.3413169Z",
|
||||
"LastModifiedBy": "System"
|
||||
},
|
||||
{
|
||||
"Key": "boat_placement",
|
||||
"Description": "Allow new boat placements",
|
||||
"Enabled": true,
|
||||
"DefaultEnabled": true,
|
||||
"Category": "Housing",
|
||||
"LastModified": "2026-09-21T12:58:21.3413169Z",
|
||||
"LastModifiedBy": "System"
|
||||
},
|
||||
{
|
||||
"Key": "bulk_orders",
|
||||
"Description": "Allow bulk order deeds",
|
||||
"Enabled": true,
|
||||
"DefaultEnabled": true,
|
||||
"Category": "Crafting",
|
||||
"LastModified": "2026-09-21T12:58:21.3413169Z",
|
||||
"LastModifiedBy": "System"
|
||||
},
|
||||
{
|
||||
"Key": "passive_detect_hidden",
|
||||
"Description": "Enable passive detect hidden",
|
||||
"Enabled": true,
|
||||
"DefaultEnabled": true,
|
||||
"Category": "System",
|
||||
"LastModified": "2026-09-21T12:58:21.3413169Z",
|
||||
"LastModifiedBy": "System"
|
||||
},
|
||||
{
|
||||
"Key": "young_player_system",
|
||||
"Description": "Enable the young player system",
|
||||
"Enabled": true,
|
||||
"DefaultEnabled": true,
|
||||
"Category": "System",
|
||||
"LastModified": "2026-09-21T12:58:21.3413169Z",
|
||||
"LastModifiedBy": "System"
|
||||
},
|
||||
{
|
||||
"Key": "bitmap_pathfinding_cache",
|
||||
"Description": "Enable the bitmap pathfinding cache",
|
||||
"Enabled": true,
|
||||
"DefaultEnabled": true,
|
||||
"Category": "Performance",
|
||||
"LastModified": "2026-09-21T12:58:21.3413169Z",
|
||||
"LastModifiedBy": "System"
|
||||
}
|
||||
]
|
||||
1
Distribution/Configuration/FeatureFlags/gump-blocks.json
Normal file
1
Distribution/Configuration/FeatureFlags/gump-blocks.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
[]
|
||||
1
Distribution/Configuration/FeatureFlags/item-blocks.json
Normal file
1
Distribution/Configuration/FeatureFlags/item-blocks.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
[]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[]
|
||||
|
|
@ -0,0 +1 @@
|
|||
[]
|
||||
66
Distribution/Configuration/antimacro.json
Normal file
66
Distribution/Configuration/antimacro.json
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
"Allowance": 3,
|
||||
"LocationSize": 5,
|
||||
"Enabled": false,
|
||||
"Expire": "00:05:00",
|
||||
"SkillsThatUseAntiMacro": {
|
||||
"Alchemy": false,
|
||||
"Anatomy": true,
|
||||
"AnimalLore": true,
|
||||
"ItemID": true,
|
||||
"ArmsLore": true,
|
||||
"Parry": false,
|
||||
"Begging": true,
|
||||
"Blacksmith": false,
|
||||
"Fletching": false,
|
||||
"Peacemaking": true,
|
||||
"Camping": true,
|
||||
"Carpentry": false,
|
||||
"Cartography": false,
|
||||
"Cooking": false,
|
||||
"DetectHidden": true,
|
||||
"Discordance": true,
|
||||
"EvalInt": true,
|
||||
"Healing": true,
|
||||
"Fishing": true,
|
||||
"Forensics": true,
|
||||
"Herding": true,
|
||||
"Hiding": true,
|
||||
"Provocation": true,
|
||||
"Inscribe": false,
|
||||
"Lockpicking": true,
|
||||
"Magery": true,
|
||||
"MagicResist": true,
|
||||
"Tactics": false,
|
||||
"Snooping": true,
|
||||
"Musicianship": true,
|
||||
"Poisoning": true,
|
||||
"Archery": false,
|
||||
"SpiritSpeak": true,
|
||||
"Stealing": true,
|
||||
"Tailoring": false,
|
||||
"AnimalTaming": true,
|
||||
"TasteID": true,
|
||||
"Tinkering": false,
|
||||
"Tracking": true,
|
||||
"Veterinary": true,
|
||||
"Swords": false,
|
||||
"Macing": false,
|
||||
"Fencing": false,
|
||||
"Wrestling": false,
|
||||
"Lumberjacking": true,
|
||||
"Mining": true,
|
||||
"Meditation": true,
|
||||
"Stealth": true,
|
||||
"RemoveTrap": true,
|
||||
"Necromancy": true,
|
||||
"Focus": false,
|
||||
"Chivalry": true,
|
||||
"Bushido": true,
|
||||
"Ninjitsu": true,
|
||||
"Spellweaving": true,
|
||||
"Mysticism": true,
|
||||
"Imbuing": true,
|
||||
"Throwing": false
|
||||
}
|
||||
}
|
||||
33
Distribution/Configuration/assistants.json
Normal file
33
Distribution/Configuration/assistants.json
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"warnOnFailure": true,
|
||||
"kickOnFailure": true,
|
||||
"disallowedFeatures": {
|
||||
"FilterWeather": false,
|
||||
"FilterLight": false,
|
||||
"SmartTarget": false,
|
||||
"RangedTarget": false,
|
||||
"AutoOpenDoors": false,
|
||||
"DequipOnCast": false,
|
||||
"AutoPotionEquip": false,
|
||||
"PoisonedChecks": false,
|
||||
"LoopedMacros": false,
|
||||
"UseOnceAgent": false,
|
||||
"RestockAgent": false,
|
||||
"SellAgent": false,
|
||||
"BuyAgent": false,
|
||||
"PotionHotkeys": false,
|
||||
"RandomTargets": false,
|
||||
"ClosestTargets": false,
|
||||
"OverheadHealth": false,
|
||||
"AutolootAgent": false,
|
||||
"BoneCutterAgent": false,
|
||||
"JScriptMacros": false,
|
||||
"AutoRemount": false,
|
||||
"AutoBandage": false,
|
||||
"EnemyTargetShare": false,
|
||||
"FilterSeason": false,
|
||||
"SpellTargetShare": false
|
||||
},
|
||||
"disconnectDelay": "00:00:15",
|
||||
"warningMessage": "The server was unable to negotiate features with your assistant. You must download and run an updated version of <A HREF=\"https://uosteam.com\">UOSteam</A> or <A HREF=\"https://github.com/markdwags/Razor/releases/latest\">Razor</A>.<BR><BR>Make sure you've checked the option <B>Negotiate features with server</B>, once you have this box checked you may log in and play normally.<BR><BR>You will be disconnected shortly."
|
||||
}
|
||||
5
Distribution/Configuration/auto-denylist.json
Normal file
5
Distribution/Configuration/auto-denylist.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"enabled": true,
|
||||
"duration": "00:15:00",
|
||||
"maxEntries": 324449
|
||||
}
|
||||
6
Distribution/Configuration/bans.json
Normal file
6
Distribution/Configuration/bans.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"reportRateLimitTrips": true,
|
||||
"autoBanDuration": "04:00:00",
|
||||
"reportBadConnects": true,
|
||||
"badConnectDuration": "04:00:00"
|
||||
}
|
||||
8
Distribution/Configuration/blocklist.json
Normal file
8
Distribution/Configuration/blocklist.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"enabled": false,
|
||||
"file": "Configuration/ip-blocklist.txt",
|
||||
"reloadInterval": "00:01:00",
|
||||
"reportHits": true,
|
||||
"banDuration": "06:00:00",
|
||||
"promoteSuppression": "00:01:00"
|
||||
}
|
||||
9
Distribution/Configuration/crowdsec.json
Normal file
9
Distribution/Configuration/crowdsec.json
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"lapiUrl": "http://127.0.0.1:8080",
|
||||
"machineId": "",
|
||||
"password": "",
|
||||
"origin": "modernuo",
|
||||
"manualBanDuration": "7.00:00:00",
|
||||
"flushInterval": "00:00:01",
|
||||
"maxQueue": 10000
|
||||
}
|
||||
15
Distribution/Configuration/email-settings.json
Normal file
15
Distribution/Configuration/email-settings.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"enabled": false,
|
||||
"fromAddress": "support@modernuo.com",
|
||||
"fromName": "ModernUO Team",
|
||||
"crashAddress": "crashes@modernuo.com",
|
||||
"crashName": "Crash Log",
|
||||
"speechLogPageAddress": "support@modernuo.com",
|
||||
"speechLogPageName": "GM Support Conversation",
|
||||
"emailServer": "smtp.gmail.com",
|
||||
"emailPort": 465,
|
||||
"emailUsername": "support@modernuo.com",
|
||||
"emailPassword": "Some Password 123",
|
||||
"emailSendRetryCount": 5,
|
||||
"emailSendRetryDelay": 3
|
||||
}
|
||||
79
Distribution/Configuration/expansion.json
Normal file
79
Distribution/Configuration/expansion.json
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
"Id": 2,
|
||||
"Name": "Renaissance",
|
||||
"ClientFlags": "Trammel",
|
||||
"SupportedFeatures": {
|
||||
"ExpansionT2A": true,
|
||||
"T2A": true,
|
||||
"UOR": true,
|
||||
"UOTD": false,
|
||||
"LBR": false,
|
||||
"AOS": false,
|
||||
"SixthCharacterSlot": false,
|
||||
"SE": false,
|
||||
"ML": false,
|
||||
"EighthAge": false,
|
||||
"NinthAge": false,
|
||||
"TenthAge": false,
|
||||
"IncreasedStorage": false,
|
||||
"SeventhCharacterSlot": false,
|
||||
"RoleplayFaces": false,
|
||||
"TrialAccount": false,
|
||||
"LiveAccount": false,
|
||||
"SA": false,
|
||||
"HS": false,
|
||||
"Gothic": false,
|
||||
"Rustic": false,
|
||||
"Jungle": false,
|
||||
"Shadowguard": false,
|
||||
"TOL": false,
|
||||
"EJ": false
|
||||
},
|
||||
"CharacterListFlags": {
|
||||
"Unk1": false,
|
||||
"OverwriteConfigButton": false,
|
||||
"OneCharacterSlot": false,
|
||||
"ExpansionNone": true,
|
||||
"ExpansionUOTD": true,
|
||||
"ExpansionLBR": true,
|
||||
"ExpansionT2A": true,
|
||||
"ExpansionUOR": true,
|
||||
"ContextMenus": true,
|
||||
"SlotLimit": false,
|
||||
"AOS": false,
|
||||
"SixthCharacterSlot": false,
|
||||
"SE": false,
|
||||
"ML": false,
|
||||
"KR": false,
|
||||
"UO3DClientType": false,
|
||||
"Unk3": false,
|
||||
"SeventhCharacterSlot": false,
|
||||
"Unk4": false,
|
||||
"NewMovementSystem": false,
|
||||
"NewFeluccaAreas": false
|
||||
},
|
||||
"HousingFlags": {
|
||||
"AOS": false,
|
||||
"HousingAOS": false,
|
||||
"SE": false,
|
||||
"ML": false,
|
||||
"Crystal": false,
|
||||
"SA": false,
|
||||
"HS": false,
|
||||
"Gothic": false,
|
||||
"Rustic": false,
|
||||
"Jungle": false,
|
||||
"Shadowguard": false,
|
||||
"TOL": false,
|
||||
"EJ": false
|
||||
},
|
||||
"MobileStatusVersion": 3,
|
||||
"MapSelectionFlags": {
|
||||
"Felucca": true,
|
||||
"Trammel": true,
|
||||
"Ilshenar": false,
|
||||
"Malas": false,
|
||||
"Tokuno": false,
|
||||
"TerMur": false
|
||||
}
|
||||
}
|
||||
3
Distribution/Configuration/firewall.json
Normal file
3
Distribution/Configuration/firewall.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"entries": []
|
||||
}
|
||||
7
Distribution/Configuration/ip-allowlist.json
Normal file
7
Distribution/Configuration/ip-allowlist.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"enabled": false,
|
||||
"files": [
|
||||
"Configuration/ip-allowlist*.txt"
|
||||
],
|
||||
"reloadInterval": "00:01:00"
|
||||
}
|
||||
8
Distribution/Configuration/login-allowlist.json
Normal file
8
Distribution/Configuration/login-allowlist.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"enabled": true,
|
||||
"file": "Configuration/login-allowlist.txt",
|
||||
"ttl": "90.00:00:00",
|
||||
"flushInterval": "01:00:00",
|
||||
"escalateAfterStrikes": 10,
|
||||
"strikeWindow": "01:00:00"
|
||||
}
|
||||
107
Distribution/Configuration/modernuo.json
Normal file
107
Distribution/Configuration/modernuo.json
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
{
|
||||
"assemblyDirectories": [
|
||||
"./Assemblies"
|
||||
],
|
||||
"dataDirectories": [
|
||||
"Client"
|
||||
],
|
||||
"listeners": [
|
||||
"0.0.0.0:2593"
|
||||
],
|
||||
"settings": {
|
||||
"accountHandler.enableAutoAccountCreation": "True",
|
||||
"accountHandler.enablePlayerPasswordCommand": "False",
|
||||
"accountHandler.maxAccountsPerIP": "1",
|
||||
"accountSecurity.encryptionAlgorithm": "Argon2",
|
||||
"assistants.enableNegotiation": "False",
|
||||
"autoArchive.archiveLocally": "True",
|
||||
"autoArchive.archivePath": "Archives",
|
||||
"autoArchive.backupMaxAge": "30",
|
||||
"autoArchive.backupPath": "Backups",
|
||||
"autoArchive.compressionLevel": "3",
|
||||
"autoArchive.dailyRetention": "30",
|
||||
"autoArchive.enableArchivePruning": "True",
|
||||
"autoArchive.hourlyRetention": "24",
|
||||
"autoArchive.monthlyRetention": "12",
|
||||
"autoArchive.retryCount": "3",
|
||||
"autoArchive.retryDelayMs": "500",
|
||||
"autoArchive.verifyArchives": "True",
|
||||
"autosave.enabled": "True",
|
||||
"autosave.saveDelay": "00:05:00",
|
||||
"autosave.warningDelay": "00:00:00",
|
||||
"buffIcons.enable": "False",
|
||||
"bulletinboards.creationTimeDelay": "00:02:00",
|
||||
"bulletinboards.expireDuration": "06:00:00",
|
||||
"bulletinboards.replyDelay": "00:00:30",
|
||||
"chat.enabled": "False",
|
||||
"clientVerification.ageLeniency": "10.00:00:00",
|
||||
"clientVerification.enable": "True",
|
||||
"clientVerification.gameTimeLeniency": "1.01:00:00",
|
||||
"clientVerification.invalidClientResponse": "Kick",
|
||||
"clientVerification.kickDelay": "00:00:20",
|
||||
"commandsystem.prefix": "[",
|
||||
"crashGuard.enabled": "True",
|
||||
"crashGuard.generateReport": "True",
|
||||
"crashGuard.restartServer": "True",
|
||||
"crashGuard.saveBackup": "True",
|
||||
"ethics.enable": "False",
|
||||
"houseDecay.enable": "True",
|
||||
"movement.delay.runFoot": "200",
|
||||
"movement.delay.runMount": "100",
|
||||
"movement.delay.turn": "0",
|
||||
"movement.delay.walkFoot": "400",
|
||||
"movement.delay.walkMount": "200",
|
||||
"movementThrottle.definiteRateThreshold": "1.100000023841858",
|
||||
"movementThrottle.hardQueueLimit": "10",
|
||||
"movementThrottle.maxChainGap": "2000",
|
||||
"movementThrottle.maxCredit": "200",
|
||||
"movementThrottle.maxRttBonus": "150",
|
||||
"movementThrottle.minSamplesForRate": "8",
|
||||
"movementThrottle.movementHistorySize": "20",
|
||||
"movementThrottle.speedHackNotificationCooldown": "300000",
|
||||
"movementThrottle.suspiciousRateThreshold": "1.0499999523162842",
|
||||
"murderSystem.bountiesEnabled": "True",
|
||||
"murderSystem.bountyExpiry": "14.00:00:00",
|
||||
"murderSystem.longTermMurderDuration": "1.16:00:00",
|
||||
"murderSystem.recentlyReportedDelay": "00:10:00",
|
||||
"murderSystem.shortTermMurderDuration": "08:00:00",
|
||||
"network.initialBufferSlabs": "1",
|
||||
"network.maxBufferSlabs": "128",
|
||||
"network.maxOutstandingSends": "32",
|
||||
"network.memoryCeilingPercent": "80",
|
||||
"network.sendBufferGrowthBudget": "268435456",
|
||||
"network.sendBufferMaxSize": "2097152",
|
||||
"network.sendBufferSize": "262144",
|
||||
"pages.discordWebhookUrl": null,
|
||||
"pathfinding.enable": "True",
|
||||
"pathfinding.maxResidentChunks": "8192",
|
||||
"pathfinding.maxSearchNodes": "1000",
|
||||
"pathfinding.prebakeMaps": "False",
|
||||
"pathfinding.recorder.enable": "False",
|
||||
"pathfinding.recorder.path": "/home/warrentyexpired/Projects/SovereignRealm/Server/Distribution/Data/Pathfinding/recordings/pathfinds.jsonl",
|
||||
"pingServer.enabled": "True",
|
||||
"questSystem.enableMLQuests": "False",
|
||||
"serverListing.address": null,
|
||||
"serverListing.autoDetect": "True",
|
||||
"serverListing.serverName": "Sovereign Realm",
|
||||
"stamina.additionalLossWhenBelow": "0.1",
|
||||
"stamina.baseOverweightLoss": "5",
|
||||
"stamina.cannotRunWhenFatigued": "True",
|
||||
"stamina.cannotWalkWhenFatigued": "False",
|
||||
"stamina.enableMountStamina": "True",
|
||||
"stamina.stonesOverweightAllowance": "4",
|
||||
"stamina.stonesPerOverweightLoss": "25",
|
||||
"stats.gainChanceMultiplier": "1",
|
||||
"stats.statMax": "100",
|
||||
"testCenter.enable": "False",
|
||||
"timer.initialPoolCapacity": "1024",
|
||||
"timer.maxPoolCapacity": "16384",
|
||||
"uogateway.enabled": "True",
|
||||
"vetRewards.enable": "True",
|
||||
"vetRewards.rewardInterval": "30.00:00:00",
|
||||
"vetRewards.skillCapRewards": "True",
|
||||
"world.enableAutoRestart": "False",
|
||||
"world.savePath": "Saves",
|
||||
"world.useMultithreadedSaves": "True"
|
||||
}
|
||||
}
|
||||
6
Distribution/Configuration/throttles.json
Normal file
6
Distribution/Configuration/throttles.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"0x03": 25,
|
||||
"0x12": 25,
|
||||
"0x75": 500,
|
||||
"0xAD": 25
|
||||
}
|
||||
11
Distribution/Data/go.json
Normal file
11
Distribution/Data/go.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "The World",
|
||||
"categories": [
|
||||
{ "name": "Fel", "categories": [
|
||||
{ "name": "Towns", "locations": [
|
||||
{ "name": "Brit Fel", "location": [1592, 1680, 10], "map": "Felucca" } ] } ] },
|
||||
{ "name": "Tram", "categories": [
|
||||
{ "name": "Towns", "locations": [
|
||||
{ "name": "Brit Tram", "location": [1592, 1680, 10], "map": "Trammel" } ] } ] }
|
||||
]
|
||||
}
|
||||
|
|
@ -159,10 +159,23 @@ public class GoGump : DynamicGump
|
|||
index -= _node.Categories.Length;
|
||||
if (index < _node.Locations.Length)
|
||||
{
|
||||
from.MoveToWorld(_node.Locations[index].Location, _tree.Map);
|
||||
//from.MoveToWorld(_node.Locations[index].Location, _tree.Map);
|
||||
var loc = _node.Locations[index];
|
||||
Map targetMap = _tree.Map;
|
||||
if (!string.IsNullOrEmpty(loc.MapName))
|
||||
{
|
||||
foreach (Map m in Map.AllMaps)
|
||||
{
|
||||
if (m != null && string.Equals(m.Name, loc.MapName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
targetMap = m;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
from.MoveToWorld(loc.Location, targetMap);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,4 +9,6 @@ public class GoLocation
|
|||
[JsonPropertyName("name")] public string Name { get; set; }
|
||||
|
||||
[JsonPropertyName("location")] public Point3D Location { get; set; }
|
||||
}
|
||||
|
||||
[JsonPropertyName("map")] public string MapName { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,48 +11,18 @@ public static class GoLocations
|
|||
{
|
||||
private static readonly ILogger logger = LogFactory.GetLogger(typeof(GoLocations));
|
||||
|
||||
private static LocationTree _felucca;
|
||||
private static LocationTree _trammel;
|
||||
private static LocationTree _ilshenar;
|
||||
private static LocationTree _malas;
|
||||
private static LocationTree _tokuno;
|
||||
private static LocationTree _terMur;
|
||||
private static LocationTree _world;
|
||||
|
||||
public static LocationTree GetLocations(Map map)
|
||||
{
|
||||
if (map == Map.Ilshenar)
|
||||
{
|
||||
return _ilshenar ??= LoadLocations("ilshenar", Map.Ilshenar);
|
||||
}
|
||||
|
||||
if (map == Map.TerMur)
|
||||
{
|
||||
return _terMur ??= LoadLocations("termur", Map.TerMur);
|
||||
}
|
||||
|
||||
if (map == Map.Trammel)
|
||||
{
|
||||
return _trammel ??= LoadLocations("trammel", Map.Trammel);
|
||||
}
|
||||
|
||||
if (map == Map.Malas)
|
||||
{
|
||||
return _malas ??= LoadLocations("malas", Map.Malas);
|
||||
}
|
||||
|
||||
if (map == Map.Tokuno)
|
||||
{
|
||||
return _tokuno ??= LoadLocations("tokuno", Map.Tokuno);
|
||||
}
|
||||
|
||||
return _felucca ??= LoadLocations("felucca", Map.Felucca);
|
||||
// Always return the same world tree, regardless of which map 'GetLocations' is called with
|
||||
return _world ??= LoadLocations("go", Map.Felucca);
|
||||
}
|
||||
|
||||
private static LocationTree LoadLocations(string fileName, Map map)
|
||||
{
|
||||
var lastBranch = new Dictionary<Mobile, GoCategory>();
|
||||
|
||||
var path = Path.Combine($"Data/Locations/{fileName}.json");
|
||||
var path = Path.Combine($"Data/{fileName}.json");
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -67,7 +37,7 @@ public static class GoLocations
|
|||
catch (Exception e)
|
||||
{
|
||||
logger.Error(e, "Failed to load file {Path}.", path);
|
||||
return new LocationTree(map, [], null);
|
||||
return new LocationTree(map, lastBranch, new GoCategory { Name = "Error", Categories = [], Locations = [] });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue