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