mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-15 16:16:11 +00:00
shaman, rogue strategy port, use item action.
This commit is contained in:
@@ -288,12 +288,10 @@ std::vector<Item*> InventoryAction::parseItems(std::string const text, IterateIt
|
||||
IterateItems(&visitor, ITERATE_ITEMS_IN_BAGS);
|
||||
found.insert(visitor.GetResult().begin(), visitor.GetResult().end());
|
||||
}
|
||||
if (text == "")
|
||||
{
|
||||
FindUsableNamedItemVisitor visitor(bot);
|
||||
IterateItems(&visitor, ITERATE_ITEMS_IN_BAGS);
|
||||
found.insert(visitor.GetResult().begin(), visitor.GetResult().end());
|
||||
}
|
||||
|
||||
FindUsableNamedItemVisitor visitor(bot, text);
|
||||
IterateItems(&visitor, ITERATE_ITEMS_IN_BAGS);
|
||||
found.insert(visitor.GetResult().begin(), visitor.GetResult().end());
|
||||
|
||||
uint32 quality = chat->parseItemQuality(text);
|
||||
if (quality != MAX_ITEM_QUALITY)
|
||||
|
||||
@@ -19,7 +19,9 @@ bool UseItemAction::Execute(Event event)
|
||||
|
||||
if (gos.empty())
|
||||
{
|
||||
return UseItemAuto(*items.begin());
|
||||
if (!items.empty()) {
|
||||
return UseItemAuto(*items.begin());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user