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
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
love_飞影
Neos
Commits
8a1a90de
Commit
8a1a90de
authored
Mar 25, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix ocgAdapter
parent
82168772
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
18 deletions
+19
-18
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
+1
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectSum.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectSum.ts
+4
-2
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectTribute.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectTribute.ts
+14
-15
No files found.
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
View file @
8a1a90de
...
@@ -96,7 +96,7 @@ export default class GameMsgAdapter implements StocAdapter {
...
@@ -96,7 +96,7 @@ export default class GameMsgAdapter implements StocAdapter {
break
;
break
;
}
}
case
GAME_MSG
.
MSG_SELECT_TRIBUTE
:
{
case
GAME_MSG
.
MSG_SELECT_TRIBUTE
:
{
gameMsg
.
select_
card
=
MsgSelectTributeAdapter
(
gameData
);
gameMsg
.
select_
tribute
=
MsgSelectTributeAdapter
(
gameData
);
break
;
break
;
}
}
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectSum.ts
View file @
8a1a90de
...
@@ -50,13 +50,15 @@ export default (data: Uint8Array) => {
...
@@ -50,13 +50,15 @@ export default (data: Uint8Array) => {
const
code
=
reader
.
inner
.
readInt32
();
const
code
=
reader
.
inner
.
readInt32
();
const
location
=
reader
.
readCardShortLocation
();
const
location
=
reader
.
readCardShortLocation
();
const
para
=
reader
.
inner
.
readInt32
();
const
para
=
reader
.
inner
.
readInt32
();
const
level1
=
para
&
0xffff
;
const
level2
=
para
>>
16
>
0
?
para
>>
16
:
level1
;
msg
.
selectable_cards
.
push
(
msg
.
selectable_cards
.
push
(
new
MsgSelectSum
.
Info
({
new
MsgSelectSum
.
Info
({
code
,
code
,
location
,
location
,
level1
:
para
&
0xffff
,
level1
,
level2
:
para
>>
16
,
level2
,
response
:
i
,
response
:
i
,
})
})
);
);
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectTribute.ts
View file @
8a1a90de
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReaderExt
}
from
"
../../bufferIO
"
;
import
{
BufferReaderExt
}
from
"
../../bufferIO
"
;
import
MsgSelect
Card
=
ygopro
.
StocGameMessage
.
MsgSelectCard
;
import
MsgSelect
Tribute
=
ygopro
.
StocGameMessage
.
MsgSelectTribute
;
/*
/*
* Msg Select Tribute
* Msg Select Tribute
...
@@ -10,7 +10,6 @@ import MsgSelectCard = ygopro.StocGameMessage.MsgSelectCard;
...
@@ -10,7 +10,6 @@ import MsgSelectCard = ygopro.StocGameMessage.MsgSelectCard;
* */
* */
export
default
(
data
:
Uint8Array
)
=>
{
export
default
(
data
:
Uint8Array
)
=>
{
// FIXME: handle it correctly
const
reader
=
new
BufferReaderExt
(
data
);
const
reader
=
new
BufferReaderExt
(
data
);
const
player
=
reader
.
inner
.
readUint8
();
const
player
=
reader
.
inner
.
readUint8
();
...
@@ -19,25 +18,25 @@ export default (data: Uint8Array) => {
...
@@ -19,25 +18,25 @@ export default (data: Uint8Array) => {
const
max
=
reader
.
inner
.
readUint8
();
const
max
=
reader
.
inner
.
readUint8
();
const
count
=
reader
.
inner
.
readUint8
();
const
count
=
reader
.
inner
.
readUint8
();
const
msg
=
new
MsgSelectCard
({
player
,
cancelable
,
min
,
max
});
const
msg
=
new
MsgSelectTribute
({
player
,
cancelable
,
min
,
max
,
selectable_cards
:
[],
});
for
(
let
i
=
0
;
i
<
count
;
i
++
)
{
for
(
let
i
=
0
;
i
<
count
;
i
++
)
{
const
code
=
reader
.
inner
.
readUint32
();
const
code
=
reader
.
inner
.
readUint32
();
const
controler
=
reader
.
inner
.
readUint8
();
const
location
=
reader
.
readCardShortLocation
();
const
location
=
reader
.
inner
.
readUint8
();
const
level
=
reader
.
inner
.
readUint8
();
const
sequence
=
reader
.
inner
.
readUint8
();
const
release_param
=
reader
.
inner
.
readUint8
();
msg
.
cards
.
push
(
msg
.
selectable_
cards
.
push
(
new
MsgSelect
Card
.
SelectAbleCard
({
new
MsgSelect
Tribute
.
Info
({
code
,
code
,
location
:
new
ygopro
.
CardLocation
({
location
,
controler
,
level
,
location
,
sequence
,
}),
response
:
i
,
response
:
i
,
release_param
,
})
})
);
);
}
}
...
...
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