DarkflameServer/dScripts/NjGarmadonCelebration.cpp

18 lines
512 B
C++
Raw Normal View History

#include "NjGarmadonCelebration.h"
#include "Character.h"
#include "GameMessages.h"
2022-07-28 13:39:57 +00:00
void NjGarmadonCelebration::OnCollisionPhantom(Entity* self, Entity* target) {
auto* character = target->GetCharacter();
2022-07-28 13:39:57 +00:00
if (character == nullptr) {
return;
}
2022-07-28 13:39:57 +00:00
if (!character->GetPlayerFlag(ePlayerFlags::NJ_GARMADON_CINEMATIC_SEEN)) {
character->SetPlayerFlag(ePlayerFlags::NJ_GARMADON_CINEMATIC_SEEN, true);
2022-07-28 13:39:57 +00:00
GameMessages::SendStartCelebrationEffect(target, target->GetSystemAddress(), GarmadonCelebrationID);
}
}