fix(LuaEngine/UnitMethods): rename HandleStatModifier to match a PR#23346 (#335)

This commit is contained in:
Tereneckla
2025-11-28 19:03:42 +00:00
committed by GitHub
parent c1066d7a0d
commit 188d5218da
2 changed files with 3 additions and 3 deletions

View File

@@ -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 },

View File

@@ -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<int32>(L, 2);
int8 type = ALE::CHECKVAL<int8>(L, 3);
@@ -81,7 +81,7 @@ namespace LuaUnit
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;
}