mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
Organize dScripts (#814)
* Organize dScripts whitespace Remove parent scope Remove parent scope from initial setter Remove debug Remove helper programs * Fix NtImagimeterVisibility script Co-authored-by: aronwk-aaron <aronwk.aaron@gmail.com>
This commit is contained in:
18
dScripts/ai/PROPERTY/PropertyFXDamage.cpp
Normal file
18
dScripts/ai/PROPERTY/PropertyFXDamage.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#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(11386, 692, target->GetObjectID());
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user