1
This commit is contained in:
parent
efd3a5753b
commit
ef830ecbab
@ -100,7 +100,25 @@ void CondAddBuff::ProcBulletHit()
|
||||
|
||||
void CondAddBuff::ProcBulletKill()
|
||||
{
|
||||
auto context = A8_MAKE_ANON_STRUCT_SHARED
|
||||
(
|
||||
);
|
||||
|
||||
handlers_.push_back
|
||||
(
|
||||
owner->GetTrigger()->AddListener
|
||||
(
|
||||
kBulletKill,
|
||||
[this, context]
|
||||
(const a8::Args& args)
|
||||
{
|
||||
IBullet* bullet = args.Get<IBullet*>(0);
|
||||
Creature* c = args.Get<Creature*>(0);
|
||||
if (!owner->dead) {
|
||||
owner->TryAddBuff(owner, meta->_int_buff_param4, skill_meta);
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
void CondAddBuff::ProcBulletEnd()
|
||||
|
@ -507,3 +507,8 @@ void Trigger::EndJump(Creature* sender)
|
||||
{
|
||||
DispatchEvent(kEndJump, {});
|
||||
}
|
||||
|
||||
void Trigger::BulletKill(IBullet* bullet, Creature* target)
|
||||
{
|
||||
DispatchEvent(kBulletKill, {bullet, target});
|
||||
}
|
||||
|
@ -41,7 +41,8 @@ enum EventId_e
|
||||
kAttacked,
|
||||
kStartJump,
|
||||
kEndJump,
|
||||
kTakeonWeaponEvent
|
||||
kTakeonWeaponEvent,
|
||||
kBulletKill
|
||||
};
|
||||
|
||||
class Weapon;
|
||||
@ -67,6 +68,7 @@ public:
|
||||
void ReceiveDmg();
|
||||
void PreDie(int killer_id, int weapon_id);
|
||||
void Die(int killer_id, int weapon_id);
|
||||
void BulletKill(IBullet* bullet, Creature* target);
|
||||
void ActiveBuff(const mt::Buff* buff_meta);
|
||||
void DeactiveBuff(const mt::Buff* buff_meta);
|
||||
void BulletHit(IBullet* bullet, Creature* target);
|
||||
|
Loading…
x
Reference in New Issue
Block a user