From 10346166eaaaa4d20b86c96b627941d0266e5b1c Mon Sep 17 00:00:00 2001 From: Hiro <84511935+Hiro420@users.noreply.github.com> Date: Wed, 7 Feb 2024 21:28:09 +0200 Subject: [PATCH] fix bp --- .../proto/BattlePassInfoNotifyOuterClass.java | 844 +++++++++++------- .../recv/HandlerPlayerLoginFinishCsReq.java | 3 +- 2 files changed, 504 insertions(+), 343 deletions(-) diff --git a/src/generated/main/emu/lunarcore/proto/BattlePassInfoNotifyOuterClass.java b/src/generated/main/emu/lunarcore/proto/BattlePassInfoNotifyOuterClass.java index ed6597bf8..557831b28 100644 --- a/src/generated/main/emu/lunarcore/proto/BattlePassInfoNotifyOuterClass.java +++ b/src/generated/main/emu/lunarcore/proto/BattlePassInfoNotifyOuterClass.java @@ -21,24 +21,37 @@ public static final class BattlePassInfoNotify extends ProtoMessageoptional uint64 taken_premium_extended_reward = 2; + * optional uint64 taken_premium_reward2 = 1; */ - private long takenPremiumExtendedReward; + private long takenPremiumReward2; /** - * optional uint64 taken_free_extended_reward = 5; + *
+     *  LOIGEPGJHEK
+     * 
+ * + * optional uint64 unkfield = 2; */ - private long takenFreeExtendedReward; + private long unkfield; /** - * optional uint64 unkfield = 6; + * optional uint64 taken_premium_reward1 = 4; */ - private long unkfield; + private long takenPremiumReward1; /** - * optional uint64 taken_premium_reward2 = 8; + * optional uint64 taken_premium_extended_reward = 7; */ - private long takenPremiumReward2; + private long takenPremiumExtendedReward; + + /** + *
+     *  KFCJBDNBEEK
+     * 
+ * + * optional uint64 taken_premium_optional_reward = 8; + */ + private long takenPremiumOptionalReward; /** * optional uint64 taken_free_reward = 9; @@ -46,37 +59,45 @@ public static final class BattlePassInfoNotify extends ProtoMessageoptional uint64 taken_premium_reward1 = 10; + *
+     *  PODMLBJMKEJ
+     * 
+ * + * optional uint64 taken_free_extended_reward = 12; */ - private long takenPremiumReward1; + private long takenFreeExtendedReward; /** - * optional uint64 taken_premium_optional_reward = 11; + *
+     *  NAMKBIBEMBN
+     * 
+ * + * optional uint64 idk = 14; */ - private long takenPremiumOptionalReward; + private long idk; /** - * optional uint32 exp = 4; + * optional uint32 cur_week_add_exp_sum = 3; */ - private int exp; + private int curWeekAddExpSum; /** - * optional uint32 level = 7; + * optional uint32 cur_bp_id = 5; */ - private int level; + private int curBpId; /** - * optional uint32 cur_bp_id = 14; + * optional uint32 exp = 6; */ - private int curBpId; + private int exp; /** - * optional uint32 cur_week_add_exp_sum = 15; + * optional uint32 level = 10; */ - private int curWeekAddExpSum; + private int level; /** - * optional .BattlePassInfoNotify.BpTierType bp_tier_type = 1; + * optional .BattlePassInfoNotify.BpTierType bp_tier_type = 15; */ private int bpTierType; @@ -91,340 +112,404 @@ public static BattlePassInfoNotify newInstance() { } /** - * optional uint64 taken_premium_extended_reward = 2; - * @return whether the takenPremiumExtendedReward field is set + * optional uint64 taken_premium_reward2 = 1; + * @return whether the takenPremiumReward2 field is set */ - public boolean hasTakenPremiumExtendedReward() { + public boolean hasTakenPremiumReward2() { return (bitField0_ & 0x00000001) != 0; } /** - * optional uint64 taken_premium_extended_reward = 2; + * optional uint64 taken_premium_reward2 = 1; * @return this */ - public BattlePassInfoNotify clearTakenPremiumExtendedReward() { + public BattlePassInfoNotify clearTakenPremiumReward2() { bitField0_ &= ~0x00000001; - takenPremiumExtendedReward = 0L; + takenPremiumReward2 = 0L; return this; } /** - * optional uint64 taken_premium_extended_reward = 2; - * @return the takenPremiumExtendedReward + * optional uint64 taken_premium_reward2 = 1; + * @return the takenPremiumReward2 */ - public long getTakenPremiumExtendedReward() { - return takenPremiumExtendedReward; + public long getTakenPremiumReward2() { + return takenPremiumReward2; } /** - * optional uint64 taken_premium_extended_reward = 2; - * @param value the takenPremiumExtendedReward to set + * optional uint64 taken_premium_reward2 = 1; + * @param value the takenPremiumReward2 to set * @return this */ - public BattlePassInfoNotify setTakenPremiumExtendedReward(final long value) { + public BattlePassInfoNotify setTakenPremiumReward2(final long value) { bitField0_ |= 0x00000001; - takenPremiumExtendedReward = value; + takenPremiumReward2 = value; return this; } /** - * optional uint64 taken_free_extended_reward = 5; - * @return whether the takenFreeExtendedReward field is set + *
+     *  LOIGEPGJHEK
+     * 
+ * + * optional uint64 unkfield = 2; + * @return whether the unkfield field is set */ - public boolean hasTakenFreeExtendedReward() { + public boolean hasUnkfield() { return (bitField0_ & 0x00000002) != 0; } /** - * optional uint64 taken_free_extended_reward = 5; + *
+     *  LOIGEPGJHEK
+     * 
+ * + * optional uint64 unkfield = 2; * @return this */ - public BattlePassInfoNotify clearTakenFreeExtendedReward() { + public BattlePassInfoNotify clearUnkfield() { bitField0_ &= ~0x00000002; - takenFreeExtendedReward = 0L; + unkfield = 0L; return this; } /** - * optional uint64 taken_free_extended_reward = 5; - * @return the takenFreeExtendedReward + *
+     *  LOIGEPGJHEK
+     * 
+ * + * optional uint64 unkfield = 2; + * @return the unkfield */ - public long getTakenFreeExtendedReward() { - return takenFreeExtendedReward; + public long getUnkfield() { + return unkfield; } /** - * optional uint64 taken_free_extended_reward = 5; - * @param value the takenFreeExtendedReward to set + *
+     *  LOIGEPGJHEK
+     * 
+ * + * optional uint64 unkfield = 2; + * @param value the unkfield to set * @return this */ - public BattlePassInfoNotify setTakenFreeExtendedReward(final long value) { + public BattlePassInfoNotify setUnkfield(final long value) { bitField0_ |= 0x00000002; - takenFreeExtendedReward = value; + unkfield = value; return this; } /** - * optional uint64 unkfield = 6; - * @return whether the unkfield field is set + * optional uint64 taken_premium_reward1 = 4; + * @return whether the takenPremiumReward1 field is set */ - public boolean hasUnkfield() { + public boolean hasTakenPremiumReward1() { return (bitField0_ & 0x00000004) != 0; } /** - * optional uint64 unkfield = 6; + * optional uint64 taken_premium_reward1 = 4; * @return this */ - public BattlePassInfoNotify clearUnkfield() { + public BattlePassInfoNotify clearTakenPremiumReward1() { bitField0_ &= ~0x00000004; - unkfield = 0L; + takenPremiumReward1 = 0L; return this; } /** - * optional uint64 unkfield = 6; - * @return the unkfield + * optional uint64 taken_premium_reward1 = 4; + * @return the takenPremiumReward1 */ - public long getUnkfield() { - return unkfield; + public long getTakenPremiumReward1() { + return takenPremiumReward1; } /** - * optional uint64 unkfield = 6; - * @param value the unkfield to set + * optional uint64 taken_premium_reward1 = 4; + * @param value the takenPremiumReward1 to set * @return this */ - public BattlePassInfoNotify setUnkfield(final long value) { + public BattlePassInfoNotify setTakenPremiumReward1(final long value) { bitField0_ |= 0x00000004; - unkfield = value; + takenPremiumReward1 = value; return this; } /** - * optional uint64 taken_premium_reward2 = 8; - * @return whether the takenPremiumReward2 field is set + * optional uint64 taken_premium_extended_reward = 7; + * @return whether the takenPremiumExtendedReward field is set */ - public boolean hasTakenPremiumReward2() { + public boolean hasTakenPremiumExtendedReward() { return (bitField0_ & 0x00000008) != 0; } /** - * optional uint64 taken_premium_reward2 = 8; + * optional uint64 taken_premium_extended_reward = 7; * @return this */ - public BattlePassInfoNotify clearTakenPremiumReward2() { + public BattlePassInfoNotify clearTakenPremiumExtendedReward() { bitField0_ &= ~0x00000008; - takenPremiumReward2 = 0L; + takenPremiumExtendedReward = 0L; return this; } /** - * optional uint64 taken_premium_reward2 = 8; - * @return the takenPremiumReward2 + * optional uint64 taken_premium_extended_reward = 7; + * @return the takenPremiumExtendedReward */ - public long getTakenPremiumReward2() { - return takenPremiumReward2; + public long getTakenPremiumExtendedReward() { + return takenPremiumExtendedReward; } /** - * optional uint64 taken_premium_reward2 = 8; - * @param value the takenPremiumReward2 to set + * optional uint64 taken_premium_extended_reward = 7; + * @param value the takenPremiumExtendedReward to set * @return this */ - public BattlePassInfoNotify setTakenPremiumReward2(final long value) { + public BattlePassInfoNotify setTakenPremiumExtendedReward(final long value) { bitField0_ |= 0x00000008; - takenPremiumReward2 = value; + takenPremiumExtendedReward = value; return this; } /** - * optional uint64 taken_free_reward = 9; - * @return whether the takenFreeReward field is set + *
+     *  KFCJBDNBEEK
+     * 
+ * + * optional uint64 taken_premium_optional_reward = 8; + * @return whether the takenPremiumOptionalReward field is set */ - public boolean hasTakenFreeReward() { + public boolean hasTakenPremiumOptionalReward() { return (bitField0_ & 0x00000010) != 0; } /** - * optional uint64 taken_free_reward = 9; + *
+     *  KFCJBDNBEEK
+     * 
+ * + * optional uint64 taken_premium_optional_reward = 8; * @return this */ - public BattlePassInfoNotify clearTakenFreeReward() { + public BattlePassInfoNotify clearTakenPremiumOptionalReward() { bitField0_ &= ~0x00000010; - takenFreeReward = 0L; + takenPremiumOptionalReward = 0L; return this; } /** - * optional uint64 taken_free_reward = 9; - * @return the takenFreeReward + *
+     *  KFCJBDNBEEK
+     * 
+ * + * optional uint64 taken_premium_optional_reward = 8; + * @return the takenPremiumOptionalReward */ - public long getTakenFreeReward() { - return takenFreeReward; + public long getTakenPremiumOptionalReward() { + return takenPremiumOptionalReward; } /** - * optional uint64 taken_free_reward = 9; - * @param value the takenFreeReward to set + *
+     *  KFCJBDNBEEK
+     * 
+ * + * optional uint64 taken_premium_optional_reward = 8; + * @param value the takenPremiumOptionalReward to set * @return this */ - public BattlePassInfoNotify setTakenFreeReward(final long value) { + public BattlePassInfoNotify setTakenPremiumOptionalReward(final long value) { bitField0_ |= 0x00000010; - takenFreeReward = value; + takenPremiumOptionalReward = value; return this; } /** - * optional uint64 taken_premium_reward1 = 10; - * @return whether the takenPremiumReward1 field is set + * optional uint64 taken_free_reward = 9; + * @return whether the takenFreeReward field is set */ - public boolean hasTakenPremiumReward1() { + public boolean hasTakenFreeReward() { return (bitField0_ & 0x00000020) != 0; } /** - * optional uint64 taken_premium_reward1 = 10; + * optional uint64 taken_free_reward = 9; * @return this */ - public BattlePassInfoNotify clearTakenPremiumReward1() { + public BattlePassInfoNotify clearTakenFreeReward() { bitField0_ &= ~0x00000020; - takenPremiumReward1 = 0L; + takenFreeReward = 0L; return this; } /** - * optional uint64 taken_premium_reward1 = 10; - * @return the takenPremiumReward1 + * optional uint64 taken_free_reward = 9; + * @return the takenFreeReward */ - public long getTakenPremiumReward1() { - return takenPremiumReward1; + public long getTakenFreeReward() { + return takenFreeReward; } /** - * optional uint64 taken_premium_reward1 = 10; - * @param value the takenPremiumReward1 to set + * optional uint64 taken_free_reward = 9; + * @param value the takenFreeReward to set * @return this */ - public BattlePassInfoNotify setTakenPremiumReward1(final long value) { + public BattlePassInfoNotify setTakenFreeReward(final long value) { bitField0_ |= 0x00000020; - takenPremiumReward1 = value; + takenFreeReward = value; return this; } /** - * optional uint64 taken_premium_optional_reward = 11; - * @return whether the takenPremiumOptionalReward field is set + *
+     *  PODMLBJMKEJ
+     * 
+ * + * optional uint64 taken_free_extended_reward = 12; + * @return whether the takenFreeExtendedReward field is set */ - public boolean hasTakenPremiumOptionalReward() { + public boolean hasTakenFreeExtendedReward() { return (bitField0_ & 0x00000040) != 0; } /** - * optional uint64 taken_premium_optional_reward = 11; + *
+     *  PODMLBJMKEJ
+     * 
+ * + * optional uint64 taken_free_extended_reward = 12; * @return this */ - public BattlePassInfoNotify clearTakenPremiumOptionalReward() { + public BattlePassInfoNotify clearTakenFreeExtendedReward() { bitField0_ &= ~0x00000040; - takenPremiumOptionalReward = 0L; + takenFreeExtendedReward = 0L; return this; } /** - * optional uint64 taken_premium_optional_reward = 11; - * @return the takenPremiumOptionalReward + *
+     *  PODMLBJMKEJ
+     * 
+ * + * optional uint64 taken_free_extended_reward = 12; + * @return the takenFreeExtendedReward */ - public long getTakenPremiumOptionalReward() { - return takenPremiumOptionalReward; + public long getTakenFreeExtendedReward() { + return takenFreeExtendedReward; } /** - * optional uint64 taken_premium_optional_reward = 11; - * @param value the takenPremiumOptionalReward to set + *
+     *  PODMLBJMKEJ
+     * 
+ * + * optional uint64 taken_free_extended_reward = 12; + * @param value the takenFreeExtendedReward to set * @return this */ - public BattlePassInfoNotify setTakenPremiumOptionalReward(final long value) { + public BattlePassInfoNotify setTakenFreeExtendedReward(final long value) { bitField0_ |= 0x00000040; - takenPremiumOptionalReward = value; + takenFreeExtendedReward = value; return this; } /** - * optional uint32 exp = 4; - * @return whether the exp field is set + *
+     *  NAMKBIBEMBN
+     * 
+ * + * optional uint64 idk = 14; + * @return whether the idk field is set */ - public boolean hasExp() { + public boolean hasIdk() { return (bitField0_ & 0x00000080) != 0; } /** - * optional uint32 exp = 4; + *
+     *  NAMKBIBEMBN
+     * 
+ * + * optional uint64 idk = 14; * @return this */ - public BattlePassInfoNotify clearExp() { + public BattlePassInfoNotify clearIdk() { bitField0_ &= ~0x00000080; - exp = 0; + idk = 0L; return this; } /** - * optional uint32 exp = 4; - * @return the exp + *
+     *  NAMKBIBEMBN
+     * 
+ * + * optional uint64 idk = 14; + * @return the idk */ - public int getExp() { - return exp; + public long getIdk() { + return idk; } /** - * optional uint32 exp = 4; - * @param value the exp to set + *
+     *  NAMKBIBEMBN
+     * 
+ * + * optional uint64 idk = 14; + * @param value the idk to set * @return this */ - public BattlePassInfoNotify setExp(final int value) { + public BattlePassInfoNotify setIdk(final long value) { bitField0_ |= 0x00000080; - exp = value; + idk = value; return this; } /** - * optional uint32 level = 7; - * @return whether the level field is set + * optional uint32 cur_week_add_exp_sum = 3; + * @return whether the curWeekAddExpSum field is set */ - public boolean hasLevel() { + public boolean hasCurWeekAddExpSum() { return (bitField0_ & 0x00000100) != 0; } /** - * optional uint32 level = 7; + * optional uint32 cur_week_add_exp_sum = 3; * @return this */ - public BattlePassInfoNotify clearLevel() { + public BattlePassInfoNotify clearCurWeekAddExpSum() { bitField0_ &= ~0x00000100; - level = 0; + curWeekAddExpSum = 0; return this; } /** - * optional uint32 level = 7; - * @return the level + * optional uint32 cur_week_add_exp_sum = 3; + * @return the curWeekAddExpSum */ - public int getLevel() { - return level; + public int getCurWeekAddExpSum() { + return curWeekAddExpSum; } /** - * optional uint32 level = 7; - * @param value the level to set + * optional uint32 cur_week_add_exp_sum = 3; + * @param value the curWeekAddExpSum to set * @return this */ - public BattlePassInfoNotify setLevel(final int value) { + public BattlePassInfoNotify setCurWeekAddExpSum(final int value) { bitField0_ |= 0x00000100; - level = value; + curWeekAddExpSum = value; return this; } /** - * optional uint32 cur_bp_id = 14; + * optional uint32 cur_bp_id = 5; * @return whether the curBpId field is set */ public boolean hasCurBpId() { @@ -432,7 +517,7 @@ public boolean hasCurBpId() { } /** - * optional uint32 cur_bp_id = 14; + * optional uint32 cur_bp_id = 5; * @return this */ public BattlePassInfoNotify clearCurBpId() { @@ -442,7 +527,7 @@ public BattlePassInfoNotify clearCurBpId() { } /** - * optional uint32 cur_bp_id = 14; + * optional uint32 cur_bp_id = 5; * @return the curBpId */ public int getCurBpId() { @@ -450,7 +535,7 @@ public int getCurBpId() { } /** - * optional uint32 cur_bp_id = 14; + * optional uint32 cur_bp_id = 5; * @param value the curBpId to set * @return this */ @@ -461,62 +546,99 @@ public BattlePassInfoNotify setCurBpId(final int value) { } /** - * optional uint32 cur_week_add_exp_sum = 15; - * @return whether the curWeekAddExpSum field is set + * optional uint32 exp = 6; + * @return whether the exp field is set */ - public boolean hasCurWeekAddExpSum() { + public boolean hasExp() { return (bitField0_ & 0x00000400) != 0; } /** - * optional uint32 cur_week_add_exp_sum = 15; + * optional uint32 exp = 6; * @return this */ - public BattlePassInfoNotify clearCurWeekAddExpSum() { + public BattlePassInfoNotify clearExp() { bitField0_ &= ~0x00000400; - curWeekAddExpSum = 0; + exp = 0; return this; } /** - * optional uint32 cur_week_add_exp_sum = 15; - * @return the curWeekAddExpSum + * optional uint32 exp = 6; + * @return the exp */ - public int getCurWeekAddExpSum() { - return curWeekAddExpSum; + public int getExp() { + return exp; } /** - * optional uint32 cur_week_add_exp_sum = 15; - * @param value the curWeekAddExpSum to set + * optional uint32 exp = 6; + * @param value the exp to set * @return this */ - public BattlePassInfoNotify setCurWeekAddExpSum(final int value) { + public BattlePassInfoNotify setExp(final int value) { bitField0_ |= 0x00000400; - curWeekAddExpSum = value; + exp = value; + return this; + } + + /** + * optional uint32 level = 10; + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000800) != 0; + } + + /** + * optional uint32 level = 10; + * @return this + */ + public BattlePassInfoNotify clearLevel() { + bitField0_ &= ~0x00000800; + level = 0; + return this; + } + + /** + * optional uint32 level = 10; + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * optional uint32 level = 10; + * @param value the level to set + * @return this + */ + public BattlePassInfoNotify setLevel(final int value) { + bitField0_ |= 0x00000800; + level = value; return this; } /** - * optional .BattlePassInfoNotify.BpTierType bp_tier_type = 1; + * optional .BattlePassInfoNotify.BpTierType bp_tier_type = 15; * @return whether the bpTierType field is set */ public boolean hasBpTierType() { - return (bitField0_ & 0x00000800) != 0; + return (bitField0_ & 0x00001000) != 0; } /** - * optional .BattlePassInfoNotify.BpTierType bp_tier_type = 1; + * optional .BattlePassInfoNotify.BpTierType bp_tier_type = 15; * @return this */ public BattlePassInfoNotify clearBpTierType() { - bitField0_ &= ~0x00000800; + bitField0_ &= ~0x00001000; bpTierType = 0; return this; } /** - * optional .BattlePassInfoNotify.BpTierType bp_tier_type = 1; + * optional .BattlePassInfoNotify.BpTierType bp_tier_type = 15; * @return the bpTierType */ public BpTierType getBpTierType() { @@ -543,18 +665,18 @@ public int getBpTierTypeValue() { * @return this */ public BattlePassInfoNotify setBpTierTypeValue(final int value) { - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; bpTierType = value; return this; } /** - * optional .BattlePassInfoNotify.BpTierType bp_tier_type = 1; + * optional .BattlePassInfoNotify.BpTierType bp_tier_type = 15; * @param value the bpTierType to set * @return this */ public BattlePassInfoNotify setBpTierType(final BpTierType value) { - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; bpTierType = value.getNumber(); return this; } @@ -564,17 +686,18 @@ public BattlePassInfoNotify copyFrom(final BattlePassInfoNotify other) { cachedSize = other.cachedSize; if ((bitField0_ | other.bitField0_) != 0) { bitField0_ = other.bitField0_; - takenPremiumExtendedReward = other.takenPremiumExtendedReward; - takenFreeExtendedReward = other.takenFreeExtendedReward; - unkfield = other.unkfield; takenPremiumReward2 = other.takenPremiumReward2; - takenFreeReward = other.takenFreeReward; + unkfield = other.unkfield; takenPremiumReward1 = other.takenPremiumReward1; + takenPremiumExtendedReward = other.takenPremiumExtendedReward; takenPremiumOptionalReward = other.takenPremiumOptionalReward; + takenFreeReward = other.takenFreeReward; + takenFreeExtendedReward = other.takenFreeExtendedReward; + idk = other.idk; + curWeekAddExpSum = other.curWeekAddExpSum; + curBpId = other.curBpId; exp = other.exp; level = other.level; - curBpId = other.curBpId; - curWeekAddExpSum = other.curWeekAddExpSum; bpTierType = other.bpTierType; } return this; @@ -586,39 +709,42 @@ public BattlePassInfoNotify mergeFrom(final BattlePassInfoNotify other) { return this; } cachedSize = -1; - if (other.hasTakenPremiumExtendedReward()) { - setTakenPremiumExtendedReward(other.takenPremiumExtendedReward); - } - if (other.hasTakenFreeExtendedReward()) { - setTakenFreeExtendedReward(other.takenFreeExtendedReward); - } - if (other.hasUnkfield()) { - setUnkfield(other.unkfield); - } if (other.hasTakenPremiumReward2()) { setTakenPremiumReward2(other.takenPremiumReward2); } - if (other.hasTakenFreeReward()) { - setTakenFreeReward(other.takenFreeReward); + if (other.hasUnkfield()) { + setUnkfield(other.unkfield); } if (other.hasTakenPremiumReward1()) { setTakenPremiumReward1(other.takenPremiumReward1); } + if (other.hasTakenPremiumExtendedReward()) { + setTakenPremiumExtendedReward(other.takenPremiumExtendedReward); + } if (other.hasTakenPremiumOptionalReward()) { setTakenPremiumOptionalReward(other.takenPremiumOptionalReward); } - if (other.hasExp()) { - setExp(other.exp); + if (other.hasTakenFreeReward()) { + setTakenFreeReward(other.takenFreeReward); } - if (other.hasLevel()) { - setLevel(other.level); + if (other.hasTakenFreeExtendedReward()) { + setTakenFreeExtendedReward(other.takenFreeExtendedReward); } - if (other.hasCurBpId()) { - setCurBpId(other.curBpId); + if (other.hasIdk()) { + setIdk(other.idk); } if (other.hasCurWeekAddExpSum()) { setCurWeekAddExpSum(other.curWeekAddExpSum); } + if (other.hasCurBpId()) { + setCurBpId(other.curBpId); + } + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasLevel()) { + setLevel(other.level); + } if (other.hasBpTierType()) { setBpTierTypeValue(other.bpTierType); } @@ -632,17 +758,18 @@ public BattlePassInfoNotify clear() { } cachedSize = -1; bitField0_ = 0; - takenPremiumExtendedReward = 0L; - takenFreeExtendedReward = 0L; - unkfield = 0L; takenPremiumReward2 = 0L; - takenFreeReward = 0L; + unkfield = 0L; takenPremiumReward1 = 0L; + takenPremiumExtendedReward = 0L; takenPremiumOptionalReward = 0L; + takenFreeReward = 0L; + takenFreeExtendedReward = 0L; + idk = 0L; + curWeekAddExpSum = 0; + curBpId = 0; exp = 0; level = 0; - curBpId = 0; - curWeekAddExpSum = 0; bpTierType = 0; return this; } @@ -667,68 +794,73 @@ public boolean equals(Object o) { } BattlePassInfoNotify other = (BattlePassInfoNotify) o; return bitField0_ == other.bitField0_ - && (!hasTakenPremiumExtendedReward() || takenPremiumExtendedReward == other.takenPremiumExtendedReward) - && (!hasTakenFreeExtendedReward() || takenFreeExtendedReward == other.takenFreeExtendedReward) - && (!hasUnkfield() || unkfield == other.unkfield) && (!hasTakenPremiumReward2() || takenPremiumReward2 == other.takenPremiumReward2) - && (!hasTakenFreeReward() || takenFreeReward == other.takenFreeReward) + && (!hasUnkfield() || unkfield == other.unkfield) && (!hasTakenPremiumReward1() || takenPremiumReward1 == other.takenPremiumReward1) + && (!hasTakenPremiumExtendedReward() || takenPremiumExtendedReward == other.takenPremiumExtendedReward) && (!hasTakenPremiumOptionalReward() || takenPremiumOptionalReward == other.takenPremiumOptionalReward) + && (!hasTakenFreeReward() || takenFreeReward == other.takenFreeReward) + && (!hasTakenFreeExtendedReward() || takenFreeExtendedReward == other.takenFreeExtendedReward) + && (!hasIdk() || idk == other.idk) + && (!hasCurWeekAddExpSum() || curWeekAddExpSum == other.curWeekAddExpSum) + && (!hasCurBpId() || curBpId == other.curBpId) && (!hasExp() || exp == other.exp) && (!hasLevel() || level == other.level) - && (!hasCurBpId() || curBpId == other.curBpId) - && (!hasCurWeekAddExpSum() || curWeekAddExpSum == other.curWeekAddExpSum) && (!hasBpTierType() || bpTierType == other.bpTierType); } @Override public void writeTo(final ProtoSink output) throws IOException { if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 16); - output.writeUInt64NoTag(takenPremiumExtendedReward); + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(takenPremiumReward2); } if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 40); - output.writeUInt64NoTag(takenFreeExtendedReward); + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(unkfield); } if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 48); - output.writeUInt64NoTag(unkfield); + output.writeRawByte((byte) 32); + output.writeUInt64NoTag(takenPremiumReward1); } if ((bitField0_ & 0x00000008) != 0) { - output.writeRawByte((byte) 64); - output.writeUInt64NoTag(takenPremiumReward2); + output.writeRawByte((byte) 56); + output.writeUInt64NoTag(takenPremiumExtendedReward); } if ((bitField0_ & 0x00000010) != 0) { - output.writeRawByte((byte) 72); - output.writeUInt64NoTag(takenFreeReward); + output.writeRawByte((byte) 64); + output.writeUInt64NoTag(takenPremiumOptionalReward); } if ((bitField0_ & 0x00000020) != 0) { - output.writeRawByte((byte) 80); - output.writeUInt64NoTag(takenPremiumReward1); + output.writeRawByte((byte) 72); + output.writeUInt64NoTag(takenFreeReward); } if ((bitField0_ & 0x00000040) != 0) { - output.writeRawByte((byte) 88); - output.writeUInt64NoTag(takenPremiumOptionalReward); + output.writeRawByte((byte) 96); + output.writeUInt64NoTag(takenFreeExtendedReward); } if ((bitField0_ & 0x00000080) != 0) { - output.writeRawByte((byte) 32); - output.writeUInt32NoTag(exp); + output.writeRawByte((byte) 112); + output.writeUInt64NoTag(idk); } if ((bitField0_ & 0x00000100) != 0) { - output.writeRawByte((byte) 56); - output.writeUInt32NoTag(level); + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(curWeekAddExpSum); } if ((bitField0_ & 0x00000200) != 0) { - output.writeRawByte((byte) 112); + output.writeRawByte((byte) 40); output.writeUInt32NoTag(curBpId); } if ((bitField0_ & 0x00000400) != 0) { - output.writeRawByte((byte) 120); - output.writeUInt32NoTag(curWeekAddExpSum); + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(exp); } if ((bitField0_ & 0x00000800) != 0) { - output.writeRawByte((byte) 8); + output.writeRawByte((byte) 80); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeRawByte((byte) 120); output.writeEnumNoTag(bpTierType); } } @@ -737,39 +869,42 @@ public void writeTo(final ProtoSink output) throws IOException { protected int computeSerializedSize() { int size = 0; if ((bitField0_ & 0x00000001) != 0) { - size += 1 + ProtoSink.computeUInt64SizeNoTag(takenPremiumExtendedReward); + size += 1 + ProtoSink.computeUInt64SizeNoTag(takenPremiumReward2); } if ((bitField0_ & 0x00000002) != 0) { - size += 1 + ProtoSink.computeUInt64SizeNoTag(takenFreeExtendedReward); + size += 1 + ProtoSink.computeUInt64SizeNoTag(unkfield); } if ((bitField0_ & 0x00000004) != 0) { - size += 1 + ProtoSink.computeUInt64SizeNoTag(unkfield); + size += 1 + ProtoSink.computeUInt64SizeNoTag(takenPremiumReward1); } if ((bitField0_ & 0x00000008) != 0) { - size += 1 + ProtoSink.computeUInt64SizeNoTag(takenPremiumReward2); + size += 1 + ProtoSink.computeUInt64SizeNoTag(takenPremiumExtendedReward); } if ((bitField0_ & 0x00000010) != 0) { - size += 1 + ProtoSink.computeUInt64SizeNoTag(takenFreeReward); + size += 1 + ProtoSink.computeUInt64SizeNoTag(takenPremiumOptionalReward); } if ((bitField0_ & 0x00000020) != 0) { - size += 1 + ProtoSink.computeUInt64SizeNoTag(takenPremiumReward1); + size += 1 + ProtoSink.computeUInt64SizeNoTag(takenFreeReward); } if ((bitField0_ & 0x00000040) != 0) { - size += 1 + ProtoSink.computeUInt64SizeNoTag(takenPremiumOptionalReward); + size += 1 + ProtoSink.computeUInt64SizeNoTag(takenFreeExtendedReward); } if ((bitField0_ & 0x00000080) != 0) { - size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + size += 1 + ProtoSink.computeUInt64SizeNoTag(idk); } if ((bitField0_ & 0x00000100) != 0) { - size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + size += 1 + ProtoSink.computeUInt32SizeNoTag(curWeekAddExpSum); } if ((bitField0_ & 0x00000200) != 0) { size += 1 + ProtoSink.computeUInt32SizeNoTag(curBpId); } if ((bitField0_ & 0x00000400) != 0) { - size += 1 + ProtoSink.computeUInt32SizeNoTag(curWeekAddExpSum); + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); } if ((bitField0_ & 0x00000800) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00001000) != 0) { size += 1 + ProtoSink.computeEnumSizeNoTag(bpTierType); } return size; @@ -782,111 +917,120 @@ public BattlePassInfoNotify mergeFrom(final ProtoSource input) throws IOExceptio int tag = input.readTag(); while (true) { switch (tag) { - case 16: { - // takenPremiumExtendedReward - takenPremiumExtendedReward = input.readUInt64(); + case 8: { + // takenPremiumReward2 + takenPremiumReward2 = input.readUInt64(); bitField0_ |= 0x00000001; tag = input.readTag(); - if (tag != 40) { + if (tag != 16) { break; } } - case 40: { - // takenFreeExtendedReward - takenFreeExtendedReward = input.readUInt64(); + case 16: { + // unkfield + unkfield = input.readUInt64(); bitField0_ |= 0x00000002; tag = input.readTag(); - if (tag != 48) { + if (tag != 32) { break; } } - case 48: { - // unkfield - unkfield = input.readUInt64(); + case 32: { + // takenPremiumReward1 + takenPremiumReward1 = input.readUInt64(); bitField0_ |= 0x00000004; tag = input.readTag(); - if (tag != 64) { + if (tag != 56) { break; } } - case 64: { - // takenPremiumReward2 - takenPremiumReward2 = input.readUInt64(); + case 56: { + // takenPremiumExtendedReward + takenPremiumExtendedReward = input.readUInt64(); bitField0_ |= 0x00000008; tag = input.readTag(); - if (tag != 72) { + if (tag != 64) { break; } } - case 72: { - // takenFreeReward - takenFreeReward = input.readUInt64(); + case 64: { + // takenPremiumOptionalReward + takenPremiumOptionalReward = input.readUInt64(); bitField0_ |= 0x00000010; tag = input.readTag(); - if (tag != 80) { + if (tag != 72) { break; } } - case 80: { - // takenPremiumReward1 - takenPremiumReward1 = input.readUInt64(); + case 72: { + // takenFreeReward + takenFreeReward = input.readUInt64(); bitField0_ |= 0x00000020; tag = input.readTag(); - if (tag != 88) { + if (tag != 96) { break; } } - case 88: { - // takenPremiumOptionalReward - takenPremiumOptionalReward = input.readUInt64(); + case 96: { + // takenFreeExtendedReward + takenFreeExtendedReward = input.readUInt64(); bitField0_ |= 0x00000040; tag = input.readTag(); - if (tag != 32) { + if (tag != 112) { break; } } - case 32: { - // exp - exp = input.readUInt32(); + case 112: { + // idk + idk = input.readUInt64(); bitField0_ |= 0x00000080; tag = input.readTag(); - if (tag != 56) { + if (tag != 24) { break; } } - case 56: { - // level - level = input.readUInt32(); + case 24: { + // curWeekAddExpSum + curWeekAddExpSum = input.readUInt32(); bitField0_ |= 0x00000100; tag = input.readTag(); - if (tag != 112) { + if (tag != 40) { break; } } - case 112: { + case 40: { // curBpId curBpId = input.readUInt32(); bitField0_ |= 0x00000200; tag = input.readTag(); - if (tag != 120) { + if (tag != 48) { break; } } - case 120: { - // curWeekAddExpSum - curWeekAddExpSum = input.readUInt32(); + case 48: { + // exp + exp = input.readUInt32(); bitField0_ |= 0x00000400; tag = input.readTag(); - if (tag != 8) { + if (tag != 80) { break; } } - case 8: { + case 80: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000800; + tag = input.readTag(); + if (tag != 120) { + break; + } + } + case 120: { // bpTierType final int value = input.readInt32(); if (BpTierType.forNumber(value) != null) { bpTierType = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; } tag = input.readTag(); if (tag != 0) { @@ -911,39 +1055,42 @@ public BattlePassInfoNotify mergeFrom(final ProtoSource input) throws IOExceptio public void writeTo(final JsonSink output) throws IOException { output.beginObject(); if ((bitField0_ & 0x00000001) != 0) { - output.writeUInt64(FieldNames.takenPremiumExtendedReward, takenPremiumExtendedReward); + output.writeUInt64(FieldNames.takenPremiumReward2, takenPremiumReward2); } if ((bitField0_ & 0x00000002) != 0) { - output.writeUInt64(FieldNames.takenFreeExtendedReward, takenFreeExtendedReward); + output.writeUInt64(FieldNames.unkfield, unkfield); } if ((bitField0_ & 0x00000004) != 0) { - output.writeUInt64(FieldNames.unkfield, unkfield); + output.writeUInt64(FieldNames.takenPremiumReward1, takenPremiumReward1); } if ((bitField0_ & 0x00000008) != 0) { - output.writeUInt64(FieldNames.takenPremiumReward2, takenPremiumReward2); + output.writeUInt64(FieldNames.takenPremiumExtendedReward, takenPremiumExtendedReward); } if ((bitField0_ & 0x00000010) != 0) { - output.writeUInt64(FieldNames.takenFreeReward, takenFreeReward); + output.writeUInt64(FieldNames.takenPremiumOptionalReward, takenPremiumOptionalReward); } if ((bitField0_ & 0x00000020) != 0) { - output.writeUInt64(FieldNames.takenPremiumReward1, takenPremiumReward1); + output.writeUInt64(FieldNames.takenFreeReward, takenFreeReward); } if ((bitField0_ & 0x00000040) != 0) { - output.writeUInt64(FieldNames.takenPremiumOptionalReward, takenPremiumOptionalReward); + output.writeUInt64(FieldNames.takenFreeExtendedReward, takenFreeExtendedReward); } if ((bitField0_ & 0x00000080) != 0) { - output.writeUInt32(FieldNames.exp, exp); + output.writeUInt64(FieldNames.idk, idk); } if ((bitField0_ & 0x00000100) != 0) { - output.writeUInt32(FieldNames.level, level); + output.writeUInt32(FieldNames.curWeekAddExpSum, curWeekAddExpSum); } if ((bitField0_ & 0x00000200) != 0) { output.writeUInt32(FieldNames.curBpId, curBpId); } if ((bitField0_ & 0x00000400) != 0) { - output.writeUInt32(FieldNames.curWeekAddExpSum, curWeekAddExpSum); + output.writeUInt32(FieldNames.exp, exp); } if ((bitField0_ & 0x00000800) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00001000) != 0) { output.writeEnum(FieldNames.bpTierType, bpTierType, BpTierType.converter()); } output.endObject(); @@ -956,11 +1103,11 @@ public BattlePassInfoNotify mergeFrom(final JsonSource input) throws IOException } while (!input.isAtEnd()) { switch (input.readFieldHash()) { - case -1290021512: - case -2138632299: { - if (input.isAtField(FieldNames.takenPremiumExtendedReward)) { + case 226926899: + case 1195903363: { + if (input.isAtField(FieldNames.takenPremiumReward2)) { if (!input.trySkipNullValue()) { - takenPremiumExtendedReward = input.readUInt64(); + takenPremiumReward2 = input.readUInt64(); bitField0_ |= 0x00000001; } } else { @@ -968,11 +1115,10 @@ public BattlePassInfoNotify mergeFrom(final JsonSource input) throws IOException } break; } - case -1116117893: - case 1257087386: { - if (input.isAtField(FieldNames.takenFreeExtendedReward)) { + case -247717048: { + if (input.isAtField(FieldNames.unkfield)) { if (!input.trySkipNullValue()) { - takenFreeExtendedReward = input.readUInt64(); + unkfield = input.readUInt64(); bitField0_ |= 0x00000002; } } else { @@ -980,10 +1126,11 @@ public BattlePassInfoNotify mergeFrom(final JsonSource input) throws IOException } break; } - case -247717048: { - if (input.isAtField(FieldNames.unkfield)) { + case 226926898: + case 1195903362: { + if (input.isAtField(FieldNames.takenPremiumReward1)) { if (!input.trySkipNullValue()) { - unkfield = input.readUInt64(); + takenPremiumReward1 = input.readUInt64(); bitField0_ |= 0x00000004; } } else { @@ -991,11 +1138,11 @@ public BattlePassInfoNotify mergeFrom(final JsonSource input) throws IOException } break; } - case 226926899: - case 1195903363: { - if (input.isAtField(FieldNames.takenPremiumReward2)) { + case -1290021512: + case -2138632299: { + if (input.isAtField(FieldNames.takenPremiumExtendedReward)) { if (!input.trySkipNullValue()) { - takenPremiumReward2 = input.readUInt64(); + takenPremiumExtendedReward = input.readUInt64(); bitField0_ |= 0x00000008; } } else { @@ -1003,11 +1150,11 @@ public BattlePassInfoNotify mergeFrom(final JsonSource input) throws IOException } break; } - case 1065549026: - case 135671018: { - if (input.isAtField(FieldNames.takenFreeReward)) { + case 736311903: + case 548161422: { + if (input.isAtField(FieldNames.takenPremiumOptionalReward)) { if (!input.trySkipNullValue()) { - takenFreeReward = input.readUInt64(); + takenPremiumOptionalReward = input.readUInt64(); bitField0_ |= 0x00000010; } } else { @@ -1015,11 +1162,11 @@ public BattlePassInfoNotify mergeFrom(final JsonSource input) throws IOException } break; } - case 226926898: - case 1195903362: { - if (input.isAtField(FieldNames.takenPremiumReward1)) { + case 1065549026: + case 135671018: { + if (input.isAtField(FieldNames.takenFreeReward)) { if (!input.trySkipNullValue()) { - takenPremiumReward1 = input.readUInt64(); + takenFreeReward = input.readUInt64(); bitField0_ |= 0x00000020; } } else { @@ -1027,11 +1174,11 @@ public BattlePassInfoNotify mergeFrom(final JsonSource input) throws IOException } break; } - case 736311903: - case 548161422: { - if (input.isAtField(FieldNames.takenPremiumOptionalReward)) { + case -1116117893: + case 1257087386: { + if (input.isAtField(FieldNames.takenFreeExtendedReward)) { if (!input.trySkipNullValue()) { - takenPremiumOptionalReward = input.readUInt64(); + takenFreeExtendedReward = input.readUInt64(); bitField0_ |= 0x00000040; } } else { @@ -1039,10 +1186,10 @@ public BattlePassInfoNotify mergeFrom(final JsonSource input) throws IOException } break; } - case 100893: { - if (input.isAtField(FieldNames.exp)) { + case 104112: { + if (input.isAtField(FieldNames.idk)) { if (!input.trySkipNullValue()) { - exp = input.readUInt32(); + idk = input.readUInt64(); bitField0_ |= 0x00000080; } } else { @@ -1050,10 +1197,11 @@ public BattlePassInfoNotify mergeFrom(final JsonSource input) throws IOException } break; } - case 102865796: { - if (input.isAtField(FieldNames.level)) { + case 835771131: + case 26830815: { + if (input.isAtField(FieldNames.curWeekAddExpSum)) { if (!input.trySkipNullValue()) { - level = input.readUInt32(); + curWeekAddExpSum = input.readUInt32(); bitField0_ |= 0x00000100; } } else { @@ -1073,11 +1221,10 @@ public BattlePassInfoNotify mergeFrom(final JsonSource input) throws IOException } break; } - case 835771131: - case 26830815: { - if (input.isAtField(FieldNames.curWeekAddExpSum)) { + case 100893: { + if (input.isAtField(FieldNames.exp)) { if (!input.trySkipNullValue()) { - curWeekAddExpSum = input.readUInt32(); + exp = input.readUInt32(); bitField0_ |= 0x00000400; } } else { @@ -1085,6 +1232,17 @@ public BattlePassInfoNotify mergeFrom(final JsonSource input) throws IOException } break; } + case 102865796: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000800; + } + } else { + input.skipUnknownField(); + } + break; + } case -584657238: case 779964614: { if (input.isAtField(FieldNames.bpTierType)) { @@ -1092,7 +1250,7 @@ public BattlePassInfoNotify mergeFrom(final JsonSource input) throws IOException final BpTierType value = input.readEnum(BpTierType.converter()); if (value != null) { bpTierType = value.getNumber(); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; } else { input.skipUnknownEnumValue(); } @@ -1292,28 +1450,30 @@ public BattlePassInfoNotify create() { * Contains name constants used for serializing JSON */ static class FieldNames { - static final FieldName takenPremiumExtendedReward = FieldName.forField("takenPremiumExtendedReward", "taken_premium_extended_reward"); - - static final FieldName takenFreeExtendedReward = FieldName.forField("takenFreeExtendedReward", "taken_free_extended_reward"); - - static final FieldName unkfield = FieldName.forField("unkfield"); - static final FieldName takenPremiumReward2 = FieldName.forField("takenPremiumReward2", "taken_premium_reward2"); - static final FieldName takenFreeReward = FieldName.forField("takenFreeReward", "taken_free_reward"); + static final FieldName unkfield = FieldName.forField("unkfield"); static final FieldName takenPremiumReward1 = FieldName.forField("takenPremiumReward1", "taken_premium_reward1"); + static final FieldName takenPremiumExtendedReward = FieldName.forField("takenPremiumExtendedReward", "taken_premium_extended_reward"); + static final FieldName takenPremiumOptionalReward = FieldName.forField("takenPremiumOptionalReward", "taken_premium_optional_reward"); - static final FieldName exp = FieldName.forField("exp"); + static final FieldName takenFreeReward = FieldName.forField("takenFreeReward", "taken_free_reward"); - static final FieldName level = FieldName.forField("level"); + static final FieldName takenFreeExtendedReward = FieldName.forField("takenFreeExtendedReward", "taken_free_extended_reward"); - static final FieldName curBpId = FieldName.forField("curBpId", "cur_bp_id"); + static final FieldName idk = FieldName.forField("idk"); static final FieldName curWeekAddExpSum = FieldName.forField("curWeekAddExpSum", "cur_week_add_exp_sum"); + static final FieldName curBpId = FieldName.forField("curBpId", "cur_bp_id"); + + static final FieldName exp = FieldName.forField("exp"); + + static final FieldName level = FieldName.forField("level"); + static final FieldName bpTierType = FieldName.forField("bpTierType", "bp_tier_type"); } } diff --git a/src/main/java/emu/lunarcore/server/packet/recv/HandlerPlayerLoginFinishCsReq.java b/src/main/java/emu/lunarcore/server/packet/recv/HandlerPlayerLoginFinishCsReq.java index 89fc46ab1..9db5934fd 100644 --- a/src/main/java/emu/lunarcore/server/packet/recv/HandlerPlayerLoginFinishCsReq.java +++ b/src/main/java/emu/lunarcore/server/packet/recv/HandlerPlayerLoginFinishCsReq.java @@ -4,6 +4,7 @@ import emu.lunarcore.server.packet.CmdId; import emu.lunarcore.server.packet.Opcodes; import emu.lunarcore.server.packet.PacketHandler; +import emu.lunarcore.server.packet.send.PacketBattlePassInfoNotify; @Opcodes(CmdId.PlayerLoginFinishCsReq) public class HandlerPlayerLoginFinishCsReq extends PacketHandler { @@ -12,7 +13,7 @@ public class HandlerPlayerLoginFinishCsReq extends PacketHandler { public void handle(GameSession session, byte[] data) throws Exception { session.send(CmdId.PlayerLoginFinishScRsp); session.send(CmdId.GetArchiveDataScRsp); - //session.send(new PacketBattlePassInfoNotify()); + session.send(new PacketBattlePassInfoNotify()); } }