DarkflameServer/dScripts/ai/PROPERTY/PropertyFXDamage.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
594 B
C++
Raw Normal View History

#include "PropertyFXDamage.h"
#include "DestroyableComponent.h"
#include "SkillComponent.h"
void PropertyFXDamage::OnCollisionPhantom(Entity* self, Entity* target) {
if (target == nullptr)
return;
2023-06-07 07:23:50 +00:00
auto skills = self->GetComponent<SkillComponent>();
auto targetStats = target->GetComponent<DestroyableComponent>();
if (skills != nullptr && targetStats != nullptr) {
auto targetFactions = targetStats->GetFactionIDs();
if (std::find(targetFactions.begin(), targetFactions.end(), 1) != targetFactions.end()) {
skills->CalculateBehavior(692, 11386, target->GetObjectID());
}
}
}