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
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
nanahira
ygopro2
Commits
077a8595
Commit
077a8595
authored
May 15, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move
parent
86b096de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
72 deletions
+17
-72
Assets/SibylSystem/MyCard/MyCardHelper.cs
Assets/SibylSystem/MyCard/MyCardHelper.cs
+0
-0
Assets/SibylSystem/selectServer/SelectServer.cs
Assets/SibylSystem/selectServer/SelectServer.cs
+17
-72
No files found.
Assets/SibylSystem/
selectServer
/MyCardHelper.cs
→
Assets/SibylSystem/
MyCard
/MyCardHelper.cs
View file @
077a8595
File moved
Assets/SibylSystem/selectServer/SelectServer.cs
View file @
077a8595
...
@@ -55,8 +55,6 @@ public class SelectServer : WindowServantSP
...
@@ -55,8 +55,6 @@ public class SelectServer : WindowServantSP
serversList
.
items
.
Add
(
"[AI]Doom Bots of Doom"
);
serversList
.
items
.
Add
(
"[AI]Doom Bots of Doom"
);
//serversList.items.Add("[OCG&TCG]한국서버");
//serversList.items.Add("[OCG&TCG]한국서버");
//serversList.items.Add("[OCG&TCG]YGOhollow (JP)");
//serversList.items.Add("[OCG&TCG]YGOhollow (JP)");
serversList
.
items
.
Add
(
"[MyCard]Athletic"
);
serversList
.
items
.
Add
(
"[MyCard]Entertain"
);
if
(
Application
.
systemLanguage
==
SystemLanguage
.
Chinese
||
Application
.
systemLanguage
==
SystemLanguage
.
ChineseSimplified
||
Application
.
systemLanguage
==
SystemLanguage
.
ChineseTraditional
)
if
(
Application
.
systemLanguage
==
SystemLanguage
.
Chinese
||
Application
.
systemLanguage
==
SystemLanguage
.
ChineseSimplified
||
Application
.
systemLanguage
==
SystemLanguage
.
ChineseTraditional
)
{
{
serversList
.
items
.
Add
(
"[自定义]"
);
serversList
.
items
.
Add
(
"[自定义]"
);
...
@@ -128,26 +126,6 @@ public class SelectServer : WindowServantSP
...
@@ -128,26 +126,6 @@ public class SelectServer : WindowServantSP
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"573"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"573"
;
Config
.
Set
(
"serversPicker"
,
"[AI]Doom Bots of Doom"
);
Config
.
Set
(
"serversPicker"
,
"[AI]Doom Bots of Doom"
);
inputIP_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
}
case
"[MyCard]Athletic"
:
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"tiramisu.mycard.moe"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"8911"
;
Config
.
Set
(
"serversPicker"
,
"[MyCard]Athletic"
);
inputIP_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
}
case
"[MyCard]Entertain"
:
{
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
=
"tiramisu.mycard.moe"
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
=
"7911"
;
Config
.
Set
(
"serversPicker"
,
"[MyCard]Entertain"
);
inputIP_
.
enabled
=
false
;
inputIP_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
inputPort_
.
enabled
=
false
;
break
;
break
;
...
@@ -312,33 +290,6 @@ public class SelectServer : WindowServantSP
...
@@ -312,33 +290,6 @@ public class SelectServer : WindowServantSP
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"version_"
).
value
=
str
;
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"version_"
).
value
=
str
;
}
}
bool
isMyCard
()
{
string
server
=
serversList
.
value
;
return
server
==
"[MyCard]Athletic"
||
server
==
"[MyCard]Entertain"
;
}
void
startMyCard
(
string
name
,
string
password
,
string
match_type
=
"entertain"
)
{
MyCardHelper
mycard
=
new
MyCardHelper
();
Program
.
PrintToChat
(
InterString
.
Get
(
"正在登录至MyCard。"
));
string
fail_reason
=
""
;
bool
res
=
mycard
.
login
(
name
,
password
,
out
fail_reason
);
if
(!
res
)
{
Program
.
PrintToChat
(
InterString
.
Get
(
"MyCard登录失败。原因: "
)
+
fail_reason
);
return
;
}
Program
.
PrintToChat
(
InterString
.
Get
(
"正在请求匹配。匹配类型: "
)
+
match_type
);
string
pswString
=
mycard
.
requestMatch
(
match_type
,
out
fail_reason
);
if
(
pswString
==
null
)
{
Program
.
PrintToChat
(
InterString
.
Get
(
"匹配请求失败。原因: "
)
+
fail_reason
);
return
;
}
string
ipString
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"ip_"
).
value
;
string
portString
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
;
string
versionString
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"version_"
).
value
;
Program
.
PrintToChat
(
InterString
.
Get
(
"匹配成功。正在进入房间。"
));
KF_onlineGame
(
name
,
ipString
,
portString
,
versionString
,
pswString
);
}
void
onClickJoin
()
void
onClickJoin
()
{
{
if
(!
isShowed
)
if
(!
isShowed
)
...
@@ -350,16 +301,12 @@ public class SelectServer : WindowServantSP
...
@@ -350,16 +301,12 @@ public class SelectServer : WindowServantSP
string
portString
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
;
string
portString
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"port_"
).
value
;
string
pswString
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"psw_"
).
value
;
string
pswString
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"psw_"
).
value
;
string
versionString
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"version_"
).
value
;
string
versionString
=
UIHelper
.
getByName
<
UIInput
>(
gameObject
,
"version_"
).
value
;
if
(
isMyCard
())
{
KF_onlineGame
(
Name
,
ipString
,
portString
,
versionString
,
pswString
);
startMyCard
(
Name
,
pswString
,
portString
==
"8911"
?
"athletic"
:
"entertain"
);
}
else
{
KF_onlineGame
(
Name
,
ipString
,
portString
,
versionString
,
pswString
);
}
}
}
public
void
onClickRoomList
()
public
void
onClickRoomList
()
{
{
if
(!
isShowed
||
isMyCard
()
)
if
(!
isShowed
)
{
{
return
;
return
;
}
}
...
@@ -388,24 +335,22 @@ public class SelectServer : WindowServantSP
...
@@ -388,24 +335,22 @@ public class SelectServer : WindowServantSP
{
{
if
(
name
!=
""
)
if
(
name
!=
""
)
{
{
if
(!
isMyCard
())
{
//string fantasty = "(" + versionString + ")" + ipString + ":" + portString + " " + pswString;
//string fantasty = "(" + versionString + ")" + ipString + ":" + portString + " " + pswString;
string
fantasty
=
"psw: "
+
pswString
;
string
fantasty
=
"psw: "
+
pswString
;
list
.
items
.
Remove
(
fantasty
);
list
.
items
.
Remove
(
fantasty
);
list
.
items
.
Insert
(
0
,
fantasty
);
list
.
items
.
Insert
(
0
,
fantasty
);
list
.
value
=
fantasty
;
list
.
value
=
fantasty
;
if
(
list
.
items
.
Count
>
5
)
if
(
list
.
items
.
Count
>
5
)
{
{
list
.
items
.
RemoveAt
(
list
.
items
.
Count
-
1
);
list
.
items
.
RemoveAt
(
list
.
items
.
Count
-
1
);
}
}
string
all
=
""
;
string
all
=
""
;
for
(
int
i
=
0
;
i
<
list
.
items
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
list
.
items
.
Count
;
i
++)
{
{
all
+=
list
.
items
[
i
]
+
"\r\n"
;
all
+=
list
.
items
[
i
]
+
"\r\n"
;
}
File
.
WriteAllText
(
"config/passwords.conf"
,
all
);
printFile
(
false
);
}
}
File
.
WriteAllText
(
"config/passwords.conf"
,
all
);
printFile
(
false
);
(
new
Thread
(()
=>
{
TcpHelper
.
join
(
ipString
,
name
,
portString
,
pswString
,
versionString
);
})).
Start
();
(
new
Thread
(()
=>
{
TcpHelper
.
join
(
ipString
,
name
,
portString
,
pswString
,
versionString
);
})).
Start
();
}
}
else
else
...
...
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