mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-05 14:58:27 +00:00
chore: Convert heap allocation to optional (#1553)
* chore: Convert heap allocation to optional * Update dGame/dComponents/PetComponent.h Default-initialize
This commit is contained in:
@@ -165,7 +165,7 @@ public:
|
||||
* Sets preconditions for the pet that need to be met before it can be tamed
|
||||
* @param conditions the preconditions to set
|
||||
*/
|
||||
void SetPreconditions(std::string& conditions);
|
||||
void SetPreconditions(const std::string& conditions);
|
||||
|
||||
/**
|
||||
* Returns the entity that this component belongs to
|
||||
@@ -258,7 +258,7 @@ private:
|
||||
/**
|
||||
* Flags that indicate that a player has tamed a pet, indexed by the LOT of the pet
|
||||
*/
|
||||
static std::map<LOT, int32_t> petFlags;
|
||||
static const std::map<LOT, int32_t> petFlags;
|
||||
|
||||
/**
|
||||
* The ID of the component in the pet component table
|
||||
@@ -349,7 +349,7 @@ private:
|
||||
/**
|
||||
* Preconditions that need to be met before an entity can tame this pet
|
||||
*/
|
||||
PreconditionExpression* m_Preconditions;
|
||||
std::optional<PreconditionExpression> m_Preconditions{};
|
||||
|
||||
/**
|
||||
* Pet information loaded from the CDClientDatabase
|
||||
|
Reference in New Issue
Block a user