mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Fix crash when reporting item destroyed to master
This commit is contained in:
@@ -27,11 +27,11 @@ void DestroyItemAction::DestroyItem(FindItemVisitor* visitor)
|
||||
std::vector<Item*> items = visitor->GetResult();
|
||||
for (Item* item : items)
|
||||
{
|
||||
bot->DestroyItem(item->GetBagSlot(),item->GetSlot(), true);
|
||||
|
||||
std::ostringstream out;
|
||||
out << chat->FormatItem(item->GetTemplate()) << " destroyed";
|
||||
botAI->TellMaster(out);
|
||||
|
||||
bot->DestroyItem(item->GetBagSlot(),item->GetSlot(), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user