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
苍蓝
ygopro
Commits
bf72e8c6
Commit
bf72e8c6
authored
Mar 25, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
76b564b8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
17 deletions
+20
-17
gframe/deck_con.cpp
gframe/deck_con.cpp
+15
-12
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+1
-1
gframe/duelclient.cpp
gframe/duelclient.cpp
+2
-2
ocgcore
ocgcore
+1
-1
script
script
+1
-1
No files found.
gframe/deck_con.cpp
View file @
bf72e8c6
...
...
@@ -443,7 +443,8 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
if
(
!
is_draging
)
break
;
if
(
!
mainGame
->
is_siding
)
{
if
((
hovered_pos
==
1
&&
(
draging_pointer
->
second
.
type
&
0x802040
))
||
(
hovered_pos
==
2
&&
!
(
draging_pointer
->
second
.
type
&
0x802040
)))
if
((
hovered_pos
==
1
&&
(
draging_pointer
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)))
||
(
hovered_pos
==
2
&&
!
(
draging_pointer
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
))))
hovered_pos
=
0
;
if
((
hovered_pos
==
1
||
(
hovered_pos
==
0
&&
click_pos
==
1
))
&&
deckManager
.
current_deck
.
main
.
size
()
<
60
)
{
if
(
hovered_seq
==
-
1
)
...
...
@@ -469,7 +470,9 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
}
else
if
(
hovered_pos
==
4
)
is_draging
=
false
;
}
else
{
if
((
hovered_pos
==
1
&&
(
draging_pointer
->
second
.
type
&
0x802040
))
||
(
hovered_pos
==
2
&&
!
(
draging_pointer
->
second
.
type
&
0x802040
))
||
hovered_pos
==
4
)
if
((
hovered_pos
==
1
&&
(
draging_pointer
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)))
||
(
hovered_pos
==
2
&&
!
(
draging_pointer
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)))
||
hovered_pos
==
4
)
hovered_pos
=
0
;
if
((
hovered_pos
==
1
||
(
hovered_pos
==
0
&&
click_pos
==
1
))
&&
deckManager
.
current_deck
.
main
.
size
()
<
65
)
{
if
(
hovered_seq
==
-
1
)
...
...
@@ -525,11 +528,11 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
deckManager
.
current_deck
.
side
.
push_back
(
draging_pointer
);
}
}
else
{
if
((
draging_pointer
->
second
.
type
&
0x802040
)
&&
deckManager
.
current_deck
.
extra
.
size
()
<
20
)
{
if
((
draging_pointer
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)
)
&&
deckManager
.
current_deck
.
extra
.
size
()
<
20
)
{
deckManager
.
current_deck
.
side
.
erase
(
deckManager
.
current_deck
.
side
.
begin
()
+
hovered_seq
);
deckManager
.
current_deck
.
extra
.
push_back
(
draging_pointer
);
}
if
(
!
(
draging_pointer
->
second
.
type
&
0x802040
)
&&
deckManager
.
current_deck
.
main
.
size
()
<
64
)
{
if
(
!
(
draging_pointer
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)
)
&&
deckManager
.
current_deck
.
main
.
size
()
<
64
)
{
deckManager
.
current_deck
.
side
.
erase
(
deckManager
.
current_deck
.
side
.
begin
()
+
hovered_seq
);
deckManager
.
current_deck
.
main
.
push_back
(
draging_pointer
);
}
...
...
@@ -563,10 +566,10 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
if
(
!
is_draging
)
deckManager
.
current_deck
.
side
.
erase
(
deckManager
.
current_deck
.
side
.
begin
()
+
hovered_seq
);
else
{
if
((
draging_pointer
->
second
.
type
&
0x802040
)
&&
deckManager
.
current_deck
.
extra
.
size
()
<
15
)
{
if
((
draging_pointer
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)
)
&&
deckManager
.
current_deck
.
extra
.
size
()
<
15
)
{
deckManager
.
current_deck
.
extra
.
push_back
(
draging_pointer
);
is_draging
=
false
;
}
else
if
(
!
(
draging_pointer
->
second
.
type
&
0x802040
)
&&
deckManager
.
current_deck
.
main
.
size
()
<
60
)
{
}
else
if
(
!
(
draging_pointer
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)
)
&&
deckManager
.
current_deck
.
main
.
size
()
<
60
)
{
deckManager
.
current_deck
.
main
.
push_back
(
draging_pointer
);
is_draging
=
false
;
}
...
...
@@ -596,9 +599,9 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
limit
--
;
if
(
limit
<=
0
)
break
;
if
((
draging_pointer
->
second
.
type
&
0x802040
)
&&
deckManager
.
current_deck
.
extra
.
size
()
<
15
)
{
if
((
draging_pointer
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)
)
&&
deckManager
.
current_deck
.
extra
.
size
()
<
15
)
{
deckManager
.
current_deck
.
extra
.
push_back
(
draging_pointer
);
}
else
if
(
!
(
draging_pointer
->
second
.
type
&
0x802040
)
&&
deckManager
.
current_deck
.
main
.
size
()
<
60
)
{
}
else
if
(
!
(
draging_pointer
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)
)
&&
deckManager
.
current_deck
.
main
.
size
()
<
60
)
{
deckManager
.
current_deck
.
main
.
push_back
(
draging_pointer
);
}
else
if
(
deckManager
.
current_deck
.
side
.
size
()
<
15
)
{
deckManager
.
current_deck
.
side
.
push_back
(
draging_pointer
);
...
...
@@ -649,15 +652,15 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
if
(
deckManager
.
current_deck
.
side
.
size
()
<
15
)
deckManager
.
current_deck
.
side
.
push_back
(
draging_pointer
);
else
{
if
((
draging_pointer
->
second
.
type
&
0x802040
)
&&
deckManager
.
current_deck
.
extra
.
size
()
<
15
)
if
((
draging_pointer
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)
)
&&
deckManager
.
current_deck
.
extra
.
size
()
<
15
)
deckManager
.
current_deck
.
extra
.
push_back
(
draging_pointer
);
else
if
(
!
(
draging_pointer
->
second
.
type
&
0x802040
)
&&
deckManager
.
current_deck
.
main
.
size
()
<
60
)
else
if
(
!
(
draging_pointer
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)
)
&&
deckManager
.
current_deck
.
main
.
size
()
<
60
)
deckManager
.
current_deck
.
main
.
push_back
(
draging_pointer
);
}
}
else
{
if
((
draging_pointer
->
second
.
type
&
0x802040
)
&&
deckManager
.
current_deck
.
extra
.
size
()
<
15
)
if
((
draging_pointer
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)
)
&&
deckManager
.
current_deck
.
extra
.
size
()
<
15
)
deckManager
.
current_deck
.
extra
.
push_back
(
draging_pointer
);
else
if
(
!
(
draging_pointer
->
second
.
type
&
0x802040
)
&&
deckManager
.
current_deck
.
main
.
size
()
<
60
)
else
if
(
!
(
draging_pointer
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)
)
&&
deckManager
.
current_deck
.
main
.
size
()
<
60
)
deckManager
.
current_deck
.
main
.
push_back
(
draging_pointer
);
else
if
(
deckManager
.
current_deck
.
side
.
size
()
<
15
)
deckManager
.
current_deck
.
side
.
push_back
(
draging_pointer
);
...
...
gframe/deck_manager.cpp
View file @
bf72e8c6
...
...
@@ -127,7 +127,7 @@ void DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec) {
continue
;
if
(
cd
.
type
&
TYPE_TOKEN
)
continue
;
else
if
(
cd
.
type
&
0x4802040
&&
deck
.
extra
.
size
()
<
15
)
{
else
if
(
cd
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)
&&
deck
.
extra
.
size
()
<
15
)
{
deck
.
extra
.
push_back
(
dataManager
.
GetCodePointer
(
code
));
//verified by GetData()
}
else
if
(
deck
.
main
.
size
()
<
60
)
{
deck
.
main
.
push_back
(
dataManager
.
GetCodePointer
(
code
));
...
...
gframe/duelclient.cpp
View file @
bf72e8c6
...
...
@@ -1773,7 +1773,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
(
*
cit
)
->
location
=
LOCATION_GRAVE
;
int
m
=
0
;
for
(
auto
cit
=
mainGame
->
dField
.
deck
[
player
].
begin
();
cit
!=
mainGame
->
dField
.
deck
[
player
].
end
();
)
{
if
((
*
cit
)
->
type
&
0x802040
)
{
if
((
*
cit
)
->
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)
)
{
(
*
cit
)
->
position
=
POS_FACEDOWN
;
mainGame
->
dField
.
AddCard
(
*
cit
,
player
,
LOCATION_EXTRA
,
0
);
cit
=
mainGame
->
dField
.
deck
[
player
].
erase
(
cit
);
...
...
@@ -1793,7 +1793,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int
m
=
0
;
for
(
auto
cit
=
mainGame
->
dField
.
deck
[
player
].
begin
();
cit
!=
mainGame
->
dField
.
deck
[
player
].
end
();
)
{
ClientCard
*
pcard
=
*
cit
;
if
(
pcard
->
type
&
0x802040
)
{
if
(
pcard
->
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
)
)
{
pcard
->
position
=
POS_FACEDOWN
;
mainGame
->
dField
.
AddCard
(
pcard
,
player
,
LOCATION_EXTRA
,
0
);
cit
=
mainGame
->
dField
.
deck
[
player
].
erase
(
cit
);
...
...
ocgcore
@
f7212e86
Subproject commit
c49a463fab6446c90354a12cb3f6377cb1c3bbb
a
Subproject commit
f7212e86adc50d53a854691bbcb61ae82276202
a
script
@
937e833a
Subproject commit
5bac33f528c7838f1909fd4e460d1b9d5308bdf8
Subproject commit
937e833a299591a46c339695a4c62e0b2af1694a
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