DarkflameServer/dScripts/ai/PROPERTY/PropertyFXDamage.cpp
David Markowitz e2dfa1809d Replace all auto with auto*
For components
2023-06-09 01:27:05 -07:00

19 lines
596 B
C++

#include "PropertyFXDamage.h"
#include "DestroyableComponent.h"
#include "SkillComponent.h"
void PropertyFXDamage::OnCollisionPhantom(Entity* self, Entity* target) {
if (target == nullptr)
return;
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());
}
}
}