Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/LuaEngine/LuaFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ ALERegister<Unit> UnitMethods[] =
{ "IsOnVehicle", &LuaUnit::IsOnVehicle },

// Other
{ "HandleStatModifier", &LuaUnit::HandleStatModifier },
{ "HandleStatFlatModifier", &LuaUnit::HandleStatFlatModifier },
{ "AddAura", &LuaUnit::AddAura },
{ "RemoveAura", &LuaUnit::RemoveAura },
{ "RemoveAllAuras", &LuaUnit::RemoveAllAuras },
Expand Down
4 changes: 2 additions & 2 deletions src/LuaEngine/methods/UnitMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ 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<int32>(L, 2);
int8 type = ALE::CHECKVAL<int8>(L, 3);

float value = ALE::CHECKVAL<float>(L, 4);
bool apply = ALE::CHECKVAL<bool>(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;
}

Expand Down
Loading