From 7c0b1a4d7afb563b4a641049b42d957cc3228b42 Mon Sep 17 00:00:00 2001 From: mostlikely4r Date: Wed, 4 Sep 2024 22:24:13 +0200 Subject: [PATCH] -Auto craft fix: Bots no longer talk about crafting an item on an object when the object wasn't needed to craft it (ie. an anvil) --- playerbot/strategy/actions/CastCustomSpellAction.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playerbot/strategy/actions/CastCustomSpellAction.cpp b/playerbot/strategy/actions/CastCustomSpellAction.cpp index afaba74f..024e8210 100644 --- a/playerbot/strategy/actions/CastCustomSpellAction.cpp +++ b/playerbot/strategy/actions/CastCustomSpellAction.cpp @@ -645,6 +645,10 @@ bool CraftRandomItemAction::Execute(Event& event) if (GuidPosition(wot).GetGameObjectInfo()->spellFocus.focusId != pSpellInfo->RequiresSpellFocus) continue; } + else + { + wot = nullptr; + } uint32 newItemId = pSpellInfo->EffectItemType[0];