Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
fallenstardust
YGOMobile
Commits
af3b8c36
Commit
af3b8c36
authored
May 27, 2019
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update announce cards
parent
95fac9f5
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
19 additions
and
19 deletions
+19
-19
Classes/gframe/client_field.cpp
Classes/gframe/client_field.cpp
+7
-7
Classes/gframe/client_field.h
Classes/gframe/client_field.h
+3
-3
Classes/gframe/duelclient.cpp
Classes/gframe/duelclient.cpp
+3
-3
Classes/gframe/event_handler.cpp
Classes/gframe/event_handler.cpp
+2
-2
Classes/gframe/replay_mode.cpp
Classes/gframe/replay_mode.cpp
+1
-1
Classes/gframe/single_duel.cpp
Classes/gframe/single_duel.cpp
+1
-1
Classes/gframe/single_mode.cpp
Classes/gframe/single_mode.cpp
+1
-1
Classes/gframe/tag_duel.cpp
Classes/gframe/tag_duel.cpp
+1
-1
No files found.
Classes/gframe/client_field.cpp
View file @
af3b8c36
...
...
@@ -1425,7 +1425,7 @@ static bool is_declarable(T const& cd, const std::vector<int>& opcode) {
return
cd
.
code
==
CARD_MARINE_DOLPHIN
||
cd
.
code
==
CARD_TWINKLE_MOSS
||
(
!
cd
.
alias
&&
(
cd
.
type
&
(
TYPE_MONSTER
+
TYPE_TOKEN
))
!=
(
TYPE_MONSTER
+
TYPE_TOKEN
));
}
void
ClientField
::
UpdateDeclarableCodeType
(
bool
enter
)
{
void
ClientField
::
UpdateDeclarableCodeType
()
{
const
wchar_t
*
pname
=
mainGame
->
ebANCard
->
getText
();
int
trycode
=
BufferIO
::
GetVal
(
pname
);
CardString
cstr
;
...
...
@@ -1437,7 +1437,7 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
ancard
.
push_back
(
trycode
);
return
;
}
if
(
(
pname
[
0
]
==
0
||
pname
[
1
]
==
0
)
&&
!
enter
)
{
if
(
pname
[
0
]
==
0
)
{
std
::
vector
<
int
>
cache
;
cache
.
swap
(
ancard
);
int
sel
=
mainGame
->
lstANCard
->
getSelected
();
...
...
@@ -1472,7 +1472,7 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
}
}
}
void
ClientField
::
UpdateDeclarableCodeOpcode
(
bool
enter
)
{
void
ClientField
::
UpdateDeclarableCodeOpcode
()
{
const
wchar_t
*
pname
=
mainGame
->
ebANCard
->
getText
();
int
trycode
=
BufferIO
::
GetVal
(
pname
);
CardString
cstr
;
...
...
@@ -1484,7 +1484,7 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
ancard
.
push_back
(
trycode
);
return
;
}
if
(
(
pname
[
0
]
==
0
||
pname
[
1
]
==
0
)
&&
!
enter
)
{
if
(
pname
[
0
]
==
0
)
{
std
::
vector
<
int
>
cache
;
cache
.
swap
(
ancard
);
int
sel
=
mainGame
->
lstANCard
->
getSelected
();
...
...
@@ -1519,11 +1519,11 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
}
}
}
void
ClientField
::
UpdateDeclarableCode
(
bool
enter
)
{
void
ClientField
::
UpdateDeclarableCode
()
{
if
(
opcode
.
size
()
==
0
)
UpdateDeclarableCodeType
(
enter
);
UpdateDeclarableCodeType
();
else
UpdateDeclarableCodeOpcode
(
enter
);
UpdateDeclarableCodeOpcode
();
}
void
ClientField
::
RefreshCardCountDisplay
()
{
ClientCard
*
pcard
;
...
...
Classes/gframe/client_field.h
View file @
af3b8c36
...
...
@@ -115,9 +115,9 @@ public:
void
check_sel_sum_t
(
const
std
::
set
<
ClientCard
*>&
left
,
int
acc
);
bool
check_sum
(
std
::
set
<
ClientCard
*>::
const_iterator
index
,
std
::
set
<
ClientCard
*>::
const_iterator
end
,
int
acc
,
int
count
);
void
UpdateDeclarableCodeType
(
bool
enter
);
void
UpdateDeclarableCodeOpcode
(
bool
enter
);
void
UpdateDeclarableCode
(
bool
enter
);
void
UpdateDeclarableCodeType
();
void
UpdateDeclarableCodeOpcode
();
void
UpdateDeclarableCode
();
void
RefreshCardCountDisplay
();
irr
::
gui
::
IGUIElement
*
panel
;
...
...
Classes/gframe/duelclient.cpp
View file @
af3b8c36
...
...
@@ -3463,7 +3463,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
dField
.
UpdateDeclarableCode
(
false
);
mainGame
->
dField
.
UpdateDeclarableCode
();
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
gMutex
.
Unlock
();
return
false
;
...
...
@@ -3490,7 +3490,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
case
MSG_ANNOUNCE_CARD_FILTER
:
{
/*int player = */
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
mainGame
->
dField
.
declarable_type
=
0
;
mainGame
->
dField
.
opcode
.
clear
();
for
(
int
i
=
0
;
i
<
count
;
++
i
)
...
...
@@ -3502,7 +3502,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
dField
.
UpdateDeclarableCode
(
false
);
mainGame
->
dField
.
UpdateDeclarableCode
();
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
gMutex
.
Unlock
();
return
false
;
...
...
Classes/gframe/event_handler.cpp
View file @
af3b8c36
...
...
@@ -973,7 +973,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
irr
:
:
gui
::
EGET_EDITBOX_CHANGED
:
{
switch
(
id
)
{
case
EDITBOX_ANCARD
:
{
UpdateDeclarableCode
(
false
);
UpdateDeclarableCode
();
break
;
}
}
...
...
@@ -982,7 +982,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
irr
:
:
gui
::
EGET_EDITBOX_ENTER
:
{
switch
(
id
)
{
case
EDITBOX_ANCARD
:
{
UpdateDeclarableCode
(
true
);
UpdateDeclarableCode
();
break
;
}
}
...
...
Classes/gframe/replay_mode.cpp
View file @
af3b8c36
...
...
@@ -775,7 +775,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_CARD_FILTER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
*
count
;
return
ReadReplayResponse
();
}
...
...
Classes/gframe/single_duel.cpp
View file @
af3b8c36
...
...
@@ -1347,7 +1347,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_CARD_FILTER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
*
count
;
WaitforResponse
(
player
);
NetServer
::
SendBufferToPlayer
(
players
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
...
...
Classes/gframe/single_mode.cpp
View file @
af3b8c36
...
...
@@ -682,7 +682,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_CARD_FILTER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
*
count
;
if
(
!
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
))
{
mainGame
->
singleSignal
.
Reset
();
...
...
Classes/gframe/tag_duel.cpp
View file @
af3b8c36
...
...
@@ -1396,7 +1396,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_CARD_FILTER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
*
count
;
WaitforResponse
(
player
);
NetServer
::
SendBufferToPlayer
(
cur_player
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
...
...
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