Added config setting

Added a config setting to allow players to disable pets consuming imagination.  This value defaults to zero as a feature of DLU.
This commit is contained in:
EmosewaMC
2022-06-18 00:03:27 -07:00
parent 35ea3d35ae
commit e415d96a9d
3 changed files with 8 additions and 1 deletions

View File

@@ -16,6 +16,7 @@
#include "../dWorldServer/ObjectIDManager.h"
#include "Game.h"
#include "dConfig.h"
#include "dChatFilter.h"
#include "Database.h"
@@ -985,6 +986,8 @@ void PetComponent::Activate(Item* item, bool registerPet)
}
void PetComponent::AddDrainImaginationTimer(Item* item) {
if (Game::config->GetValue("pets_imagination") == "0") return;
auto playerInventory = item->GetInventory();
if (!playerInventory) return;