ygopro-msg-encode 1.1.4 → 1.1.6

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.mjs CHANGED
@@ -2215,9 +2215,6 @@ __decorateClass([
2215
2215
  __decorateClass([
2216
2216
  BinaryField("u8", 6)
2217
2217
  ], YGOProMsgConfirmCards_CardInfo.prototype, "sequence", 2);
2218
- __decorateClass([
2219
- BinaryField("u8", 7)
2220
- ], YGOProMsgConfirmCards_CardInfo.prototype, "subsequence", 2);
2221
2218
  var YGOProMsgConfirmCards = class extends YGOProMsgBase {
2222
2219
  static {
2223
2220
  this.identifier = OcgcoreCommonConstants.MSG_CONFIRM_CARDS;
@@ -2246,7 +2243,7 @@ __decorateClass([
2246
2243
  ], YGOProMsgConfirmCards.prototype, "player", 2);
2247
2244
  __decorateClass([
2248
2245
  BinaryField("u8", 1)
2249
- ], YGOProMsgConfirmCards.prototype, "unused", 2);
2246
+ ], YGOProMsgConfirmCards.prototype, "skipPanel", 2);
2250
2247
  __decorateClass([
2251
2248
  BinaryField("u8", 2)
2252
2249
  ], YGOProMsgConfirmCards.prototype, "count", 2);
@@ -4871,6 +4868,29 @@ var YGOProMsgSet = class extends YGOProMsgBase {
4871
4868
  static {
4872
4869
  this.identifier = OcgcoreCommonConstants.MSG_SET;
4873
4870
  }
4871
+ // MSG_SET 是盖放卡片,所有人都看不到 code(包括玩家自己)
4872
+ // 服务器在发送前会将 code 清零
4873
+ opponentView() {
4874
+ const view = this.copy();
4875
+ view.code = 0;
4876
+ return view;
4877
+ }
4878
+ teammateView() {
4879
+ const view = this.copy();
4880
+ view.code = 0;
4881
+ return view;
4882
+ }
4883
+ observerView() {
4884
+ const view = this.copy();
4885
+ view.code = 0;
4886
+ return view;
4887
+ }
4888
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4889
+ playerView(playerId) {
4890
+ const view = this.copy();
4891
+ view.code = 0;
4892
+ return view;
4893
+ }
4874
4894
  };
4875
4895
  __decorateClass([
4876
4896
  BinaryField("i32", 0)