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
b0599432
Commit
b0599432
authored
Mar 30, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle select_counter
parent
f3b577a8
Pipeline
#21018
passed with stages
in 18 minutes and 25 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
0 deletions
+61
-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/selectCounter.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectCounter.ts
+41
-0
src/service/duel/gameMsg.ts
src/service/duel/gameMsg.ts
+6
-0
src/service/duel/selectCounter.ts
src/service/duel/selectCounter.ts
+7
-0
No files found.
src/api/ocgcore/ocgAdapter/protoDecl.ts
View file @
b0599432
...
...
@@ -54,3 +54,4 @@ export const MSG_RELOAD_FIELD = 162;
export
const
MSG_SELECT_SUM
=
23
;
export
const
MSG_ADD_COUNTER
=
101
;
export
const
MSG_REMOVE_COUNTER
=
102
;
export
const
MSG_SELECT_COUNTER
=
22
;
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
View file @
b0599432
...
...
@@ -30,6 +30,7 @@ import MsgReloadFieldAdapter from "./reloadField";
import
MsgSelectSum
from
"
./selectSum
"
;
import
MsgAddCounter
from
"
./addCounter
"
;
import
MsgRemoveCounter
from
"
./removeCounter
"
;
import
MsgSelectCounter
from
"
./selectCounter
"
;
import
PENETRATE
from
"
./penetrate
"
;
/*
...
...
@@ -178,6 +179,11 @@ export default class GameMsgAdapter implements StocAdapter {
break
;
}
case
GAME_MSG
.
MSG_SELECT_COUNTER
:
{
gameMsg
.
select_counter
=
MsgSelectCounter
(
gameData
);
break
;
}
default
:
{
gameMsg
.
unimplemented
=
new
ygopro
.
StocGameMessage
.
MsgUnimplemented
({
command
:
func
,
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectCounter.ts
0 → 100644
View file @
b0599432
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReaderExt
}
from
"
../../bufferIO
"
;
import
MsgSelectCounter
=
ygopro
.
StocGameMessage
.
MsgSelectCounter
;
/*
* Msg Select Counter
*
* @param - TODO
* @usage - TODO
**/
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReaderExt
(
data
);
const
player
=
reader
.
inner
.
readUint8
();
const
counterType
=
reader
.
inner
.
readUint16
();
const
min
=
reader
.
inner
.
readUint16
();
const
msg
=
new
MsgSelectCounter
({
player
,
counter_type
:
counterType
,
min
,
options
:
[],
});
const
count
=
reader
.
inner
.
readUint8
();
for
(
let
i
=
0
;
i
<
count
;
i
++
)
{
const
code
=
reader
.
inner
.
readUint32
();
const
location
=
reader
.
readCardShortLocation
();
const
counterCount
=
reader
.
inner
.
readUint16
();
msg
.
options
.
push
(
new
MsgSelectCounter
.
Info
({
code
,
location
,
counter_count
:
counterCount
,
})
);
}
return
msg
;
};
src/service/duel/gameMsg.ts
View file @
b0599432
...
...
@@ -27,6 +27,7 @@ import onMsgReloadField from "./reloadField";
import
onMsgSelectSum
from
"
./selectSum
"
;
import
onMsgSelectTribute
from
"
./selectTribute
"
;
import
onMsgUpdateCounter
from
"
./updateCounter
"
;
import
onMsgSelectCounter
from
"
./selectCounter
"
;
import
{
setWaiting
}
from
"
../../reducers/duel/mod
"
;
const
ActiveList
=
[
...
...
@@ -181,6 +182,11 @@ export default function handleGameMsg(pb: ygopro.YgoStocMsg) {
break
;
}
case
"
select_counter
"
:
{
onMsgSelectCounter
(
msg
.
select_counter
,
dispatch
);
break
;
}
case
"
unimplemented
"
:
{
onUnimplemented
(
msg
.
unimplemented
,
dispatch
);
...
...
src/service/duel/selectCounter.ts
0 → 100644
View file @
b0599432
import
{
ygopro
}
from
"
../../api/ocgcore/idl/ocgcore
"
;
import
{
AppDispatch
}
from
"
../../store
"
;
import
MsgSelectCounter
=
ygopro
.
StocGameMessage
.
MsgSelectCounter
;
export
default
(
selectCounter
:
MsgSelectCounter
,
dispatch
:
AppDispatch
)
=>
{
console
.
log
(
selectCounter
);
};
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