Allow bots to trade conjured items (#781)

Since they didn't have any sell value you couldn't get a bot to give you a healthstone or conjured food/water.  This change allows them to be traded to you without altering any of the other logic for bot trades.
This commit is contained in:
Gabriel Comeau
2024-12-15 14:03:46 -05:00
committed by GitHub
parent ea944aeefa
commit 183bf7ae8e

View File

@@ -207,7 +207,7 @@ bool TradeStatusAction::CheckTrade()
for (uint32 slot = 0; slot < TRADE_SLOT_TRADED_COUNT; ++slot) for (uint32 slot = 0; slot < TRADE_SLOT_TRADED_COUNT; ++slot)
{ {
Item* item = bot->GetTradeData()->GetItem((TradeSlots)slot); Item* item = bot->GetTradeData()->GetItem((TradeSlots)slot);
if (item && !item->GetTemplate()->SellPrice) if (item && !item->GetTemplate()->SellPrice && !item->GetTemplate()->IsConjuredConsumable())
{ {
std::ostringstream out; std::ostringstream out;
out << chat->FormatItem(item->GetTemplate()) << " - This is not for sale"; out << chat->FormatItem(item->GetTemplate()) << " - This is not for sale";