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.cjs
CHANGED
|
@@ -594,7 +594,9 @@ var _PayloadBase = class _PayloadBase {
|
|
|
594
594
|
return toBinaryFields(this);
|
|
595
595
|
}
|
|
596
596
|
copy() {
|
|
597
|
-
|
|
597
|
+
const Constructor = this.constructor;
|
|
598
|
+
const copied = new Constructor();
|
|
599
|
+
return copied.fromPartial(this);
|
|
598
600
|
}
|
|
599
601
|
};
|
|
600
602
|
__name(_PayloadBase, "PayloadBase");
|
|
@@ -3320,18 +3322,6 @@ __decorateClass([
|
|
|
3320
3322
|
], _YGOProMsgConfirmCards_CardInfo.prototype, "sequence", 2);
|
|
3321
3323
|
var YGOProMsgConfirmCards_CardInfo = _YGOProMsgConfirmCards_CardInfo;
|
|
3322
3324
|
var _YGOProMsgConfirmCards = class _YGOProMsgConfirmCards extends YGOProMsgBase {
|
|
3323
|
-
// 对方视角可能需要隐藏卡片信息
|
|
3324
|
-
opponentView() {
|
|
3325
|
-
const view = this.copy();
|
|
3326
|
-
view.cards = view.cards.map((card) => {
|
|
3327
|
-
const c = { ...card };
|
|
3328
|
-
if (!(c.code & 2147483648)) {
|
|
3329
|
-
c.code = 0;
|
|
3330
|
-
}
|
|
3331
|
-
return c;
|
|
3332
|
-
});
|
|
3333
|
-
return view;
|
|
3334
|
-
}
|
|
3335
3325
|
getSendTargets() {
|
|
3336
3326
|
if (this.cards.length > 0 && this.cards[0].location === 1) {
|
|
3337
3327
|
return [this.player];
|
|
@@ -5779,11 +5769,7 @@ var _YGOProMsgUpdateCard = class _YGOProMsgUpdateCard extends YGOProMsgBase {
|
|
|
5779
5769
|
return copy;
|
|
5780
5770
|
}
|
|
5781
5771
|
teammateView() {
|
|
5782
|
-
|
|
5783
|
-
return this.copy();
|
|
5784
|
-
} else {
|
|
5785
|
-
return this.opponentView();
|
|
5786
|
-
}
|
|
5772
|
+
return this.copy();
|
|
5787
5773
|
}
|
|
5788
5774
|
playerView(playerId) {
|
|
5789
5775
|
if (playerId === 7 /* OBSERVER */) {
|
|
@@ -5838,9 +5824,6 @@ var _YGOProMsgUpdateCard = class _YGOProMsgUpdateCard extends YGOProMsgBase {
|
|
|
5838
5824
|
result.set(cardPayload, 8);
|
|
5839
5825
|
return result;
|
|
5840
5826
|
}
|
|
5841
|
-
getSendTargets() {
|
|
5842
|
-
return [];
|
|
5843
|
-
}
|
|
5844
5827
|
getRequireRefreshCards() {
|
|
5845
5828
|
return [
|
|
5846
5829
|
{
|
|
@@ -5955,9 +5938,6 @@ var _YGOProMsgUpdateData = class _YGOProMsgUpdateData extends YGOProMsgBase {
|
|
|
5955
5938
|
}
|
|
5956
5939
|
return result;
|
|
5957
5940
|
}
|
|
5958
|
-
getSendTargets() {
|
|
5959
|
-
return [];
|
|
5960
|
-
}
|
|
5961
5941
|
};
|
|
5962
5942
|
__name(_YGOProMsgUpdateData, "YGOProMsgUpdateData");
|
|
5963
5943
|
_YGOProMsgUpdateData.identifier = 6;
|