mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-25 15:03:34 +00:00
6aa90ad5b2
* Breakout rest of the enums from dcommonvars so we don't have to deal with merge conflicts ePlayerFlags is not a scoped enum, yet, due to it's complexity * address feedback * make player flag types consistent * fix typo
17 lines
421 B
C++
17 lines
421 B
C++
#include "ImaginationShrineServer.h"
|
|
#include "RebuildComponent.h"
|
|
|
|
void ImaginationShrineServer::OnUse(Entity* self, Entity* user) {
|
|
// If the rebuild component is complete, use the shrine
|
|
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
|
|
|
if (rebuildComponent == nullptr) {
|
|
return;
|
|
}
|
|
|
|
if (rebuildComponent->GetState() == eRebuildState::COMPLETED) {
|
|
// Use the shrine
|
|
BaseUse(self, user);
|
|
}
|
|
}
|