lua fixes

This commit is contained in:
luis
2026-04-02 12:01:16 -03:00
parent 6e99574801
commit 0ca9b21f3c
4 changed files with 24 additions and 18 deletions
@@ -7,6 +7,10 @@
#include "Config.h"
#include "ElunaConfig.h"
#include <sstream>
#include <algorithm>
#include <cctype>
ElunaConfig::ElunaConfig()
{
}
@@ -43,7 +43,6 @@ void ElunaEventProcessor::Update(uint32 diff)
if (luaEvent->state == LUAEVENT_STATE_RUN)
{
uint32 delay = luaEvent->delay;
bool remove = luaEvent->repeats == 1;
if (!remove)
@@ -14,8 +14,13 @@
#include <thread>
#include <charconv>
#if defined USING_BOOST
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
#else
#include <filesystem>
namespace fs = std::filesystem;
#endif
#if defined ELUNA_WINDOWS
#include <Windows.h>
@@ -7,8 +7,6 @@
#ifndef UNITMETHODS_H
#define UNITMETHODS_H
#include "ChatPackets.h"
/***
* Inherits all methods from: [Object], [WorldObject]
*/
@@ -2002,7 +2000,7 @@ namespace LuaUnit
Position pos(x, y, z);
unit->GetMotionMaster()->MoveJump(1, pos, zSpeed, maxHeight, id);
unit->GetMotionMaster()->MoveJump(id, pos, zSpeed, {}, maxHeight);
return 0;
}
@@ -2216,20 +2214,20 @@ namespace LuaUnit
bool delayed = E->CHECKVAL<bool>(3, true);
switch (spellType)
{
case 0:
spellType = CURRENT_MELEE_SPELL;
break;
case 1:
spellType = CURRENT_GENERIC_SPELL;
break;
case 2:
spellType = CURRENT_CHANNELED_SPELL;
break;
case 3:
spellType = CURRENT_AUTOREPEAT_SPELL;
break;
default:
return luaL_argerror(E->L, 2, "valid CurrentSpellTypes expected");
case 0:
spellType = CURRENT_MELEE_SPELL;
break;
case 1:
spellType = CURRENT_GENERIC_SPELL;
break;
case 2:
spellType = CURRENT_CHANNELED_SPELL;
break;
case 3:
spellType = CURRENT_AUTOREPEAT_SPELL;
break;
default:
return luaL_argerror(E->L, 2, "valid CurrentSpellTypes expected");
}
unit->InterruptSpell((CurrentSpellTypes)spellType, delayed);