Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
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
MyCard
Neos
Commits
62d10b5a
Commit
62d10b5a
authored
Jan 19, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add MsgSelectUnselectCard adapter and service
parent
ea966ce4
Pipeline
#19667
passed with stages
in 3 minutes and 44 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
0 deletions
+67
-0
src/api/ocgcore/ocgAdapter/protoDecl.ts
src/api/ocgcore/ocgAdapter/protoDecl.ts
+1
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
+6
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectUnselectCard.ts
...ocgcore/ocgAdapter/stoc/stocGameMsg/selectUnselectCard.ts
+50
-0
src/service/duel/selectUnselectCard.ts
src/service/duel/selectUnselectCard.ts
+10
-0
No files found.
src/api/ocgcore/ocgAdapter/protoDecl.ts
View file @
62d10b5a
...
...
@@ -40,3 +40,4 @@ export const MSG_SELECT_EFFECTYN = 12;
export
const
MSG_SELECT_POSITION
=
19
;
export
const
MSG_SELECT_OPTION
=
14
;
export
const
MSG_SELECT_BATTLE_CMD
=
10
;
export
const
MSG_SELECT_UNSELECT_CARD
=
26
;
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
View file @
62d10b5a
...
...
@@ -19,6 +19,7 @@ import MsgSelectEffectYnAdapter from "./selectEffectYn";
import
MsgSelectPositionAdapter
from
"
./selectPosition
"
;
import
MsgSelectOptionAdapter
from
"
./selectOption
"
;
import
MsgSelectBattleCmdAdapter
from
"
./selectBattleCmd
"
;
import
MsgSelectUnselectCardAdapter
from
"
./selectUnselectCard
"
;
import
PENETRATE
from
"
./penetrate
"
;
/*
...
...
@@ -111,6 +112,11 @@ export default class GameMsgAdapter implements StocAdapter {
break
;
}
case
GAME_MSG
.
MSG_SELECT_UNSELECT_CARD
:
{
gameMsg
.
select_unselect_card
=
MsgSelectUnselectCardAdapter
(
gameData
);
break
;
}
default
:
{
console
.
log
(
"
Unhandled GameMessage function=
"
,
func
);
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectUnselectCard.ts
0 → 100644
View file @
62d10b5a
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
import
MsgSelectUnselectCard
=
ygopro
.
StocGameMessage
.
MsgSelectUnselectCard
;
/*
* Msg Select Unselect Card
*
* @param -
*
* @usage - 玩家选择未选择的卡牌
* */
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
true
);
const
player
=
reader
.
readUint8
();
const
finishable
=
reader
.
readUint8
()
!=
0
;
const
cancelable
=
reader
.
readUint8
()
!=
0
;
const
min
=
reader
.
readUint8
();
const
max
=
reader
.
readUint8
();
const
msg
=
new
MsgSelectUnselectCard
({
player
,
finishable
,
cancelable
,
min
,
max
,
});
const
count1
=
reader
.
readUint8
();
for
(
let
i
=
0
;
i
<
count1
;
i
++
)
{
const
code
=
reader
.
readUint32
();
const
location
=
reader
.
readCardLocation
();
msg
.
selectable_cards
.
push
(
new
MsgSelectUnselectCard
.
Info
({
code
,
location
,
response
:
i
})
);
}
const
count2
=
reader
.
readUint8
();
for
(
let
i
=
count1
;
i
<
count1
+
count2
;
i
++
)
{
const
code
=
reader
.
readUint32
();
const
location
=
reader
.
readCardLocation
();
msg
.
selected_cards
.
push
(
new
MsgSelectUnselectCard
.
Info
({
code
,
location
,
response
:
i
})
);
}
return
msg
;
};
src/service/duel/selectUnselectCard.ts
0 → 100644
View file @
62d10b5a
import
{
ygopro
}
from
"
../../api/ocgcore/idl/ocgcore
"
;
import
{
AppDispatch
}
from
"
../../store
"
;
import
MsgSelectUnselectCard
=
ygopro
.
StocGameMessage
.
MsgSelectUnselectCard
;
export
default
(
selectUnselectCard
:
MsgSelectUnselectCard
,
dispatch
:
AppDispatch
)
=>
{
console
.
log
(
selectUnselectCard
);
};
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