ygopro-msg-encode 1.1.15 → 1.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -24
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +4 -24
- package/dist/index.mjs.map +2 -2
- package/dist/src/protos/msg/proto/confirm-cards.d.ts +0 -1
- package/dist/src/protos/msg/proto/update-card.d.ts +0 -1
- package/dist/src/protos/msg/proto/update-data.d.ts +0 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -375,7 +375,9 @@ var PayloadBase = class {
|
|
|
375
375
|
return toBinaryFields(this);
|
|
376
376
|
}
|
|
377
377
|
copy() {
|
|
378
|
-
|
|
378
|
+
const Constructor = this.constructor;
|
|
379
|
+
const copied = new Constructor();
|
|
380
|
+
return copied.fromPartial(this);
|
|
379
381
|
}
|
|
380
382
|
};
|
|
381
383
|
|
|
@@ -3246,18 +3248,6 @@ var YGOProMsgConfirmCards = class extends YGOProMsgBase {
|
|
|
3246
3248
|
static {
|
|
3247
3249
|
this.identifier = OcgcoreCommonConstants.MSG_CONFIRM_CARDS;
|
|
3248
3250
|
}
|
|
3249
|
-
// 对方视角可能需要隐藏卡片信息
|
|
3250
|
-
opponentView() {
|
|
3251
|
-
const view = this.copy();
|
|
3252
|
-
view.cards = view.cards.map((card) => {
|
|
3253
|
-
const c = { ...card };
|
|
3254
|
-
if (!(c.code & 2147483648)) {
|
|
3255
|
-
c.code = 0;
|
|
3256
|
-
}
|
|
3257
|
-
return c;
|
|
3258
|
-
});
|
|
3259
|
-
return view;
|
|
3260
|
-
}
|
|
3261
3251
|
getSendTargets() {
|
|
3262
3252
|
if (this.cards.length > 0 && this.cards[0].location === 1) {
|
|
3263
3253
|
return [this.player];
|
|
@@ -5912,11 +5902,7 @@ var YGOProMsgUpdateCard = class extends YGOProMsgBase {
|
|
|
5912
5902
|
return copy;
|
|
5913
5903
|
}
|
|
5914
5904
|
teammateView() {
|
|
5915
|
-
|
|
5916
|
-
return this.copy();
|
|
5917
|
-
} else {
|
|
5918
|
-
return this.opponentView();
|
|
5919
|
-
}
|
|
5905
|
+
return this.copy();
|
|
5920
5906
|
}
|
|
5921
5907
|
playerView(playerId) {
|
|
5922
5908
|
if (playerId === 7 /* OBSERVER */) {
|
|
@@ -5971,9 +5957,6 @@ var YGOProMsgUpdateCard = class extends YGOProMsgBase {
|
|
|
5971
5957
|
result.set(cardPayload, 8);
|
|
5972
5958
|
return result;
|
|
5973
5959
|
}
|
|
5974
|
-
getSendTargets() {
|
|
5975
|
-
return [];
|
|
5976
|
-
}
|
|
5977
5960
|
getRequireRefreshCards() {
|
|
5978
5961
|
return [
|
|
5979
5962
|
{
|
|
@@ -6091,9 +6074,6 @@ var YGOProMsgUpdateData = class extends YGOProMsgBase {
|
|
|
6091
6074
|
}
|
|
6092
6075
|
return result;
|
|
6093
6076
|
}
|
|
6094
|
-
getSendTargets() {
|
|
6095
|
-
return [];
|
|
6096
|
-
}
|
|
6097
6077
|
};
|
|
6098
6078
|
|
|
6099
6079
|
// src/protos/msg/proto/waiting.ts
|