diff --git a/server/gameserver/buff/callfunc.cc b/server/gameserver/buff/callfunc.cc index 951d442c..6bdaa2b2 100644 --- a/server/gameserver/buff/callfunc.cc +++ b/server/gameserver/buff/callfunc.cc @@ -711,6 +711,19 @@ void CallFuncBuff::SummonObstacleSpecPoint() Obstacle* ob = owner->SummonObstacle(this, glm::vec3(x, y, z), owner->GetAttackDir()); + if (ob) { + std::shared_ptr> vars = std::make_shared>(); + vars->push_back(ob->GetUniId()); + for (int buff_id : meta->_buff_param6_int_list) { + owner->TryAddBuff( + GetCaster().Get(), + buff_id, + skill_meta, + init_args, + vars + ); + } + } } } @@ -740,19 +753,17 @@ void CallFuncBuff::SummonObstacleSpecDistance() born_pos, owner->GetAttackDir()); if (ob) { - #if 0 std::shared_ptr> vars = std::make_shared>(); - vars->push_back(hero->GetUniId()); + vars->push_back(ob->GetUniId()); for (int buff_id : meta->_buff_param6_int_list) { - hero->TryAddBuff( - GetCaster().Get(), - buff_id, - skill_meta, - init_args, - vars - ); + ob->TryAddBuff( + GetCaster().Get(), + buff_id, + skill_meta, + init_args, + vars + ); } - #endif } } }