fix warning & misc

This commit is contained in:
Yunfan Li
2023-05-24 23:23:14 +08:00
parent 637f1dd909
commit edf942c96a
10 changed files with 40 additions and 44 deletions

View File

@@ -43,7 +43,7 @@ class FreeBGJoinAction : public BGJoinAction
class BGLeaveAction : public Action
{
public:
BGLeaveAction(PlayerbotAI* botAI, std::string const name = "bg leave") : Action(botAI) { }
BGLeaveAction(PlayerbotAI* botAI, std::string const name = "bg leave") : Action(botAI, name) { }
bool Execute(Event event) override;
};

View File

@@ -282,6 +282,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());
}
FindUsableNamedItemVisitor visitor(bot);
IterateItems(&visitor, ITERATE_ITEMS_IN_BAGS);
found.insert(visitor.GetResult().begin(), visitor.GetResult().end());
uint32 quality = chat->parseItemQuality(text);
if (quality != MAX_ITEM_QUALITY)