This commit is contained in:
aozhiwei 2023-02-28 16:36:36 +08:00
parent 36d8036d25
commit 7673c49071
3 changed files with 14 additions and 1 deletions

View File

@ -9,6 +9,7 @@
#include "skillhelper.h" #include "skillhelper.h"
#include "mt/Skill.h" #include "mt/Skill.h"
#include "mt/Buff.h"
#include "mt/SkillNumber.h" #include "mt/SkillNumber.h"
void HoldShieldBuff::Activate() void HoldShieldBuff::Activate()
@ -32,9 +33,10 @@ void HoldShieldBuff::Activate()
( (
SMT_BLINK, SMT_BLINK,
SkillHelper::GetLdfyBuffTime(owner, skill_meta) * 1000, SkillHelper::GetLdfyBuffTime(owner, skill_meta) * 1000,
[c] [this, c]
{ {
c->RemoveBuffByEffectId(kBET_HoldShield); c->RemoveBuffByEffectId(kBET_HoldShield);
c->TryAddBuff(c, meta->_int_buff_param2);
} }
); );
} }

View File

@ -2701,6 +2701,7 @@ void Creature::CheckBulletHitHoldShield(IBullet* bullet, bool& eat)
a8::XPrintf("shiled destory\n", {}); a8::XPrintf("shiled destory\n", {});
#endif #endif
GetTrigger()->ShieldDestory(); GetTrigger()->ShieldDestory();
TryAddBuff(this, hold_shield_buff->meta->_int_buff_param1);
RemoveBuffByUniId(hold_shield_buff->buff_uniid); RemoveBuffByUniId(hold_shield_buff->buff_uniid);
} }
eat = true; eat = true;

View File

@ -189,6 +189,16 @@ void SelfChecker::Init()
} }
} }
break; break;
case kBET_HoldShield:
{
if (meta->_int_buff_param1) {
SelfChecker::AddBuff(meta->_int_buff_param1);
}
if (meta->_int_buff_param2) {
SelfChecker::AddBuff(meta->_int_buff_param2);
}
}
break;
default: default:
{ {
} }