mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-21 14:58:09 +00:00
Public release of the DLU server code!
Have fun!
This commit is contained in:
26
dScripts/MonCoreSmashableDoors.cpp
Normal file
26
dScripts/MonCoreSmashableDoors.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "MonCoreSmashableDoors.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "dZoneManager.h"
|
||||
|
||||
void MonCoreSmashableDoors::OnDie(Entity* self, Entity* killer)
|
||||
{
|
||||
auto myNum = self->GetVarAsString(u"spawner_name");
|
||||
|
||||
myNum = myNum.substr(myNum.length() - 1, 1);
|
||||
|
||||
auto triggerGroup = "CoreNookTrig0" + myNum;
|
||||
|
||||
// Get the trigger
|
||||
auto triggers = EntityManager::Instance()->GetEntitiesInGroup(triggerGroup);
|
||||
|
||||
if (triggers.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto trigger : triggers)
|
||||
{
|
||||
trigger->OnFireEventServerSide(self, "DoorSmashed");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user