mirror of
https://github.com/Squareville/TestEventServer.git
synced 2026-01-04 01:29:32 -06: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