From aa8283d53e9f066abb2876a33606b4871899f317 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 29 Mar 2023 16:10:52 +0800 Subject: [PATCH] 1 --- server/gameserver/mt/Buff.cc | 20 ++++++++++++-------- server/gameserver/shot.cc | 3 ++- third_party/a8 | 2 +- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/server/gameserver/mt/Buff.cc b/server/gameserver/mt/Buff.cc index 83f4b090..a87c7534 100644 --- a/server/gameserver/mt/Buff.cc +++ b/server/gameserver/mt/Buff.cc @@ -57,14 +57,18 @@ namespace mt } } { - std::vector strings; - a8::Split(buff_param2(), strings, '|'); - if (buff_param2().find(":") != std::string::npos) { - A8_ABORT(); - } - for (auto& str : strings) { - _buff_param2_int_list.push_back(a8::XValue(str).GetInt()); - _buff_param2_int_set.insert(a8::XValue(str).GetInt()); + if (buff_effect() == kBET_CallFunc && + (int)BuffCallFunc_e::kSetBulletBornOffset == _int_buff_param1) { + } else { + std::vector strings; + a8::Split(buff_param2(), strings, '|'); + if (buff_param2().find(":") != std::string::npos) { + A8_ABORT(); + } + for (auto& str : strings) { + _buff_param2_int_list.push_back(a8::XValue(str).GetInt()); + _buff_param2_int_set.insert(a8::XValue(str).GetInt()); + } } } { diff --git a/server/gameserver/shot.cc b/server/gameserver/shot.cc index 16f09b72..92fb4575 100644 --- a/server/gameserver/shot.cc +++ b/server/gameserver/shot.cc @@ -363,7 +363,8 @@ void InternalShot(Creature* c, return; } auto bullet_born_offset_ptr = &weapon_meta->_bullet_born_offset; - if (c->GetCurrWeapon()->meta == weapon_meta) { + if (c->GetCurrWeapon()->meta == weapon_meta && + c->GetCurrWeapon()->bullet_born_offset_ptr) { bullet_born_offset_ptr = c->GetCurrWeapon()->bullet_born_offset_ptr; } for (auto& tuple : *bullet_born_offset_ptr) { diff --git a/third_party/a8 b/third_party/a8 index 50c04d6b..b6c896a7 160000 --- a/third_party/a8 +++ b/third_party/a8 @@ -1 +1 @@ -Subproject commit 50c04d6bc15bf633f4980039db8be6e61e5b6b55 +Subproject commit b6c896a7c5be517ba12d1b069d58103b6214f09f