Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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-core
Commits
bdba284b
Commit
bdba284b
authored
Oct 02, 2024
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
class field: check playerid
parent
257688b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
field.cpp
field.cpp
+3
-3
No files found.
field.cpp
View file @
bdba284b
...
...
@@ -192,7 +192,7 @@ void field::add_card(uint8 playerid, card* pcard, uint8 location, uint8 sequence
refresh_player_info
(
playerid
);
}
void
field
::
remove_card
(
card
*
pcard
)
{
if
(
pcard
->
current
.
controler
==
PLAYER_NONE
||
pcard
->
current
.
location
==
0
)
if
(
!
check_playerid
(
pcard
->
current
.
controler
)
||
pcard
->
current
.
location
==
0
)
return
;
uint8
playerid
=
pcard
->
current
.
controler
;
switch
(
pcard
->
current
.
location
)
{
...
...
@@ -1371,7 +1371,7 @@ void field::filter_affected_cards(effect* peffect, card_set* cset) {
||
peffect
->
is_flag
(
EFFECT_FLAG_PLAYER_TARGET
|
EFFECT_FLAG_SPSUM_PARAM
))
return
;
uint8
self
=
peffect
->
get_handler_player
();
if
(
self
==
PLAYER_NONE
)
if
(
!
check_playerid
(
self
)
)
return
;
std
::
vector
<
card_vector
*>
cvec
;
uint16
range
=
peffect
->
s_range
;
...
...
@@ -2144,7 +2144,7 @@ void field::add_unique_card(card* pcard) {
}
void
field
::
remove_unique_card
(
card
*
pcard
)
{
uint8
con
=
pcard
->
current
.
controler
;
if
(
con
==
PLAYER_NONE
)
if
(
!
check_playerid
(
con
)
)
return
;
if
(
pcard
->
unique_pos
[
0
])
core
.
unique_cards
[
con
].
erase
(
pcard
);
...
...
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