1
This commit is contained in:
parent
052ba3bd57
commit
91cdf7cf50
@ -23,9 +23,9 @@ void HoldShieldBuff::Activate()
|
|||||||
kPropShieldHp,
|
kPropShieldHp,
|
||||||
owner->shield_max_hp_,
|
owner->shield_max_hp_,
|
||||||
owner->shield_hp_);
|
owner->shield_hp_);
|
||||||
hold_param2_ = meta->GetBuffParam2(this);
|
hold_param3_ = meta->GetBuffParam3(this);
|
||||||
check_interval_time_ = meta->GetBuffParam3(this);
|
check_interval_time_ = meta->GetBuffParam5(this);
|
||||||
if (meta->_int_buff_param1) {
|
if (meta->_buff_param1_int_list.size() > 1) {
|
||||||
std::map<int, long long> hited_objects = std::map<int, long long>();
|
std::map<int, long long> hited_objects = std::map<int, long long>();
|
||||||
owner->room->xtimer.SetIntervalEx
|
owner->room->xtimer.SetIntervalEx
|
||||||
(
|
(
|
||||||
@ -34,7 +34,7 @@ void HoldShieldBuff::Activate()
|
|||||||
{
|
{
|
||||||
if (a8::TIMER_EXEC_EVENT == event) {
|
if (a8::TIMER_EXEC_EVENT == event) {
|
||||||
std::set<Creature*> enemys;
|
std::set<Creature*> enemys;
|
||||||
owner->GetHitEnemys(enemys, owner->GetPos().ToGlmVec3(), hold_param2_);
|
owner->GetHitEnemys(enemys, owner->GetPos().ToGlmVec3(), hold_param3_);
|
||||||
for (auto& enemy : enemys) {
|
for (auto& enemy : enemys) {
|
||||||
auto itr = hited_objects.find(enemy->GetUniId());
|
auto itr = hited_objects.find(enemy->GetUniId());
|
||||||
if (itr != hited_objects.end()) {
|
if (itr != hited_objects.end()) {
|
||||||
@ -63,5 +63,7 @@ void HoldShieldBuff::Deactivate()
|
|||||||
|
|
||||||
void HoldShieldBuff::OnEnemyHit(Creature* enemy)
|
void HoldShieldBuff::OnEnemyHit(Creature* enemy)
|
||||||
{
|
{
|
||||||
enemy->TryAddBuff(GetCaster().Get(), meta->_int_buff_param1, skill_meta);
|
if (meta->_buff_param1_int_list.size() > 1) {
|
||||||
|
enemy->TryAddBuff(GetCaster().Get(), meta->_buff_param1_int_list[1], skill_meta);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,6 @@ class HoldShieldBuff : public Buff
|
|||||||
void OnEnemyHit(Creature* enemy);
|
void OnEnemyHit(Creature* enemy);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float hold_param2_ = 0.0f;
|
float hold_param3_ = 0.0f;
|
||||||
float check_interval_time_ = 0.0f;
|
float check_interval_time_ = 0.0f;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user