🐛 修复 {mcv} 被替换的问题

This commit is contained in:
youzi-2333
2024-06-19 13:07:32 +08:00
parent a32bf0b79e
commit 82dacd7eeb
3 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -43,7 +43,7 @@
End Sub)
Case "启动游戏"
If Data(0) = "$mcv" Then Data(0) = McVersionCurrent.Name
If Data(0) = "\current" Then Data(0) = McVersionCurrent.Name
If McLaunchStart(New McLaunchOptions With
{.ServerIp = If(Data.Length >= 2, Data(1), Nothing), .Version = New McVersion(Data(0))}) Then
Hint("正在启动 " & Data(0) & "……")
@@ -665,7 +665,6 @@ NextFile:
Dim Result = Xaml.Replace("{path}", EscapeXML(Path))
Result = RegexReplaceEach(Result, Function() EscapeXML(PageOtherTest.GetRandomHint()), "\{hint\}")
Result = RegexReplaceEach(Result, Function() EscapeXML(PageOtherTest.GetRandomCave()), "\{cave\}")
Result = Result.Replace("{mcv}", "$mcv") '不知道为啥,实例化 {mcv} 有可能会炸掉,只能先把它换掉,再换成版本名
Return Result
End Function