mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-19 03:35:43 +00:00
fix warning & misc
This commit is contained in:
@@ -85,3 +85,8 @@ bool FindItemUsageVisitor::Accept(ItemTemplate const* proto)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FindUsableNamedItemVisitor::Accept(ItemTemplate const* proto)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -411,4 +411,12 @@ class FindItemUsageVisitor : public FindUsableItemVisitor
|
||||
ItemUsage usage;
|
||||
};
|
||||
|
||||
class FindUsableNamedItemVisitor : public FindUsableItemVisitor
|
||||
{
|
||||
public:
|
||||
FindUsableNamedItemVisitor(Player* bot): FindUsableItemVisitor(bot) {}
|
||||
|
||||
bool Accept(ItemTemplate const* proto) override;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -20,6 +20,7 @@ class UntypedValue : public AiNamedObject
|
||||
{
|
||||
public:
|
||||
UntypedValue(PlayerbotAI* botAI, std::string const name) : AiNamedObject(botAI, name) { }
|
||||
virtual ~UntypedValue() { }
|
||||
virtual void Update() { }
|
||||
virtual void Reset() { }
|
||||
virtual std::string const Format() { return "?"; }
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -16,7 +16,7 @@ class GrindingStrategy : public NonCombatStrategy
|
||||
|
||||
std::string const getName() override { return "grind"; }
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_DPS; }
|
||||
NextAction** getDefaultActions();
|
||||
NextAction** getDefaultActions() override;
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class GuardStrategy : public NonCombatStrategy
|
||||
GuardStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) { }
|
||||
|
||||
std::string const getName() override { return "guard"; }
|
||||
NextAction** getDefaultActions();
|
||||
NextAction** getDefaultActions() override;
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user