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
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
MyCard
windbot
Commits
dffbba77
Commit
dffbba77
authored
Aug 24, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ClientCard.EquipCards
parent
4f1c689e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
1 deletion
+44
-1
Game/ClientCard.cs
Game/ClientCard.cs
+5
-0
Game/GameBehavior.cs
Game/GameBehavior.cs
+39
-1
No files found.
Game/ClientCard.cs
View file @
dffbba77
...
...
@@ -36,6 +36,10 @@ namespace WindBot.Game
public
int
SelectSeq
{
get
;
set
;
}
public
int
OpParam1
{
get
;
set
;
}
public
int
OpParam2
{
get
;
set
;
}
public
List
<
ClientCard
>
EquipCards
{
get
;
set
;
}
public
ClientCard
EquipTarget
;
public
bool
CanDirectAttack
{
get
;
set
;
}
public
bool
ShouldDirectAttack
{
get
;
set
;
}
public
bool
Attacked
{
get
;
set
;
}
...
...
@@ -56,6 +60,7 @@ namespace WindBot.Game
Sequence
=
sequence
;
Position
=
position
;
Overlays
=
new
List
<
int
>();
EquipCards
=
new
List
<
ClientCard
>();
ActionIndex
=
new
int
[
16
];
ActionActivateIndex
=
new
Dictionary
<
int
,
int
>();
Location
=
loc
;
...
...
Game/GameBehavior.cs
View file @
dffbba77
...
...
@@ -130,7 +130,8 @@ namespace WindBot.Game
_messages
.
Add
(
GameMessage
.
AnnounceRace
,
OnAnnounceRace
);
_messages
.
Add
(
GameMessage
.
AnnounceCardFilter
,
OnAnnounceCard
);
_messages
.
Add
(
GameMessage
.
RockPaperScissors
,
OnRockPaperScissors
);
_messages
.
Add
(
GameMessage
.
Equip
,
OnEquip
);
_messages
.
Add
(
GameMessage
.
Unequip
,
OnUnEquip
);
_messages
.
Add
(
GameMessage
.
Summoning
,
OnSummoning
);
_messages
.
Add
(
GameMessage
.
Summoned
,
OnSummoned
);
_messages
.
Add
(
GameMessage
.
SpSummoning
,
OnSpSummoning
);
...
...
@@ -1412,6 +1413,43 @@ namespace WindBot.Game
Connection
.
Send
(
CtosMessage
.
Response
,
result
);
}
private
void
OnEquip
(
BinaryReader
packet
)
{
int
equipCardControler
=
GetLocalPlayer
(
packet
.
ReadByte
());
int
equipCardLocation
=
packet
.
ReadByte
();
int
equipCardSequence
=
packet
.
ReadSByte
();
packet
.
ReadByte
();
int
targetCardControler
=
GetLocalPlayer
(
packet
.
ReadByte
());
int
targetCardLocation
=
packet
.
ReadByte
();
int
targetCardSequence
=
packet
.
ReadSByte
();
packet
.
ReadByte
();
ClientCard
equipCard
=
_duel
.
GetCard
(
equipCardControler
,
(
CardLocation
)
equipCardLocation
,
equipCardSequence
);
ClientCard
targetCard
=
_duel
.
GetCard
(
targetCardControler
,
(
CardLocation
)
targetCardLocation
,
targetCardSequence
);
if
(
equipCard
==
null
||
targetCard
==
null
)
return
;
if
(
equipCard
.
EquipTarget
!=
null
)
{
equipCard
.
EquipTarget
.
EquipCards
.
Remove
(
equipCard
);
}
equipCard
.
EquipTarget
=
targetCard
;
targetCard
.
EquipCards
.
Add
(
equipCard
);
}
private
void
OnUnEquip
(
BinaryReader
packet
)
{
int
equipCardControler
=
GetLocalPlayer
(
packet
.
ReadByte
());
int
equipCardLocation
=
packet
.
ReadByte
();
int
equipCardSequence
=
packet
.
ReadSByte
();
packet
.
ReadByte
();
ClientCard
equipCard
=
_duel
.
GetCard
(
equipCardControler
,
(
CardLocation
)
equipCardLocation
,
equipCardSequence
);
if
(
equipCard
==
null
)
return
;
if
(
equipCard
.
EquipTarget
!=
null
)
{
equipCard
.
EquipTarget
.
EquipCards
.
Remove
(
equipCard
);
equipCard
.
EquipTarget
=
null
;
}
}
private
void
OnSummoning
(
BinaryReader
packet
)
{
_duel
.
LastSummonedCards
.
Clear
();
...
...
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