mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-19 13:58:14 +00:00
Public release of the DLU server code!
Have fun!
This commit is contained in:
12
dScripts/NjEarthPetServer.cpp
Normal file
12
dScripts/NjEarthPetServer.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "NjEarthPetServer.h"
|
||||
#include "PetComponent.h"
|
||||
|
||||
void NjEarthPetServer::OnStartup(Entity *self) {
|
||||
auto* petComponent = self->GetComponent<PetComponent>();
|
||||
if (petComponent == nullptr || petComponent->GetOwnerId() != LWOOBJID_EMPTY)
|
||||
return;
|
||||
|
||||
// Removes the chocolate bars
|
||||
petComponent->SetPreconditions(const_cast<std::string &>(m_Precondition));
|
||||
PetFromObjectServer::OnStartup(self);
|
||||
}
|
Reference in New Issue
Block a user