1
This commit is contained in:
parent
c236dcdf0b
commit
b2384ba297
@ -162,11 +162,13 @@ void Explosion::InternalAttack()
|
||||
if (explosion_range_ <= 0) {
|
||||
return;
|
||||
}
|
||||
room_->frame_event.AddExplosionEx
|
||||
(sender_,
|
||||
0,
|
||||
center_,
|
||||
explosion_effect_);
|
||||
if (!no_sync_) {
|
||||
room_->frame_event.AddExplosionEx
|
||||
(sender_,
|
||||
0,
|
||||
center_,
|
||||
explosion_effect_);
|
||||
}
|
||||
|
||||
if (explosion_damage_delay_ <= 0) {
|
||||
ProcDamage();
|
||||
|
@ -21,6 +21,7 @@ class Explosion : public std::enable_shared_from_this<Explosion>
|
||||
void SetCustomCheckCb(CommonCbProc cb) { custom_check_cb_ = cb; };
|
||||
void SetThrough(bool through) { through_ = through; };
|
||||
bool IsThrough() { return through_; };
|
||||
void SetNoSync() { no_sync_ = true; };
|
||||
|
||||
void IndifferenceAttack(Room* room,
|
||||
const a8::Vec2& center,
|
||||
@ -56,6 +57,7 @@ protected:
|
||||
CommonCbProc custom_check_cb_;
|
||||
CommonCbProc hit_cb_;
|
||||
bool through_ = false;
|
||||
bool no_sync_ = false;
|
||||
|
||||
friend class EntityFactory;
|
||||
};
|
||||
|
@ -477,6 +477,7 @@ void Skill::ProcSWZB()
|
||||
a8::Vec2 center = owner->GetPos();
|
||||
std::shared_ptr<Explosion> e = EntityFactory::Instance()->MakeExplosion();
|
||||
e->SetThrough(true);
|
||||
e->SetNoSync();
|
||||
e->SetHitCb
|
||||
(
|
||||
[sender, center, skill_meta] (const std::vector<std::any>& params) mutable
|
||||
@ -520,6 +521,7 @@ void Skill::ProcSWZB()
|
||||
Entity* killer = owner->room->GetEntityByUniId(killer_id);
|
||||
if (killer && killer != owner && !meta->raw_phases.empty()) {
|
||||
owner->over_delay_time = meta->raw_phases.at(0).param1;
|
||||
owner->TryAddBuff(owner, 209016);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
{
|
||||
@ -544,11 +546,13 @@ void Skill::ProcSWZB()
|
||||
kDieEvent,
|
||||
[this] (const std::vector<std::any>& params)
|
||||
{
|
||||
#if 0
|
||||
int killer_id = std::any_cast<int>(params.at(0));
|
||||
Entity* killer = owner->room->GetEntityByUniId(killer_id);
|
||||
if (killer && killer != owner) {
|
||||
owner->TryAddBuff(owner, 209016);
|
||||
}
|
||||
#endif
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user