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
06cbef40
Commit
06cbef40
authored
Mar 16, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
migrate BufferReader
parent
fba2301f
Pipeline
#20714
failed with stages
in 24 minutes and 58 seconds
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
30 additions
and
28 deletions
+30
-28
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/draw.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/draw.ts
+3
-4
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/hint.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/hint.ts
+3
-4
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newPhase.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newPhase.ts
+3
-4
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newTurn.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newTurn.ts
+3
-4
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/recover.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/recover.ts
+3
-2
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectOption.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectOption.ts
+3
-2
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPlace.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPlace.ts
+3
-2
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPosition.ts
...api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPosition.ts
+3
-2
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/win.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/win.ts
+3
-2
src/api/ocgcore/ocgAdapter/stoc/stocTimeLimit.ts
src/api/ocgcore/ocgAdapter/stoc/stocTimeLimit.ts
+3
-2
No files found.
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/draw.ts
View file @
06cbef40
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
const
LITTLE_ENDIAN
=
true
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
/*
* MSG Draw
...
...
@@ -11,7 +10,7 @@ const LITTLE_ENDIAN = true;
* @usage - 玩家抽卡内容
* */
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
LITTLE_ENDIAN
);
const
reader
=
new
BufferReader
(
data
);
const
player
=
reader
.
readUint8
();
const
count
=
reader
.
readUint8
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/hint.ts
View file @
06cbef40
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
const
LITTLE_ENDIAN
=
true
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
/*
* Msg Hint
...
...
@@ -14,7 +13,7 @@ const LITTLE_ENDIAN = true;
* */
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
LITTLE_ENDIAN
);
const
reader
=
new
BufferReader
(
data
);
const
hintCommand
=
reader
.
readUint8
();
const
hintPlayer
=
reader
.
readUint8
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newPhase.ts
View file @
06cbef40
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
const
LITTLE_ENDIAN
=
true
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
/*
* Msg New Phase
...
...
@@ -12,7 +11,7 @@ const LITTLE_ENDIAN = true;
* */
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
LITTLE_ENDIAN
);
const
reader
=
new
BufferReader
(
data
);
const
phase
=
reader
.
readUint16
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/newTurn.ts
View file @
06cbef40
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
const
LITTLE_ENDIAN
=
true
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
/*
* MSG New Turn
...
...
@@ -12,7 +11,7 @@ const LITTLE_ENDIAN = true;
* */
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
LITTLE_ENDIAN
);
const
reader
=
new
BufferReader
(
data
);
const
player
=
reader
.
readUint8
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/recover.ts
View file @
06cbef40
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
/*
* Msg Recover
...
...
@@ -8,7 +9,7 @@ import { BufferReader } from "../../bufferIO";
* @param value - 回复的Hp数值
* */
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
true
);
const
reader
=
new
BufferReader
(
data
);
const
player
=
reader
.
readUint8
();
const
value
=
reader
.
readInt32
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectOption.ts
View file @
06cbef40
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
MsgSelectOption
=
ygopro
.
StocGameMessage
.
MsgSelectOption
;
/*
...
...
@@ -11,7 +12,7 @@ import MsgSelectOption = ygopro.StocGameMessage.MsgSelectOption;
* */
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
true
);
const
reader
=
new
BufferReader
(
data
);
const
player
=
reader
.
readUint8
();
const
count
=
reader
.
readUint8
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPlace.ts
View file @
06cbef40
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
MsgSelectPlace
=
ygopro
.
StocGameMessage
.
MsgSelectPlace
;
/*
...
...
@@ -11,7 +12,7 @@ import MsgSelectPlace = ygopro.StocGameMessage.MsgSelectPlace;
* */
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
true
);
const
reader
=
new
BufferReader
(
data
);
const
player
=
reader
.
readUint8
();
let
count
=
reader
.
readUint8
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/selectPosition.ts
View file @
06cbef40
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
MsgSelectPosition
=
ygopro
.
StocGameMessage
.
MsgSelectPosition
;
/*
...
...
@@ -11,7 +12,7 @@ import MsgSelectPosition = ygopro.StocGameMessage.MsgSelectPosition;
* */
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
true
);
const
reader
=
new
BufferReader
(
data
);
const
player
=
reader
.
readUint8
();
const
code
=
reader
.
readUint32
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/win.ts
View file @
06cbef40
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../bufferIO
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
import
MsgWin
=
ygopro
.
StocGameMessage
.
MsgWin
;
/*
...
...
@@ -9,7 +10,7 @@ import MsgWin = ygopro.StocGameMessage.MsgWin;
* @param winType - 结果类型
* */
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
,
true
);
const
reader
=
new
BufferReader
(
data
);
const
player
=
reader
.
readUint8
();
const
winType
=
reader
.
readUint8
();
...
...
src/api/ocgcore/ocgAdapter/stoc/stocTimeLimit.ts
View file @
06cbef40
import
{
ygopro
}
from
"
../../idl/ocgcore
"
;
import
{
YgoProPacket
,
StocAdapter
}
from
"
../packet
"
;
import
{
BufferReader
}
from
"
../bufferIO
"
;
// @ts-ignore
import
{
BufferReader
}
from
"
rust-src
"
;
/*
* STOC TimeLimit
...
...
@@ -16,7 +17,7 @@ export default class TimeLimit implements StocAdapter {
}
upcast
():
ygopro
.
YgoStocMsg
{
const
reader
=
new
BufferReader
(
this
.
packet
.
exData
,
true
);
const
reader
=
new
BufferReader
(
this
.
packet
.
exData
);
const
player
=
reader
.
readInt8
();
const
leftTime
=
reader
.
readUint16
();
...
...
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