Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
windbot
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
xiaoye
windbot
Commits
11169f23
Commit
11169f23
authored
Jul 09, 2024
by
wind2009
Committed by
GitHub
Jul 09, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bot's behavior in SelectUnSelect (#198)
parent
65954e36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
Game/ClientCard.cs
Game/ClientCard.cs
+2
-3
Game/GameBehavior.cs
Game/GameBehavior.cs
+9
-1
No files found.
Game/ClientCard.cs
View file @
11169f23
...
@@ -82,8 +82,7 @@ namespace WindBot.Game
...
@@ -82,8 +82,7 @@ namespace WindBot.Game
if
(
Data
!=
null
)
if
(
Data
!=
null
)
{
{
Name
=
Data
.
Name
;
Name
=
Data
.
Name
;
if
(
Data
.
Alias
!=
0
)
Alias
=
Data
.
Alias
;
Alias
=
Data
.
Alias
;
}
else
{
}
else
{
Name
=
null
;
Name
=
null
;
Alias
=
0
;
Alias
=
0
;
...
@@ -387,4 +386,4 @@ namespace WindBot.Game
...
@@ -387,4 +386,4 @@ namespace WindBot.Game
return
ReferenceEquals
(
this
,
card
);
return
ReferenceEquals
(
this
,
card
);
}
}
}
}
}
}
\ No newline at end of file
Game/GameBehavior.cs
View file @
11169f23
...
@@ -1090,7 +1090,7 @@ namespace WindBot.Game
...
@@ -1090,7 +1090,7 @@ namespace WindBot.Game
else
else
card
=
_duel
.
GetCard
(
player
,
loc
,
seq
);
card
=
_duel
.
GetCard
(
player
,
loc
,
seq
);
if
(
card
==
null
)
continue
;
if
(
card
==
null
)
continue
;
if
(
card
.
Id
==
0
)
if
(
card
.
Id
==
0
||
card
.
Location
==
CardLocation
.
Deck
)
card
.
SetId
(
id
);
card
.
SetId
(
id
);
cards
.
Add
(
card
);
cards
.
Add
(
card
);
}
}
...
@@ -1102,6 +1102,14 @@ namespace WindBot.Game
...
@@ -1102,6 +1102,14 @@ namespace WindBot.Game
CardLocation
loc
=
(
CardLocation
)
packet
.
ReadByte
();
CardLocation
loc
=
(
CardLocation
)
packet
.
ReadByte
();
int
seq
=
packet
.
ReadByte
();
int
seq
=
packet
.
ReadByte
();
packet
.
ReadByte
();
// pos
packet
.
ReadByte
();
// pos
ClientCard
card
;
if
(((
int
)
loc
&
(
int
)
CardLocation
.
Overlay
)
!=
0
)
card
=
new
ClientCard
(
id
,
CardLocation
.
Overlay
,
-
1
);
else
card
=
_duel
.
GetCard
(
player
,
loc
,
seq
);
if
(
card
==
null
)
continue
;
if
(
card
.
Id
==
0
||
card
.
Location
==
CardLocation
.
Deck
)
card
.
SetId
(
id
);
}
}
if
(
count2
==
0
)
cancelable
=
false
;
if
(
count2
==
0
)
cancelable
=
false
;
...
...
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