1
This commit is contained in:
parent
1a1000c482
commit
892da19824
@ -245,6 +245,21 @@ void CallFuncBuff::Activate()
|
|||||||
BatchRandomPosSummonObstacle();
|
BatchRandomPosSummonObstacle();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case BuffCallFunc_e::kOnBreakSkill:
|
||||||
|
{
|
||||||
|
OnBreakSkill();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case BuffCallFunc_e::kBreakSkill:
|
||||||
|
{
|
||||||
|
BreakSkill();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case BuffCallFunc_e::kBuffEffectCondAdd:
|
||||||
|
{
|
||||||
|
BuffEffectCondAdd();
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -1580,3 +1595,55 @@ void CallFuncBuff::BatchRandomPosSummonObstacle()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CallFuncBuff::OnBreakSkill()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CallFuncBuff::BreakSkill()
|
||||||
|
{
|
||||||
|
Buff* on_break_buff = nullptr;
|
||||||
|
for (auto buff_id : meta->_buff_param2_int_list) {
|
||||||
|
on_break_buff = owner->GetBuffById(buff_id);
|
||||||
|
if (on_break_buff) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (on_break_buff) {
|
||||||
|
int buff_uniid = on_break_buff->buff_uniid;
|
||||||
|
for (auto buff_id : meta->_buff_param3_int_list) {
|
||||||
|
if (buff_id > 0) {
|
||||||
|
owner->TryAddBuff(
|
||||||
|
GetCaster().Get(),
|
||||||
|
buff_id,
|
||||||
|
skill_meta,
|
||||||
|
init_args,
|
||||||
|
buff_vars
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
owner->RemoveBuffById(-buff_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
owner->RemoveBuffByUniId(buff_uniid);
|
||||||
|
} else {
|
||||||
|
for (auto buff_id : meta->_buff_param4_int_list) {
|
||||||
|
if (buff_id > 0) {
|
||||||
|
owner->TryAddBuff(
|
||||||
|
GetCaster().Get(),
|
||||||
|
buff_id,
|
||||||
|
skill_meta,
|
||||||
|
init_args,
|
||||||
|
buff_vars
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
owner->RemoveBuffById(-buff_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CallFuncBuff::BuffEffectCondAdd()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -40,6 +40,9 @@ A8_DECLARE_CLASS_ENUM(BuffCallFunc_e, int,
|
|||||||
kAccumulatePower = 40,
|
kAccumulatePower = 40,
|
||||||
kCallShot = 41,
|
kCallShot = 41,
|
||||||
kBatchRandomPosSummonObstacle = 42,
|
kBatchRandomPosSummonObstacle = 42,
|
||||||
|
kOnBreakSkill = 43,
|
||||||
|
kBreakSkill = 44,
|
||||||
|
kBuffEffectCondAdd = 45
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -78,6 +81,9 @@ class CallFuncBuff : public Buff
|
|||||||
void AccumulatePower();
|
void AccumulatePower();
|
||||||
void Shot();
|
void Shot();
|
||||||
void BatchRandomPosSummonObstacle();
|
void BatchRandomPosSummonObstacle();
|
||||||
|
void OnBreakSkill();
|
||||||
|
void BreakSkill();
|
||||||
|
void BuffEffectCondAdd();
|
||||||
|
|
||||||
void InternalRangeHoldBuff(std::function<bool(glm::vec3&)> get_center_func);
|
void InternalRangeHoldBuff(std::function<bool(glm::vec3&)> get_center_func);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user