Update PlayerbotFactory.cpp (#1324)

To correcte the build warning in VS

Commented:
// bot->GetPetStable()->CurrentPet.value();

Added:
auto petGuid = bot->GetPetStable()->CurrentPet.value();
This commit is contained in:
Alex Dcnh
2025-05-24 11:11:49 +02:00
committed by GitHub
parent d87d5a46c7
commit faee49beaa

View File

@@ -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);