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
0d920d58
Commit
0d920d58
authored
May 10, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync neos-protobuf
parent
d08944ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
22 deletions
+91
-22
neos-protobuf
neos-protobuf
+1
-1
src/api/ocgcore/idl/ocgcore.ts
src/api/ocgcore/idl/ocgcore.ts
+89
-20
src/service/duel/attack.ts
src/service/duel/attack.ts
+1
-1
No files found.
neos-protobuf
@
30d0ceb9
Subproject commit
be66d514be6d1224163f55bca85dc361d0c9fe6a
Subproject commit
30d0ceb9d06259c09f3dfd36c3872bd1e9c02b88
src/api/ocgcore/idl/ocgcore.ts
View file @
0d920d58
...
@@ -16757,7 +16757,9 @@ export namespace ygopro {
...
@@ -16757,7 +16757,9 @@ export namespace ygopro {
data?:
data?:
| any[]
| any[]
| {
| {
location?: CardLocation;
direct_attack?: boolean;
attacker_location?: CardLocation;
target_location?: CardLocation;
}
}
) {
) {
super();
super();
...
@@ -16770,39 +16772,89 @@ export namespace ygopro {
...
@@ -16770,39 +16772,89 @@ export namespace ygopro {
this.#one_of_decls
this.#one_of_decls
);
);
if (!Array.isArray(data) && typeof data == "object") {
if (!Array.isArray(data) && typeof data == "object") {
if ("location" in data && data.location != undefined) {
if ("direct_attack" in data && data.direct_attack != undefined) {
this.location = data.location;
this.direct_attack = data.direct_attack;
}
if (
"attacker_location" in data &&
data.attacker_location != undefined
) {
this.attacker_location = data.attacker_location;
}
if ("target_location" in data && data.target_location != undefined) {
this.target_location = data.target_location;
}
}
}
}
}
}
get location() {
get direct_attack() {
return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean;
}
set direct_attack(value: boolean) {
pb_1.Message.setField(this, 1, value);
}
get attacker_location() {
return pb_1.Message.getWrapperField(
return pb_1.Message.getWrapperField(
this,
this,
CardLocation,
CardLocation,
1
2
) as CardLocation;
) as CardLocation;
}
}
set location(value: CardLocation) {
set
attacker_
location(value: CardLocation) {
pb_1.Message.setWrapperField(this,
1
, value);
pb_1.Message.setWrapperField(this,
2
, value);
}
}
get has_location() {
get has_attacker_location() {
return pb_1.Message.getField(this, 1) != null;
return pb_1.Message.getField(this, 2) != null;
}
get target_location() {
return pb_1.Message.getWrapperField(
this,
CardLocation,
3
) as CardLocation;
}
set target_location(value: CardLocation) {
pb_1.Message.setWrapperField(this, 3, value);
}
get has_target_location() {
return pb_1.Message.getField(this, 3) != null;
}
}
static fromObject(data: {
static fromObject(data: {
location?: ReturnType<typeof CardLocation.prototype.toObject>;
direct_attack?: boolean;
attacker_location?: ReturnType<typeof CardLocation.prototype.toObject>;
target_location?: ReturnType<typeof CardLocation.prototype.toObject>;
}): MsgAttack {
}): MsgAttack {
const message = new MsgAttack({});
const message = new MsgAttack({});
if (data.location != null) {
if (data.direct_attack != null) {
message.location = CardLocation.fromObject(data.location);
message.direct_attack = data.direct_attack;
}
if (data.attacker_location != null) {
message.attacker_location = CardLocation.fromObject(
data.attacker_location
);
}
if (data.target_location != null) {
message.target_location = CardLocation.fromObject(
data.target_location
);
}
}
return message;
return message;
}
}
toObject() {
toObject() {
const data: {
const data: {
location?: ReturnType<typeof CardLocation.prototype.toObject>;
direct_attack?: boolean;
attacker_location?: ReturnType<
typeof CardLocation.prototype.toObject
>;
target_location?: ReturnType<typeof CardLocation.prototype.toObject>;
} = {};
} = {};
if (this.location != null) {
if (this.direct_attack != null) {
data.location = this.location.toObject();
data.direct_attack = this.direct_attack;
}
if (this.attacker_location != null) {
data.attacker_location = this.attacker_location.toObject();
}
if (this.target_location != null) {
data.target_location = this.target_location.toObject();
}
}
return data;
return data;
}
}
...
@@ -16810,9 +16862,15 @@ export namespace ygopro {
...
@@ -16810,9 +16862,15 @@ export namespace ygopro {
serialize(w: pb_1.BinaryWriter): void;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
const writer = w || new pb_1.BinaryWriter();
if (this.has_location)
if (this.direct_attack != false)
writer.writeMessage(1, this.location, () =>
writer.writeBool(1, this.direct_attack);
this.location.serialize(writer)
if (this.has_attacker_location)
writer.writeMessage(2, this.attacker_location, () =>
this.attacker_location.serialize(writer)
);
if (this.has_target_location)
writer.writeMessage(3, this.target_location, () =>
this.target_location.serialize(writer)
);
);
if (!w) return writer.getResultBuffer();
if (!w) return writer.getResultBuffer();
}
}
...
@@ -16826,9 +16884,20 @@ export namespace ygopro {
...
@@ -16826,9 +16884,20 @@ export namespace ygopro {
if (reader.isEndGroup()) break;
if (reader.isEndGroup()) break;
switch (reader.getFieldNumber()) {
switch (reader.getFieldNumber()) {
case 1:
case 1:
message.direct_attack = reader.readBool();
break;
case 2:
reader.readMessage(
reader.readMessage(
message.location,
message.attacker_location,
() => (message.location = CardLocation.deserialize(reader))
() =>
(message.attacker_location = CardLocation.deserialize(reader))
);
break;
case 3:
reader.readMessage(
message.target_location,
() =>
(message.target_location = CardLocation.deserialize(reader))
);
);
break;
break;
default:
default:
...
...
src/service/duel/attack.ts
View file @
0d920d58
...
@@ -4,6 +4,6 @@ import { fetchEsHintMeta } from "@/stores";
...
@@ -4,6 +4,6 @@ import { fetchEsHintMeta } from "@/stores";
export
default
(
attack
:
ygopro
.
StocGameMessage
.
MsgAttack
)
=>
{
export
default
(
attack
:
ygopro
.
StocGameMessage
.
MsgAttack
)
=>
{
fetchEsHintMeta
({
fetchEsHintMeta
({
originMsg
:
"
「[?]」攻击时
"
,
originMsg
:
"
「[?]」攻击时
"
,
location
:
attack
.
location
,
location
:
attack
.
attacker_
location
,
});
});
};
};
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