Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
1
Merge Requests
1
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
nanahira
ygopro
Commits
f97b104d
Commit
f97b104d
authored
Mar 28, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'server' of
https://github.com/purerosefallen/ygopro
parents
302cc6af
e865216b
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
448 additions
and
228 deletions
+448
-228
.gitignore
.gitignore
+1
-1
cards.cdb
cards.cdb
+0
-0
gframe/duelclient.cpp
gframe/duelclient.cpp
+22
-5
gframe/game.cpp
gframe/game.cpp
+1
-1
gframe/netserver.cpp
gframe/netserver.cpp
+1
-1
lflist.conf
lflist.conf
+418
-219
strings.conf
strings.conf
+5
-1
No files found.
.gitignore
View file @
f97b104d
...
...
@@ -4,7 +4,7 @@
# build files
/bin
/
build
build
/obj
# dependencies
...
...
cards.cdb
View file @
f97b104d
No preview for this file type
gframe/duelclient.cpp
View file @
f97b104d
...
...
@@ -77,6 +77,9 @@ bool DuelClient::StartClient(unsigned int ip, unsigned short port, bool create_g
return
true
;
}
void
DuelClient
::
ConnectTimeout
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
)
{
if
(
auto_watch_mode
)
{
mainGame
->
device
->
closeDevice
();
}
if
(
connect_state
==
0x7
)
return
;
if
(
!
is_closing
)
{
...
...
@@ -2143,6 +2146,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
=
*
(
mainGame
->
dField
.
deck
[
player
].
rbegin
()
+
i
);
if
(
code
!=
0
)
pcard
->
SetCode
(
code
);
if
(
auto_watch_mode
&&
code
>
0
)
{
mainGame
->
showcardcode
=
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
}
if
(
mainGame
->
dInfo
.
isReplaySkiping
)
return
true
;
...
...
@@ -2181,6 +2190,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
=
*
(
mainGame
->
dField
.
extra
[
player
].
rbegin
()
+
i
+
mainGame
->
dField
.
extra_p_count
[
player
]);
if
(
code
!=
0
)
pcard
->
SetCode
(
code
);
if
(
auto_watch_mode
&&
code
>
0
)
{
mainGame
->
showcardcode
=
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
}
if
(
mainGame
->
dInfo
.
isReplaySkiping
)
return
true
;
...
...
@@ -2232,6 +2247,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
if
(
code
!=
0
)
pcard
->
SetCode
(
code
);
if
(
auto_watch_mode
&&
code
>
0
)
{
mainGame
->
showcardcode
=
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
mainGame
->
gMutex
.
lock
();
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
code
));
mainGame
->
AddLog
(
textBuffer
,
code
);
...
...
@@ -3454,14 +3475,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int
count
=
BufferIO
::
ReadInt16
(
pbuf
);
ClientCard
*
pc
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
if
(
auto_watch_mode
&&
pc
->
code
>
0
)
{
myswprintf
(
event_string
,
dataManager
.
GetSysString
(
1610
),
dataManager
.
GetName
(
pc
->
code
));
mainGame
->
showcardcode
=
pc
->
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
5
;
mainGame
->
WaitFrameSignal
(
30
);
mainGame
->
showcard
=
0
;
mainGame
->
WaitFrameSignal
(
11
);
mainGame
->
showcard
=
2
;
}
if
(
pc
->
counters
.
count
(
type
))
pc
->
counters
[
type
]
+=
count
;
...
...
gframe/game.cpp
View file @
f97b104d
...
...
@@ -149,7 +149,7 @@ bool Game::Initialize() {
SetWindowsIcon
();
//main menu
wchar_t
strbuf
[
256
];
myswprintf
(
strbuf
,
L"KoishiPro %X.0%X.%X C
hocolate
"
,
PRO_VERSION
>>
12
,
(
PRO_VERSION
>>
4
)
&
0xff
,
PRO_VERSION
&
0xf
);
myswprintf
(
strbuf
,
L"KoishiPro %X.0%X.%X C
olorful
"
,
PRO_VERSION
>>
12
,
(
PRO_VERSION
>>
4
)
&
0xff
,
PRO_VERSION
&
0xf
);
wMainMenu
=
env
->
addWindow
(
rect
<
s32
>
(
370
,
200
,
650
,
415
),
false
,
strbuf
);
wMainMenu
->
getCloseButton
()
->
setVisible
(
false
);
btnLanMode
=
env
->
addButton
(
rect
<
s32
>
(
10
,
30
,
270
,
60
),
wMainMenu
,
BUTTON_LAN_MODE
,
dataManager
.
GetSysString
(
1200
));
...
...
gframe/netserver.cpp
View file @
f97b104d
...
...
@@ -118,7 +118,7 @@ void NetServer::StopServer() {
if
(
duel_mode
)
duel_mode
->
EndDuel
();
#ifdef YGOPRO_SERVER_MODE // For solving the problem of connection lost after duel. See https://github.com/Fluorohydride/ygopro/issues/2067 for details.
timeval
etv
=
{
0
,
1
000000
};
timeval
etv
=
{
0
,
1
};
event_base_loopexit
(
net_evbase
,
&
etv
);
#else
event_base_loopexit
(
net_evbase
,
0
);
...
...
lflist.conf
View file @
f97b104d
This diff is collapsed.
Click to expand it.
strings.conf
View file @
f97b104d
...
...
@@ -136,6 +136,8 @@
!
system
570
请选择要变成不能使用的卡片区域
!
system
571
请选择要移动到的位置
!
system
572
请选择要放置指示物的卡
!
system
573
请选择要无效的卡
!
system
574
请选择要操作的卡
!
system
1000
卡组
!
system
1001
手卡
!
system
1002
怪兽区
...
...
@@ -621,6 +623,7 @@
!
counter
0
x54
指示物(星遗物引导的前路)
!
counter
0
x55
指示物(隐居者的大釜)
!
counter
0
x56
炎星指示物
!
counter
0
x57
幻魔指示物
#setnames, using tab for comment
!
setname
0
x1
正义盟军
A
・
O
・
J
!
setname
0
x2
次世代 ジェネクス
...
...
@@ -731,7 +734,7 @@
#setname 0x4d N/A
#setname 0x4e 进化 エヴォル
!
setname
0
x304e
进化虫 エヴォルド
!
setname
0
x604e
进化龙 エヴォルダ
!
setname
0
x604e
进化龙 エヴォルダ
ー
!
setname
0
x504e
进化帝 エヴォルカイザー
#setname 0x4f 爆裂 バスター
!
setname
0
x104f
/爆裂体 /バスター
...
...
@@ -1034,3 +1037,4 @@
!
setname
0
x1142
黄金国巫妖 エルドリッチ
!
setname
0
x2142
黄金国永生药 エルドリクシル
!
setname
0
x143
黄金乡 黄金郷
!
setname
0
x144
幻魔
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