diff --git a/src/LuaEngine/LuaFunctions.cpp b/src/LuaEngine/LuaFunctions.cpp index 1a8aff2..0ebe274 100644 --- a/src/LuaEngine/LuaFunctions.cpp +++ b/src/LuaEngine/LuaFunctions.cpp @@ -416,7 +416,7 @@ ALERegister UnitMethods[] = { "IsOnVehicle", &LuaUnit::IsOnVehicle }, // Other - { "HandleStatModifier", &LuaUnit::HandleStatModifier }, + { "HandleStatFlatModifier", &LuaUnit::HandleStatFlatModifier }, { "AddAura", &LuaUnit::AddAura }, { "RemoveAura", &LuaUnit::RemoveAura }, { "RemoveAllAuras", &LuaUnit::RemoveAllAuras }, diff --git a/src/LuaEngine/methods/UnitMethods.h b/src/LuaEngine/methods/UnitMethods.h index bc0cbb7..9e135f4 100644 --- a/src/LuaEngine/methods/UnitMethods.h +++ b/src/LuaEngine/methods/UnitMethods.h @@ -73,7 +73,7 @@ namespace LuaUnit * @param bool apply = false : Whether the modifier should be applied or removed * @return bool : Whether the stat modification was successful */ - int HandleStatModifier(lua_State* L, Unit* unit) + int HandleStatFlatModifier(lua_State* L, Unit* unit) { int32 stat = ALE::CHECKVAL(L, 2); int8 type = ALE::CHECKVAL(L, 3); @@ -81,7 +81,7 @@ namespace LuaUnit float value = ALE::CHECKVAL(L, 4); bool apply = ALE::CHECKVAL(L, 5, false); - ALE::Push(L, unit->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + stat), (UnitModifierType)type, value, apply)); + ALE::Push(L, unit->HandleStatFlatModifier(UnitMods(UNIT_MOD_STAT_START + stat), (UnitModifierFlatType)type, value, apply)); return 1; }