DarkflameServer/dScripts/ImaginationShrineServer.cpp

17 lines
414 B
C++
Raw Permalink Normal View History

#include "ImaginationShrineServer.h"
#include "RebuildComponent.h"
2022-07-28 13:39:57 +00:00
void ImaginationShrineServer::OnUse(Entity* self, Entity* user) {
// If the rebuild component is complete, use the shrine
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
2022-07-28 13:39:57 +00:00
if (rebuildComponent == nullptr) {
return;
}
2022-07-28 13:39:57 +00:00
if (rebuildComponent->GetState() == REBUILD_COMPLETED) {
// Use the shrine
BaseUse(self, user);
}
}