Mods get their own file so i can take the big chunks of code out of lua parser

This commit is contained in:
KimLS
2017-04-30 00:30:23 -07:00
parent 8d391a7e3f
commit 0fd6815f81
8 changed files with 1028 additions and 353 deletions
+11
View File
@@ -22,6 +22,7 @@
#include "object.h"
#include "doors.h"
#include "quest_parser_collection.h"
#include "lua_parser.h"
#include "../common/string_util.h"
#include "../common/say_link.h"
@@ -3857,6 +3858,16 @@ void Bot::AddToHateList(Mob* other, uint32 hate, int32 damage, bool iYellForHelp
}
bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, bool IsFromSpell, ExtraAttackOptions *opts) {
#ifdef LUA_EQEMU
bool lua_ret = false;
bool ignoreDefault = false;
lua_ret = LuaParser::Instance()->BotAttack(this, other, Hand, bRiposte, IsStrikethrough, IsFromSpell, opts, ignoreDefault);
if (ignoreDefault) {
return lua_ret;
}
#endif
if (!other) {
SetTarget(nullptr);
Log(Logs::General, Logs::Error, "A null Mob object was passed to Bot::Attack for evaluation!");