1
This commit is contained in:
parent
9f8271f74b
commit
768bcf81cc
@ -7,6 +7,7 @@
|
||||
#include "trigger.h"
|
||||
#include "collision.h"
|
||||
#include "human.h"
|
||||
#include "ability.h"
|
||||
|
||||
#include "mt/Buff.h"
|
||||
#include "mt/Skill.h"
|
||||
@ -44,6 +45,9 @@ void HideBuff::Activate()
|
||||
&xtimer_attacher
|
||||
);
|
||||
}
|
||||
if (meta->_int_buff_param1 > 0) {
|
||||
owner->GetAbility()->IncSwitch(kHideBuffMoveShow);
|
||||
}
|
||||
}
|
||||
|
||||
void HideBuff::Deactivate()
|
||||
@ -55,6 +59,9 @@ void HideBuff::Deactivate()
|
||||
}
|
||||
}
|
||||
alert_buff_hash_.clear();
|
||||
if (meta->_int_buff_param1 > 0) {
|
||||
owner->GetAbility()->DecSwitch(kHideBuffMoveShow);
|
||||
}
|
||||
}
|
||||
|
||||
void HideBuff::AddInRangeObject(Creature* target)
|
||||
|
@ -521,6 +521,7 @@ enum SwitchTimesType_e
|
||||
kAccumulatePowerTimes,
|
||||
kForceClientReportBullet,
|
||||
kIgnoreOriginalDmg,
|
||||
kHideBuffMoveShow,
|
||||
kSwitchTimeEnd,
|
||||
};
|
||||
|
||||
|
@ -2649,7 +2649,7 @@ void Creature::UpdateMove()
|
||||
}
|
||||
{
|
||||
Buff* hide_buff = GetBuffByEffectId(kBET_Hide);
|
||||
if (hide_buff && hide_buff->meta->_int_buff_param1 > 0) {
|
||||
if (hide_buff && GetAbility()->GetSwitchTimes(kHideBuffMoveShow)) {
|
||||
RemoveHideEffect(kMoveReason);
|
||||
}
|
||||
}
|
||||
|
@ -679,7 +679,7 @@ void Trigger::EnterBattleMode()
|
||||
{
|
||||
for (int buff_id : buff->meta->_buff_param4_int_list) {
|
||||
if (buff_id > 0) {
|
||||
owner_->TryAddBuff(owner_, buff_id);
|
||||
owner_->TryAddBuff(owner_, buff_id, buff->skill_meta);
|
||||
} else {
|
||||
owner_->ClearBuffById(buff_id);
|
||||
}
|
||||
@ -695,7 +695,7 @@ void Trigger::LeaveBattleMode()
|
||||
{
|
||||
for (int buff_id : buff->meta->_buff_param4_int_list) {
|
||||
if (buff_id > 0) {
|
||||
owner_->TryAddBuff(owner_, buff_id);
|
||||
owner_->TryAddBuff(owner_, buff_id, buff->skill_meta);
|
||||
} else {
|
||||
owner_->ClearBuffById(buff_id);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user