From faee49beaaf942f13376235cd4818ba0c74a3dbc Mon Sep 17 00:00:00 2001 From: Alex Dcnh <140754794+Wishmaster117@users.noreply.github.com> Date: Sat, 24 May 2025 11:11:49 +0200 Subject: [PATCH] Update PlayerbotFactory.cpp (#1324) To correcte the build warning in VS Commented: // bot->GetPetStable()->CurrentPet.value(); Added: auto petGuid = bot->GetPetStable()->CurrentPet.value(); --- src/factory/PlayerbotFactory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/factory/PlayerbotFactory.cpp b/src/factory/PlayerbotFactory.cpp index 4f8ac52b..e22671ea 100644 --- a/src/factory/PlayerbotFactory.cpp +++ b/src/factory/PlayerbotFactory.cpp @@ -865,7 +865,8 @@ void PlayerbotFactory::InitPet() uint32 pet_number = sObjectMgr->GeneratePetNumber(); if (bot->GetPetStable() && bot->GetPetStable()->CurrentPet) { - bot->GetPetStable()->CurrentPet.value(); + auto petGuid = bot->GetPetStable()->CurrentPet.value(); // To correct the build warnin in VS + // bot->GetPetStable()->CurrentPet.value(); // bot->GetPetStable()->CurrentPet.reset(); bot->RemovePet(nullptr, PET_SAVE_AS_CURRENT); bot->RemovePet(nullptr, PET_SAVE_NOT_IN_SLOT);