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
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
baichixing
ygopro
Commits
89b00401
Commit
89b00401
authored
Mar 15, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add rule option
parent
1b1a62aa
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
15 deletions
+17
-15
gframe/duelclient.cpp
gframe/duelclient.cpp
+4
-4
gframe/game.cpp
gframe/game.cpp
+7
-1
gframe/game.h
gframe/game.h
+1
-1
gframe/network.h
gframe/network.h
+1
-1
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-3
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-3
ocgcore
ocgcore
+1
-1
script
script
+1
-1
No files found.
gframe/duelclient.cpp
View file @
89b00401
...
...
@@ -119,7 +119,7 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
cscg
.
info
.
draw_count
=
_wtoi
(
mainGame
->
ebDrawCount
->
getText
());
cscg
.
info
.
time_limit
=
_wtoi
(
mainGame
->
ebTimeLimit
->
getText
());
cscg
.
info
.
lflist
=
mainGame
->
cbLFlist
->
getItemData
(
mainGame
->
cbLFlist
->
getSelected
());
cscg
.
info
.
enable_priority
=
mainGame
->
chkEnablePriority
->
isCheck
ed
();
cscg
.
info
.
duel_rule
=
mainGame
->
cbDuelRule
->
getSelect
ed
();
cscg
.
info
.
no_check_deck
=
mainGame
->
chkNoCheckDeck
->
isChecked
();
cscg
.
info
.
no_shuffle_deck
=
mainGame
->
chkNoShuffleDeck
->
isChecked
();
SendPacketToServer
(
CTOS_CREATE_GAME
,
cscg
);
...
...
@@ -329,8 +329,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
str
.
append
(
msgbuf
);
myswprintf
(
msgbuf
,
L"%ls%d
\n
"
,
dataManager
.
GetSysString
(
1233
),
pkt
->
info
.
draw_count
);
str
.
append
(
msgbuf
);
if
(
pkt
->
info
.
enable_priority
)
{
myswprintf
(
msgbuf
,
L"*%ls
\n
"
,
dataManager
.
GetSysString
(
12
36
));
if
(
pkt
->
info
.
duel_rule
!=
2
)
{
myswprintf
(
msgbuf
,
L"*%ls
\n
"
,
dataManager
.
GetSysString
(
12
60
+
pkt
->
info
.
duel_rule
));
str
.
append
(
msgbuf
);
}
if
(
pkt
->
info
.
no_check_deck
)
{
...
...
@@ -3441,7 +3441,7 @@ void DuelClient::BroadcastReply(evutil_socket_t fd, short events, void * arg) {
hoststr
.
append
(
dataManager
.
GetSysString
(
pHP
->
host
.
mode
+
1244
));
hoststr
.
append
(
L"]["
);
if
(
pHP
->
host
.
draw_count
==
1
&&
pHP
->
host
.
start_hand
==
5
&&
pHP
->
host
.
start_lp
==
8000
&&
!
pHP
->
host
.
no_check_deck
&&
!
pHP
->
host
.
no_shuffle_deck
&&
!
pHP
->
host
.
enable_priority
)
&&
!
pHP
->
host
.
no_check_deck
&&
!
pHP
->
host
.
no_shuffle_deck
&&
pHP
->
host
.
duel_rule
==
2
)
hoststr
.
append
(
dataManager
.
GetSysString
(
1280
));
else
hoststr
.
append
(
dataManager
.
GetSysString
(
1281
));
hoststr
.
append
(
L"]"
);
...
...
gframe/game.cpp
View file @
89b00401
...
...
@@ -134,7 +134,13 @@ bool Game::Initialize() {
ebTimeLimit
=
env
->
addEditBox
(
strbuf
,
rect
<
s32
>
(
140
,
115
,
220
,
140
),
true
,
wCreateHost
);
ebTimeLimit
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1228
),
rect
<
s32
>
(
20
,
150
,
320
,
170
),
false
,
false
,
wCreateHost
);
chkEnablePriority
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
180
,
360
,
200
),
wCreateHost
,
-
1
,
dataManager
.
GetSysString
(
1236
));
env
->
addStaticText
(
dataManager
.
GetSysString
(
1236
),
rect
<
s32
>
(
20
,
180
,
220
,
200
),
false
,
false
,
wCreateHost
);
cbDuelRule
=
env
->
addComboBox
(
rect
<
s32
>
(
140
,
175
,
300
,
200
),
wCreateHost
);
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1260
));
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1261
));
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1262
));
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1263
));
cbDuelRule
->
setSelected
(
2
);
chkNoCheckDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
210
,
170
,
230
),
wCreateHost
,
-
1
,
dataManager
.
GetSysString
(
1229
));
chkNoShuffleDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
180
,
210
,
360
,
230
),
wCreateHost
,
-
1
,
dataManager
.
GetSysString
(
1230
));
env
->
addStaticText
(
dataManager
.
GetSysString
(
1231
),
rect
<
s32
>
(
20
,
240
,
320
,
260
),
false
,
false
,
wCreateHost
);
...
...
gframe/game.h
View file @
89b00401
...
...
@@ -235,7 +235,7 @@ public:
irr
::
gui
::
IGUIEditBox
*
ebDrawCount
;
irr
::
gui
::
IGUIEditBox
*
ebServerName
;
irr
::
gui
::
IGUIEditBox
*
ebServerPass
;
irr
::
gui
::
IGUIC
heckBox
*
chkEnablePriority
;
irr
::
gui
::
IGUIC
omboBox
*
cbDuelRule
;
irr
::
gui
::
IGUICheckBox
*
chkNoCheckDeck
;
irr
::
gui
::
IGUICheckBox
*
chkNoShuffleDeck
;
irr
::
gui
::
IGUIButton
*
btnHostConfirm
;
...
...
gframe/network.h
View file @
89b00401
...
...
@@ -15,7 +15,7 @@ struct HostInfo {
unsigned
int
lflist
;
unsigned
char
rule
;
unsigned
char
mode
;
bool
enable_priority
;
unsigned
char
duel_rule
;
bool
no_check_deck
;
bool
no_shuffle_deck
;
unsigned
int
start_lp
;
...
...
gframe/single_duel.cpp
View file @
89b00401
...
...
@@ -412,9 +412,7 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
pduel
=
create_duel
(
rnd
.
rand
());
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
int
opt
=
0
;
if
(
host_info
.
enable_priority
)
opt
|=
DUEL_OBSOLETE_RULING
;
int
opt
=
((
int
)
host_info
.
duel_rule
+
1
)
<<
16
;
if
(
host_info
.
no_shuffle_deck
)
opt
|=
DUEL_PSEUDO_SHUFFLE
;
last_replay
.
WriteInt32
(
host_info
.
start_lp
,
false
);
...
...
gframe/tag_duel.cpp
View file @
89b00401
...
...
@@ -382,9 +382,7 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
pduel
=
create_duel
(
rnd
.
rand
());
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
int
opt
=
0
;
if
(
host_info
.
enable_priority
)
opt
|=
DUEL_OBSOLETE_RULING
;
int
opt
=
((
int
)
host_info
.
duel_rule
+
1
)
<<
16
;
if
(
host_info
.
no_shuffle_deck
)
opt
|=
DUEL_PSEUDO_SHUFFLE
;
opt
|=
DUEL_TAG_MODE
;
...
...
ocgcore
@
c49a463f
Subproject commit
3c1db2fc6f1427bb560ce8ac6858da509ac7f832
Subproject commit
c49a463fab6446c90354a12cb3f6377cb1c3bbba
script
@
5bac33f5
Subproject commit
f809dfae2533fcbd65679982d09fabc5275033ba
Subproject commit
5bac33f528c7838f1909fd4e460d1b9d5308bdf8
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