[Bot] Add EVENT_TRADE Support to Bots. (#2560)

* [Bot] Add EVENT_TRADE Support to Bots.

* Fixed issue with duplicate items after Event Trade

* Update logic

* Add CalcBotStats call after Bot Trade Event

* Fix Lua EVENT_TRADE.

* Formatting.

* More formatting.

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
This commit is contained in:
Aeadoin
2022-11-25 15:09:08 -05:00
committed by GitHub
parent 45c4fe55f0
commit 99052aec8b
6 changed files with 242 additions and 99 deletions
+4
View File
@@ -1234,6 +1234,10 @@ bool QuestParserCollection::BotHasQuestSubGlobal(QuestEventID evt) {
return false;
}
bool QuestParserCollection::BotHasQuestSub(QuestEventID evt) {
return BotHasQuestSubLocal(evt) || BotHasQuestSubGlobal(evt);
}
QuestInterface *QuestParserCollection::GetQIByBotQuest(std::string &filename) {
if (!zone || !zone->IsLoaded()) {
return nullptr;