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
nanahira
ygopro
Commits
3e0740b7
Commit
3e0740b7
authored
Sep 07, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update MSG_SELECT_CHAIN
parent
a34a850a
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
50 additions
and
14 deletions
+50
-14
gframe/duelclient.cpp
gframe/duelclient.cpp
+13
-4
gframe/event_handler.cpp
gframe/event_handler.cpp
+21
-4
gframe/game.cpp
gframe/game.cpp
+2
-0
gframe/game.h
gframe/game.h
+4
-0
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+1
-1
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-1
gframe/single_mode.cpp
gframe/single_mode.cpp
+1
-1
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-1
ocgcore
ocgcore
+1
-1
script
script
+1
-1
strings.conf
strings.conf
+4
-0
No files found.
gframe/duelclient.cpp
View file @
3e0740b7
...
...
@@ -1192,11 +1192,13 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int
code
,
c
,
l
,
s
,
ss
,
desc
;
ClientCard
*
pcard
;
bool
panelmode
=
false
;
bool
conti_exist
=
false
;
mainGame
->
dField
.
chain_forced
=
(
forced
!=
0
);
mainGame
->
dField
.
activatable_cards
.
clear
();
mainGame
->
dField
.
activatable_descs
.
clear
();
mainGame
->
dField
.
conti_cards
.
clear
();
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
int
flag
=
BufferIO
::
ReadInt8
(
pbuf
);;
code
=
BufferIO
::
ReadInt32
(
pbuf
);
c
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
l
=
BufferIO
::
ReadInt8
(
pbuf
);
...
...
@@ -1207,15 +1209,19 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_descs
.
push_back
(
desc
);
pcard
->
is_selected
=
false
;
if
(
code
>=
1000000000
)
{
if
(
flag
==
0x1
)
{
pcard
->
is_conti
=
true
;
pcard
->
chain_code
=
code
%
1000000000
;
pcard
->
chain_code
=
code
;
mainGame
->
dField
.
conti_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
conti_act
=
true
;
conti_exist
=
true
;
}
else
{
pcard
->
chain_code
=
code
;
pcard
->
is_selectable
=
true
;
pcard
->
cmdFlag
|=
COMMAND_ACTIVATE
;
if
(
flag
==
0x2
)
pcard
->
cmdFlag
|=
COMMAND_RESET
;
else
pcard
->
cmdFlag
|=
COMMAND_ACTIVATE
;
if
(
l
==
LOCATION_GRAVE
)
mainGame
->
dField
.
grave_act
=
true
;
else
if
(
l
==
LOCATION_REMOVED
)
...
...
@@ -1242,7 +1248,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return
true
;
}
mainGame
->
gMutex
.
Lock
();
mainGame
->
stHintMsg
->
setText
(
dataManager
.
GetSysString
(
550
));
if
(
!
conti_exist
)
mainGame
->
stHintMsg
->
setText
(
dataManager
.
GetSysString
(
550
));
else
mainGame
->
stHintMsg
->
setText
(
dataManager
.
GetSysString
(
556
));
mainGame
->
stHintMsg
->
setVisible
(
true
);
if
(
panelmode
)
{
mainGame
->
dField
.
list_command
=
COMMAND_ACTIVATE
;
...
...
gframe/event_handler.cpp
View file @
3e0740b7
...
...
@@ -312,6 +312,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
}
else
{
selectable_cards
.
clear
();
bool
conti_exist
=
false
;
switch
(
command_location
)
{
case
LOCATION_DECK
:
{
for
(
size_t
i
=
0
;
i
<
deck
[
command_controler
].
size
();
++
i
)
...
...
@@ -339,11 +340,17 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
case
POSITION_HINT
:
{
selectable_cards
.
insert
(
selectable_cards
.
end
(),
conti_cards
.
begin
(),
conti_cards
.
end
());
conti_exist
=
true
;
break
;
}
}
mainGame
->
wCardSelect
->
setText
(
dataManager
.
GetSysString
(
566
));
list_command
=
COMMAND_ACTIVATE
;
if
(
!
conti_exist
)
{
mainGame
->
wCardSelect
->
setText
(
dataManager
.
GetSysString
(
566
));
list_command
=
COMMAND_ACTIVATE
;
}
else
{
mainGame
->
wCardSelect
->
setText
(
dataManager
.
GetSysString
(
568
));
list_command
=
COMMAND_OPERATION
;
}
ShowSelectCard
(
true
,
true
);
}
break
;
...
...
@@ -546,7 +553,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
break
;
}
if
(
list_command
==
COMMAND_ACTIVATE
)
{
if
(
list_command
==
COMMAND_ACTIVATE
||
list_command
==
COMMAND_OPERATION
)
{
int
index
=
-
1
;
command_card
=
selectable_cards
[
id
-
BUTTON_CARD_0
+
mainGame
->
scrCardList
->
getPos
()
/
10
];
select_options
.
clear
();
...
...
@@ -1133,7 +1140,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
conti_cards
.
size
()
==
0
)
break
;
if
(
conti_cards
.
size
())
command_flag
|=
COMMAND_
ACTIVATE
;
command_flag
|=
COMMAND_
OPERATION
;
list_command
=
1
;
ShowMenu
(
command_flag
,
x
,
y
);
break
;
...
...
@@ -1955,6 +1962,16 @@ void ClientField::ShowMenu(int flag, int x, int y) {
mainGame
->
btnShowList
->
setRelativePosition
(
position2di
(
1
,
height
));
height
+=
21
;
}
else
mainGame
->
btnShowList
->
setVisible
(
false
);
if
(
flag
&
COMMAND_OPERATION
)
{
mainGame
->
btnOperation
->
setVisible
(
true
);
mainGame
->
btnOperation
->
setRelativePosition
(
position2di
(
1
,
height
));
height
+=
21
;
}
else
mainGame
->
btnOperation
->
setVisible
(
false
);
if
(
flag
&
COMMAND_RESET
)
{
mainGame
->
btnReset
->
setVisible
(
true
);
mainGame
->
btnReset
->
setRelativePosition
(
position2di
(
1
,
height
));
height
+=
21
;
}
else
mainGame
->
btnReset
->
setVisible
(
false
);
panel
=
mainGame
->
wCmdMenu
;
mainGame
->
wCmdMenu
->
setVisible
(
true
);
mainGame
->
wCmdMenu
->
setRelativePosition
(
irr
::
core
::
recti
(
x
-
20
,
y
-
20
-
height
,
x
+
80
,
y
-
20
));
...
...
gframe/game.cpp
View file @
3e0740b7
...
...
@@ -384,6 +384,8 @@ bool Game::Initialize() {
btnRepos
=
env
->
addButton
(
rect
<
s32
>
(
1
,
106
,
99
,
126
),
wCmdMenu
,
BUTTON_CMD_REPOS
,
dataManager
.
GetSysString
(
1154
));
btnAttack
=
env
->
addButton
(
rect
<
s32
>
(
1
,
127
,
99
,
147
),
wCmdMenu
,
BUTTON_CMD_ATTACK
,
dataManager
.
GetSysString
(
1157
));
btnShowList
=
env
->
addButton
(
rect
<
s32
>
(
1
,
148
,
99
,
168
),
wCmdMenu
,
BUTTON_CMD_SHOWLIST
,
dataManager
.
GetSysString
(
1158
));
btnOperation
=
env
->
addButton
(
rect
<
s32
>
(
1
,
169
,
99
,
189
),
wCmdMenu
,
BUTTON_CMD_ACTIVATE
,
dataManager
.
GetSysString
(
1161
));
btnReset
=
env
->
addButton
(
rect
<
s32
>
(
1
,
190
,
99
,
210
),
wCmdMenu
,
BUTTON_CMD_ACTIVATE
,
dataManager
.
GetSysString
(
1162
));
//deck edit
wDeckEdit
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
309
,
5
,
605
,
130
),
true
,
false
,
0
,
-
1
,
true
);
wDeckEdit
->
setVisible
(
false
);
...
...
gframe/game.h
View file @
3e0740b7
...
...
@@ -325,6 +325,8 @@ public:
irr
::
gui
::
IGUIButton
*
btnRepos
;
irr
::
gui
::
IGUIButton
*
btnAttack
;
irr
::
gui
::
IGUIButton
*
btnShowList
;
irr
::
gui
::
IGUIButton
*
btnOperation
;
irr
::
gui
::
IGUIButton
*
btnReset
;
irr
::
gui
::
IGUIButton
*
btnShuffle
;
//chat window
irr
::
gui
::
IGUIWindow
*
wChat
;
...
...
@@ -411,6 +413,8 @@ extern Game* mainGame;
#define COMMAND_REPOS 0x0020
#define COMMAND_ATTACK 0x0040
#define COMMAND_LIST 0x0080
#define COMMAND_OPERATION 0x0100
#define COMMAND_RESET 0x0200
#define POSITION_HINT 0x8000
...
...
gframe/replay_mode.cpp
View file @
3e0740b7
...
...
@@ -396,7 +396,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
case
MSG_SELECT_CHAIN
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
10
+
count
*
1
2
;
pbuf
+=
10
+
count
*
1
3
;
return
ReadReplayResponse
();
}
case
MSG_SELECT_PLACE
:
...
...
gframe/single_duel.cpp
View file @
3e0740b7
...
...
@@ -695,7 +695,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
case
MSG_SELECT_CHAIN
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
10
+
count
*
1
2
;
pbuf
+=
10
+
count
*
1
3
;
WaitforResponse
(
player
);
NetServer
::
SendBufferToPlayer
(
players
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
return
1
;
...
...
gframe/single_mode.cpp
View file @
3e0740b7
...
...
@@ -215,7 +215,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
case
MSG_SELECT_CHAIN
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
10
+
count
*
1
2
;
pbuf
+=
10
+
count
*
1
3
;
if
(
!
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
))
{
mainGame
->
singleSignal
.
Reset
();
mainGame
->
singleSignal
.
Wait
();
...
...
gframe/tag_duel.cpp
View file @
3e0740b7
...
...
@@ -628,7 +628,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
case
MSG_SELECT_CHAIN
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
10
+
count
*
1
2
;
pbuf
+=
10
+
count
*
1
3
;
WaitforResponse
(
player
);
NetServer
::
SendBufferToPlayer
(
cur_player
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
return
1
;
...
...
ocgcore
@
886141f3
Subproject commit
0131b0b8914b3da4921ce4d416b4563f9cbedf9b
Subproject commit
886141f3960660a10d1ecd99ccbc745b61a16b51
script
@
87063a01
Subproject commit
4a077c3c17def513f17d8a48d4d475714c2cc0b
a
Subproject commit
87063a011d7bc19e6535347d5c9f0956d5f0e25
a
strings.conf
View file @
3e0740b7
...
...
@@ -102,6 +102,7 @@
!
system
553
请选择骰子的结果
!
system
554
请选择一个种类
!
system
555
请选择一个选项
!
system
556
请选择要发动/处理的效果
!
system
560
请选择
!
system
561
请选择表示形式
!
system
562
请选择要宣言的属性
...
...
@@ -110,6 +111,7 @@
!
system
565
请选择一个数字
!
system
566
请选择要发动效果的卡
!
system
567
请宣言一个等级
!
system
568
请选择要处理效果的卡
!
system
1000
卡组
!
system
1001
手卡
!
system
1002
怪兽区
...
...
@@ -222,6 +224,8 @@
!
system
1158
查看列表
!
system
1159
当魔法卡放置
!
system
1160
在灵摆区域发动
!
system
1161
效果处理
!
system
1162
效果重置
#menu
!
system
1200
联机模式
!
system
1201
残局模式
...
...
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