support for MMO in SuperSecret

thanks to HaiFire
This commit is contained in:
Robert Paciorek 2024-04-20 22:17:09 +00:00
parent a756023a86
commit 1dfcc655eb
3 changed files with 22 additions and 0 deletions

View File

@ -15,6 +15,7 @@ public class ConfigurationController : Controller {
[HttpPost] [HttpPost]
[Produces("application/xml")] [Produces("application/xml")]
[Route("ConfigurationWebService.asmx/GetMMOServerInfoWithZone")] [Route("ConfigurationWebService.asmx/GetMMOServerInfoWithZone")]
[Route("ConfigurationWebService.asmx/GetMMOServerInfo")] // used by SuperSecret
public IActionResult GetMMOServerInfoWithZone([FromForm] string apiKey) { public IActionResult GetMMOServerInfoWithZone([FromForm] string apiKey) {
return Ok(mmoConfigService.GetMMOServerInformation( return Ok(mmoConfigService.GetMMOServerInformation(
ClientVersion.GetVersion(apiKey.ToLower()) // NOTE: in this request apiKey is send uppercase ClientVersion.GetVersion(apiKey.ToLower()) // NOTE: in this request apiKey is send uppercase

View File

@ -23,6 +23,18 @@
<ZoneList>DWMadPenguinHQINT UncleMilton EnemyValley LoungeIntUpper UncleMiltonBounceHouse Boardwalk MyRoomsInt DWMadEuropeAlps SpeedDrome WinterWonderland GemMineInt Beach TrainingIsland * IslandX SanctuaryBaby DWMadEuropeParis AdventureCanyon DWMadNYHarbor JumpStartBowlInt TownCenter SanctuaryFlying MultiplayerSystem DWMadNYCentralParkFunZone MainStreet LearningInt HomeBase Hollows FreeFallMtn ArcadeInt ShipWreckLagoon DWMadEuropeItaly MummyMazeInt EnchantedSanctuary MyVIPRoomInt DownTown DWMadNYCentralPark MyNeighborhood MountainJetpack DWMadNYTimesSquare MainStreetFunZone DuneBuggyZone LoungeInt JSStadiumInt SanctuaryAdult BroomStickArena RabbitHoleInt CoconutMall Lobby </ZoneList> <ZoneList>DWMadPenguinHQINT UncleMilton EnemyValley LoungeIntUpper UncleMiltonBounceHouse Boardwalk MyRoomsInt DWMadEuropeAlps SpeedDrome WinterWonderland GemMineInt Beach TrainingIsland * IslandX SanctuaryBaby DWMadEuropeParis AdventureCanyon DWMadNYHarbor JumpStartBowlInt TownCenter SanctuaryFlying MultiplayerSystem DWMadNYCentralParkFunZone MainStreet LearningInt HomeBase Hollows FreeFallMtn ArcadeInt ShipWreckLagoon DWMadEuropeItaly MummyMazeInt EnchantedSanctuary MyVIPRoomInt DownTown DWMadNYCentralPark MyNeighborhood MountainJetpack DWMadNYTimesSquare MainStreetFunZone DuneBuggyZone LoungeInt JSStadiumInt SanctuaryAdult BroomStickArena RabbitHoleInt CoconutMall Lobby </ZoneList>
</Version> </Version>
<Version>
<!-- SuperSecret -->
<VersionMin>0x02000000</VersionMin>
<VersionMax>0x02ffffff</VersionMax>
<MMOServerInfo>
<IP xmlns="" /> <!-- empty value will be replaced by IP defined in server config -->
<PN xmlns="">0</PN> <!-- zero value will be replaced by Port defined in server config -->
<VR xmlns="">S2X</VR>
<DF xmlns="">true</DF>
</MMOServerInfo>
</Version>
<!-- Multiple <MMOServerInfo> child can be used instead of <ZoneList> <!-- Multiple <MMOServerInfo> child can be used instead of <ZoneList>
to provide different MMO servers for different zones (<ZN> tag in <MMOServerInfo>). to provide different MMO servers for different zones (<ZN> tag in <MMOServerInfo>).

View File

@ -31,6 +31,15 @@ public class MMOConfigService {
} }
} }
v.MMOServerDataArray = MMOServerDataList.ToArray(); v.MMOServerDataArray = MMOServerDataList.ToArray();
} else {
foreach (var s in v.MMOServerDataArray) {
if (String.IsNullOrEmpty(s.IPAddress)) {
s.IPAddress = config.Value.MMOAdress;
}
if (s.Port == 0) {
s.Port = config.Value.MMOPort;
}
}
} }
} }
} }