diff --git a/LuaFunctions.cpp b/LuaFunctions.cpp index 791e013..eb5306d 100644 --- a/LuaFunctions.cpp +++ b/LuaFunctions.cpp @@ -162,6 +162,7 @@ ElunaRegister ObjectMethods[] = // Setters { "SetInt32Value", &LuaObject::SetInt32Value }, // :SetInt32Value(index, value) - Sets an int value for the object { "SetUInt32Value", &LuaObject::SetUInt32Value }, // :SetUInt32Value(index, value) - Sets an uint value for the object + { "UpdateUInt32Value", &LuaObject::UpdateUInt32Value }, // :UpdateUInt32Value(index, value) - Sets an uint value for the object { "SetFloatValue", &LuaObject::SetFloatValue }, // :SetFloatValue(index, value) - Sets a float value for the object { "SetByteValue", &LuaObject::SetByteValue }, // :SetByteValue(index, offset, value) - Sets a byte value for the object { "SetUInt16Value", &LuaObject::SetUInt16Value }, // :SetUInt16Value(index, offset, value) - Sets an uint16 value for the object diff --git a/ObjectMethods.h b/ObjectMethods.h index 53f71ba..452400b 100644 --- a/ObjectMethods.h +++ b/ObjectMethods.h @@ -259,6 +259,20 @@ namespace LuaObject return 0; } + /** + * Sets the data at the specified index to the given value, converted to an unsigned 32-bit integer. + * + * @param uint16 index + * @param uint32 value + */ + int UpdateUInt32Value(Eluna* /*E*/, lua_State* L, Object* obj) + { + uint16 index = Eluna::CHECKVAL(L, 2); + uint32 value = Eluna::CHECKVAL(L, 3); + obj->UpdateUInt32Value(index, value); + return 0; + } + /** * Sets the data at the specified index to the given value, converted to a single-precision floating point value. *