diff --git a/server/gameserver/buff/callfunc.cc b/server/gameserver/buff/callfunc.cc index f3dddfd3..8e71db78 100644 --- a/server/gameserver/buff/callfunc.cc +++ b/server/gameserver/buff/callfunc.cc @@ -346,8 +346,14 @@ void CallFuncBuff::ProcLightCircle() const mt::Skill* old_skill_meta = skill_meta; skill_meta = curr_skill_meta; - for (int buff_id : meta->_buff_param2_int_list) { - o.buff_uniids.insert(hum->TryAddBuff(GetCaster().Get(), buff_id, skill_meta)); + if (context->active_skill_meta) { + for (int buff_id : meta->_buff_param3_int_list) { + o.buff_uniids.insert(hum->TryAddBuff(GetCaster().Get(), buff_id, skill_meta)); + } + } else { + for (int buff_id : meta->_buff_param2_int_list) { + o.buff_uniids.insert(hum->TryAddBuff(GetCaster().Get(), buff_id, skill_meta)); + } } skill_meta = old_skill_meta; @@ -437,6 +443,9 @@ void CallFuncBuff::ProcLightCircle() if (a8::TIMER_EXEC_EVENT == event) { check_cb(); } else if (kActiveDjsSkillTimerEvent == event) { + for (auto& pair : context->in_human_infos) { + on_leave(pair.second.c.Get()->AsHuman()); + } context->in_human_infos.clear(); context->active_skill_meta = args->Get(0); Buff* buff = owner->GetBuffByUniId(context->keep_buff_uniid); @@ -447,6 +456,9 @@ void CallFuncBuff::ProcLightCircle() } check_cb(); } else if (kDeactiveDjsSkillTimerEvent == event) { + for (auto& pair : context->in_human_infos) { + on_leave(pair.second.c.Get()->AsHuman()); + } context->in_human_infos.clear(); context->active_skill_meta = nullptr; Buff* buff = owner->GetBuffByUniId(context->keep_buff_uniid); diff --git a/server/gameserver/mt/Grasp.cc b/server/gameserver/mt/Grasp.cc index 1c9eed06..460dafce 100644 --- a/server/gameserver/mt/Grasp.cc +++ b/server/gameserver/mt/Grasp.cc @@ -3,12 +3,27 @@ #include "mt/Grasp.h" IMPL_TABLE(mt::Grasp) +std::map> mt::Grasp::hero_id_lv_hash_; namespace mt { void Grasp::Init1() { + { + std::vector strings; + a8::Split(add_buff_list(), strings, '|'); + for (auto& str : strings) { + _add_buff_list.insert(a8::XValue(str)); + } + } + { + std::vector strings; + a8::Split(remove_buff_list(), strings, '|'); + for (auto& str : strings) { + _remove_buff_list.insert(a8::XValue(str)); + } + } } void Grasp::Init2() diff --git a/server/gameserver/mt/Grasp.h b/server/gameserver/mt/Grasp.h index d4f8b430..ca9c10fe 100644 --- a/server/gameserver/mt/Grasp.h +++ b/server/gameserver/mt/Grasp.h @@ -20,7 +20,10 @@ namespace mt std::set* GetBuffs(int hero_id, int hero_lv); private: - std::map> hero_id_lv_hash_; + static std::map> hero_id_lv_hash_; + + std::set _add_buff_list; + std::set _remove_buff_list; };