1
This commit is contained in:
parent
6d4aa34c9e
commit
b89a7ac80e
@ -703,30 +703,44 @@ void CallFuncBuff::ClearSummonHero()
|
|||||||
|
|
||||||
void CallFuncBuff::SummonObstacleSpecPoint()
|
void CallFuncBuff::SummonObstacleSpecPoint()
|
||||||
{
|
{
|
||||||
#if 0
|
int id = meta->_int_buff_param2;
|
||||||
int hero_id = meta->_int_buff_param2;
|
|
||||||
float x = meta->GetBuffParam3(this);
|
float x = meta->GetBuffParam3(this);
|
||||||
float y = meta->GetBuffParam4(this);
|
float y = meta->GetBuffParam4(this);
|
||||||
float z = meta->GetBuffParam5(this);
|
float z = meta->GetBuffParam5(this);
|
||||||
if (!owner->dead || meta->dead_valid() != 0) {
|
if (!owner->dead || meta->dead_valid() != 0) {
|
||||||
Hero* hero = owner->SummonHero(this,
|
Obstacle* ob = owner->SummonObstacle(this,
|
||||||
glm::vec3(x, y, z),
|
glm::vec3(x, y, z),
|
||||||
owner->GetAttackDir());
|
owner->GetAttackDir());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CallFuncBuff::SummonObstacleSpecDistance()
|
void CallFuncBuff::SummonObstacleSpecDistance()
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
int hero_id = meta->_int_buff_param2;
|
int hero_id = meta->_int_buff_param2;
|
||||||
float distance = meta->GetBuffParam3(this);
|
float distance = meta->GetBuffParam3(this);
|
||||||
if (!owner->dead || meta->dead_valid() != 0) {
|
if (!owner->dead || meta->dead_valid() != 0) {
|
||||||
glm::vec3 born_pos = owner->GetPos().ToGlmVec3();
|
bool hit_result;
|
||||||
Hero* hero = owner->SummonHero(this,
|
glm::vec3 hit_point;
|
||||||
born_pos,
|
glm::vec3 start = owner->GetPos().ToGlmVec3();
|
||||||
owner->GetAttackDir());
|
glm::vec3 end = owner->GetPos().ToGlmVec3() + owner->GetAttackDir() * distance;
|
||||||
if (hero) {
|
glm::vec3 born_pos = owner->GetPos().ToGlmVec3() + owner->GetAttackDir() * distance;
|
||||||
|
owner->room->map_instance->Scale(start);
|
||||||
|
owner->room->map_instance->Scale(end);
|
||||||
|
if (owner->room->map_instance->Raycast
|
||||||
|
(
|
||||||
|
start,
|
||||||
|
end,
|
||||||
|
hit_point,
|
||||||
|
hit_result
|
||||||
|
)) {
|
||||||
|
owner->room->map_instance->UnScale(hit_point);
|
||||||
|
born_pos = hit_point;
|
||||||
|
}
|
||||||
|
Obstacle* ob = owner->SummonObstacle(this,
|
||||||
|
born_pos,
|
||||||
|
owner->GetAttackDir());
|
||||||
|
if (ob) {
|
||||||
|
#if 0
|
||||||
std::shared_ptr<std::vector<float>> vars = std::make_shared<std::vector<float>>();
|
std::shared_ptr<std::vector<float>> vars = std::make_shared<std::vector<float>>();
|
||||||
vars->push_back(hero->GetUniId());
|
vars->push_back(hero->GetUniId());
|
||||||
for (int buff_id : meta->_buff_param6_int_list) {
|
for (int buff_id : meta->_buff_param6_int_list) {
|
||||||
@ -738,9 +752,9 @@ void CallFuncBuff::SummonObstacleSpecDistance()
|
|||||||
vars
|
vars
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CallFuncBuff::ClearSummonObstacle()
|
void CallFuncBuff::ClearSummonObstacle()
|
||||||
|
@ -3075,6 +3075,26 @@ std::shared_ptr<std::set<int>> Creature::CalcReporterList(const mt::Equip* weapo
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Obstacle* Creature::SummonObstacle(Buff* buff,
|
||||||
|
const glm::vec3& pos,
|
||||||
|
const glm::vec3& dir
|
||||||
|
)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
Obstacle* hero = nullptr;
|
||||||
|
const mt::Hero* hero_meta = mt::Hero::GetById(buff->meta->_int_buff_param2);
|
||||||
|
if (hero_meta) {
|
||||||
|
hero = InternalSummonHero(buff,
|
||||||
|
hero_meta,
|
||||||
|
GetAttackDir(),
|
||||||
|
pos
|
||||||
|
);
|
||||||
|
hero->hero_level = GetBattleContext()->GetHeroLevel();
|
||||||
|
}
|
||||||
|
return hero;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void Creature::RemoveSurplusObstacle(int id, int num)
|
void Creature::RemoveSurplusObstacle(int id, int num)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user