[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
+1
View File
@@ -294,6 +294,7 @@ LuaParser::LuaParser() {
BotArgumentDispatch[EVENT_SLAY] = handle_bot_slay;
BotArgumentDispatch[EVENT_TARGET_CHANGE] = handle_bot_target_change;
BotArgumentDispatch[EVENT_TIMER] = handle_bot_timer;
BotArgumentDispatch[EVENT_TRADE] = handle_bot_trade;
BotArgumentDispatch[EVENT_USE_SKILL] = handle_bot_use_skill;
#endif