2021-12-05 17:54:36 +00:00
|
|
|
#include "PropertyFXDamage.h"
|
|
|
|
#include "DestroyableComponent.h"
|
|
|
|
#include "SkillComponent.h"
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
void PropertyFXDamage::OnCollisionPhantom(Entity* self, Entity* target) {
|
|
|
|
if (target == nullptr)
|
|
|
|
return;
|
2021-12-05 17:54:36 +00:00
|
|
|
|
2023-06-07 07:23:50 +00:00
|
|
|
auto skills = self->GetComponent<SkillComponent>();
|
|
|
|
auto targetStats = target->GetComponent<DestroyableComponent>();
|
2021-12-05 17:54:36 +00:00
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
if (skills != nullptr && targetStats != nullptr) {
|
|
|
|
auto targetFactions = targetStats->GetFactionIDs();
|
|
|
|
if (std::find(targetFactions.begin(), targetFactions.end(), 1) != targetFactions.end()) {
|
2022-12-24 12:06:27 +00:00
|
|
|
skills->CalculateBehavior(692, 11386, target->GetObjectID());
|
2022-07-28 13:39:57 +00:00
|
|
|
}
|
|
|
|
}
|
2021-12-05 17:54:36 +00:00
|
|
|
}
|