diff options
author | Jesusalva Jesusalva <jesusalva@themanaworld.org> | 2022-10-23 15:45:32 +0000 |
---|---|---|
committer | Jesusalva Jesusalva <jesusalva@themanaworld.org> | 2022-10-23 15:45:32 +0000 |
commit | 9a3566484f2345db599552a6c18311978a0071ea (patch) | |
tree | 14495e785cfdcb3d8678a6edeeab9438a5f3af2e /src/char | |
parent | 45b741f89800d7aad76ed0831416a8e7571886d1 (diff) | |
parent | 5cdf930c6596b778db40138726163b9dfd68ae4f (diff) | |
download | tmwa-9a3566484f2345db599552a6c18311978a0071ea.tar.gz tmwa-9a3566484f2345db599552a6c18311978a0071ea.tar.bz2 tmwa-9a3566484f2345db599552a6c18311978a0071ea.tar.xz tmwa-9a3566484f2345db599552a6c18311978a0071ea.zip |
Merge branch 'tmwa-admin-reg2-mod' into 'master'
Tmwa admin reg2 mod, required for Mirror Lake
See merge request legacy/tmwa!235
Diffstat (limited to 'src/char')
-rw-r--r-- | src/char/char.cpp | 13 | ||||
-rw-r--r-- | src/char/inter.cpp | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/char/char.cpp b/src/char/char.cpp index 4d930f1..8b403b3 100644 --- a/src/char/char.cpp +++ b/src/char/char.cpp @@ -317,7 +317,7 @@ AString mmo_char_tostr(struct CharPair *cp) } str_p += '\t'; - assert (p->global_reg_num < GLOBAL_REG_NUM); + assert (p->global_reg_num <= GLOBAL_REG_NUM); for (int i = 0; i < p->global_reg_num; i++) { if (p->global_reg[i].str) @@ -1034,7 +1034,7 @@ static int set_account_reg2(AccountId acc, Slice<GlobalReg> reg) { size_t num = reg.size(); - assert (num < ACCOUNT_REG2_NUM); + assert (num <= ACCOUNT_REG2_NUM); int c = 0; for (CharPair& cd : char_keys) { @@ -1409,7 +1409,7 @@ void parse_tologin(Session *ls) break; } - // account_reg2変更通知 + // account_reg2変更通知 | account_reg2 Change Notification case 0x2729: { Packet_Head<0x2729> head; @@ -1459,7 +1459,7 @@ void parse_tologin(Session *ls) AccountId aid = fixed.account_id; // Deletion of all characters of the account -//#warning "This comment is a lie, but it's still true." + //#warning "This comment is a lie, but it's still true." // needs to use index because they may move during resize for (int idx = 0; idx < char_keys.size(); idx++) { @@ -2098,7 +2098,7 @@ void parse_frommap(Session *ms) } } - // account_reg保存要求 + // account_reg保存要求 | account_reg preservation requirements case 0x2b10: { Packet_Head<0x2b10> head; @@ -2117,11 +2117,12 @@ void parse_frommap(Session *ms) reg[j].value = repeat[j].value; } set_account_reg2(acc, Slice<GlobalReg>(reg.begin(), jlim)); - // loginサーバーへ送る + // loginサーバーへ送る | login Send to server if (login_session) { // don't send request if no login-server Packet_Head<0x2728> head_28; + head_28.account_id = head.account_id; std::vector<Packet_Repeat<0x2728>> repeat_28(repeat.size()); for (size_t j = 0; j < repeat.size(); ++j) { diff --git a/src/char/inter.cpp b/src/char/inter.cpp index 3bf3bfc..3f2d1aa 100644 --- a/src/char/inter.cpp +++ b/src/char/inter.cpp @@ -68,7 +68,7 @@ namespace char_ static AString inter_accreg_tostr(struct accreg *reg) { - assert(reg->reg_num < ACCOUNT_REG_NUM); + assert(reg->reg_num <= ACCOUNT_REG_NUM); MString str; str += STRPRINTF("%d\t"_fmt, reg->account_id); for (int j = 0; j < reg->reg_num; j++) @@ -236,7 +236,7 @@ void mapif_account_reg_reply(Session *s, AccountId account_id) OMATCH_BEGIN_SOME (reg, reg_) { repeat_04.resize(reg->reg_num); - assert (reg->reg_num < ACCOUNT_REG_NUM); + assert (reg->reg_num <= ACCOUNT_REG_NUM); for (size_t j = 0; j < reg->reg_num; ++j) { repeat_04[j].name = reg->reg[j].str; |