Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro2
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
mercury233
ygopro2
Commits
01104343
Commit
01104343
authored
Apr 06, 2019
by
mercury233
Committed by
Unicorn369
Apr 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix SelectEffectYn hint
parent
e0fa050b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
20 deletions
+53
-20
Assets/SibylSystem/Ocgcore/Ocgcore.cs
Assets/SibylSystem/Ocgcore/Ocgcore.cs
+25
-17
Assets/SibylSystem/ResourceManagers/GameStringManager.cs
Assets/SibylSystem/ResourceManagers/GameStringManager.cs
+28
-3
No files found.
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
01104343
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Text.RegularExpressions
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
public
class
Ocgcore
:
ServantWithCardDescription
...
...
@@ -3235,18 +3236,32 @@ public class Ocgcore : ServantWithCardDescription
code
=
r
.
ReadInt32
();
gps
=
r
.
ReadShortGPS
();
r
.
ReadByte
();
int
cr
=
95
;
if
(
Config
.
ClientVersion
>=
0x233c
)
{
int
cp
=
r
.
ReadInt32
();
if
(
cp
>
0
)
cr
=
cp
;
}
desc
=
GameStringManager
.
get
(
cr
);
int
cr
=
r
.
ReadInt32
();
card
=
GCS_cardGet
(
gps
,
false
);
desc
=
desc
.
Replace
(
"[%ls]"
,
"「"
+
card
.
get_data
().
Name
+
"」"
);
if
(
card
!=
null
)
{
string
displayname
=
"「"
+
card
.
get_data
().
Name
+
"」"
;
if
(
cr
==
0
)
{
desc
=
GameStringManager
.
get
(
200
);
Regex
forReplaceFirst
=
new
Regex
(
"\\[%ls\\]"
);
desc
=
forReplaceFirst
.
Replace
(
desc
,
GameStringManager
.
formatLocation
(
gps
),
1
);
desc
=
forReplaceFirst
.
Replace
(
desc
,
displayname
,
1
);
}
else
if
(
cr
==
221
)
{
desc
=
GameStringManager
.
get
(
221
);
Regex
forReplaceFirst
=
new
Regex
(
"\\[%ls\\]"
);
desc
=
forReplaceFirst
.
Replace
(
desc
,
GameStringManager
.
formatLocation
(
gps
),
1
);
desc
=
forReplaceFirst
.
Replace
(
desc
,
displayname
,
1
);
desc
=
desc
+
"\n"
+
GameStringManager
.
get
(
223
);
}
else
{
desc
=
GameStringManager
.
get
(
cr
);
Regex
forReplaceFirst
=
new
Regex
(
"\\[%ls\\]"
);
desc
=
forReplaceFirst
.
Replace
(
desc
,
displayname
,
1
);
}
string
hin
=
ES_hint
+
",\n"
+
desc
;
RMSshow_yesOrNo
(
"return"
,
hin
,
new
messageSystemValue
{
value
=
"1"
,
hint
=
"yes"
},
new
messageSystemValue
{
value
=
"0"
,
hint
=
"no"
});
card
.
add_one_decoration
(
Program
.
I
().
mod_ocgcore_decoration_chain_selecting
,
4
,
Vector3
.
zero
,
"chain_selecting"
);
...
...
@@ -8596,14 +8611,7 @@ public class Ocgcore : ServantWithCardDescription
BinaryMaster
binaryMaster
=
new
BinaryMaster
();
for
(
int
i
=
0
;
i
<
allCardsInSelectMessage
.
Count
;
i
++)
{
if
(
Config
.
ClientVersion
>=
0x133d
)
{
binaryMaster
.
writer
.
Write
((
short
)
allCardsInSelectMessage
[
i
].
counterSELcount
);
}
else
{
binaryMaster
.
writer
.
Write
((
byte
)
allCardsInSelectMessage
[
i
].
counterSELcount
);
}
binaryMaster
.
writer
.
Write
((
short
)
allCardsInSelectMessage
[
i
].
counterSELcount
);
}
sendReturn
(
binaryMaster
.
get
());
}
...
...
Assets/SibylSystem/ResourceManagers/GameStringManager.cs
View file @
01104343
...
...
@@ -12,7 +12,7 @@ public static class GameStringManager
public
static
List
<
hashedString
>
hashedStrings
=
new
List
<
hashedString
>();
public
static
List
<
hashedString
>
xilies
=
new
List
<
hashedString
>();
public
static
List
<
hashedString
>
xilies
=
new
List
<
hashedString
>();
public
static
int
helper_stringToInt
(
string
str
)
{
...
...
@@ -86,7 +86,7 @@ public static class GameStringManager
return
re
;
}
internal
static
string
get_unsafe
(
int
hashCode
)
internal
static
string
get_unsafe
(
int
hashCode
)
{
string
re
=
""
;
foreach
(
hashedString
s
in
hashedStrings
)
...
...
@@ -100,7 +100,7 @@ public static class GameStringManager
return
re
;
}
internal
static
string
get
(
int
description
)
internal
static
string
get
(
int
description
)
{
string
a
=
""
;
if
(
description
<
10000
)
...
...
@@ -122,5 +122,30 @@ public static class GameStringManager
}
return
a
;
}
internal
static
string
formatLocation
(
uint
location
,
uint
sequence
)
{
if
(
location
==
0x8
)
{
if
(
sequence
<
5
)
return
get
(
1003
);
else
if
(
sequence
==
5
)
return
get
(
1008
);
else
return
get
(
1009
);
}
uint
filter
=
1
;
int
i
=
1000
;
for
(;
filter
!=
0x100
&&
filter
!=
location
;
filter
<<=
1
)
++
i
;
if
(
filter
==
location
)
return
get
(
i
);
else
return
"???"
;
}
internal
static
string
formatLocation
(
GPS
gps
)
{
return
formatLocation
(
gps
.
location
,
gps
.
sequence
);
}
}
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