mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-26 07:23:34 +00:00
Merge pull request #544 address Elephant precondition
Pet Components now read in their preconditions from their settings (if they have any). Mainly fixes just elephants not taking peanuts.
This commit is contained in:
commit
8601976498
@ -75,6 +75,12 @@ PetComponent::PetComponent(Entity* parent, uint32_t componentId) : Component(par
|
||||
m_MovementAI = nullptr;
|
||||
m_TresureTime = 0;
|
||||
m_Preconditions = nullptr;
|
||||
|
||||
std::string checkPreconditions = GeneralUtils::UTF16ToWTF8(parent->GetVar<std::u16string>(u"CheckPrecondition"));
|
||||
|
||||
if (!checkPreconditions.empty()) {
|
||||
SetPreconditions(checkPreconditions);
|
||||
}
|
||||
}
|
||||
|
||||
void PetComponent::Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags)
|
||||
|
Loading…
Reference in New Issue
Block a user