Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOProUnity_V2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赤子奈落
YGOProUnity_V2
Commits
6f0d3cbd
Commit
6f0d3cbd
authored
Oct 12, 2022
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update KF_replay support full file path
parent
ae99e3b5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
15 deletions
+22
-15
Assets/SibylSystem/selectReplay/selectReplay.cs
Assets/SibylSystem/selectReplay/selectReplay.cs
+22
-15
No files found.
Assets/SibylSystem/selectReplay/selectReplay.cs
View file @
6f0d3cbd
...
@@ -341,9 +341,20 @@ public class selectReplay : WindowServantSP
...
@@ -341,9 +341,20 @@ public class selectReplay : WindowServantSP
public
void
KF_replay
(
string
name
,
bool
god
=
false
)
public
void
KF_replay
(
string
name
,
bool
god
=
false
)
{
{
try
string
filename
=
name
;
if
(!
File
.
Exists
(
filename
))
{
{
if
(
File
.
Exists
(
"replay/"
+
name
+
".yrp3d"
))
if
(
File
.
Exists
(
"replay/"
+
name
+
".yrp3d"
))
filename
=
"replay/"
+
name
+
".yrp3d"
;
if
(
name
.
Length
>
4
&&
name
.
ToLower
().
Substring
(
name
.
Length
-
4
,
4
)
==
".yrp"
)
filename
=
"replay/"
+
name
;
if
(!
File
.
Exists
(
filename
))
return
;
}
bool
yrp3d
=
filename
.
Length
>
6
&&
filename
.
ToLower
().
Substring
(
filename
.
Length
-
6
,
6
)
==
".yrp3d"
;
try
{
if
(
yrp3d
)
{
{
if
(
god
)
if
(
god
)
{
{
...
@@ -351,21 +362,18 @@ public class selectReplay : WindowServantSP
...
@@ -351,21 +362,18 @@ public class selectReplay : WindowServantSP
if
(
precy
!=
null
)
if
(
precy
!=
null
)
precy
.
dispose
();
precy
.
dispose
();
precy
=
new
PrecyOcg
();
precy
=
new
PrecyOcg
();
var
replays
=
getYRPbuffer
(
"replay/"
+
name
+
".yrp3d"
);
var
replays
=
getYRPbuffer
(
filename
);
var
collections
=
var
collections
=
TcpHelper
.
getPackages
(
precy
.
ygopro
.
getYRP3dBuffer
(
getYRP
(
replays
[
replays
.
Count
-
1
])));
TcpHelper
.
getPackages
(
precy
.
ygopro
.
getYRP3dBuffer
(
getYRP
(
replays
[
replays
.
Count
-
1
])));
pushCollection
(
collections
);
pushCollection
(
collections
);
}
}
else
else
{
{
var
collection
=
TcpHelper
.
readPackagesInRecord
(
"replay/"
+
name
+
".yrp3d"
);
var
collection
=
TcpHelper
.
readPackagesInRecord
(
filename
);
pushCollection
(
collection
);
pushCollection
(
collection
);
}
}
}
}
else
else
{
if
(
name
.
Length
>
4
&&
name
.
Substring
(
name
.
Length
-
4
,
4
)
==
".yrp"
)
if
(
File
.
Exists
(
"replay/"
+
name
))
{
{
RMSshow_none
(
InterString
.
Get
(
"您正在观看旧版的录像(上帝视角),不保证稳定性。"
));
RMSshow_none
(
InterString
.
Get
(
"您正在观看旧版的录像(上帝视角),不保证稳定性。"
));
if
(
precy
!=
null
)
if
(
precy
!=
null
)
...
@@ -373,11 +381,10 @@ public class selectReplay : WindowServantSP
...
@@ -373,11 +381,10 @@ public class selectReplay : WindowServantSP
precy
=
new
PrecyOcg
();
precy
=
new
PrecyOcg
();
var
collections
=
var
collections
=
TcpHelper
.
getPackages
(
TcpHelper
.
getPackages
(
precy
.
ygopro
.
getYRP3dBuffer
(
getYRP
(
File
.
ReadAllBytes
(
"replay/"
+
name
))));
precy
.
ygopro
.
getYRP3dBuffer
(
getYRP
(
File
.
ReadAllBytes
(
file
name
))));
pushCollection
(
collections
);
pushCollection
(
collections
);
}
}
}
}
}
catch
(
Exception
)
catch
(
Exception
)
{
{
RMSshow_none
(
InterString
.
Get
(
"录像没有录制完整。"
));
RMSshow_none
(
InterString
.
Get
(
"录像没有录制完整。"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment