Revert 340fe17f4f partially

The UpdateUInt32Value method is not identical to Set and Set screws up gossip on TC based
This commit is contained in:
Rochet2
2015-02-15 13:52:15 +02:00
parent 32e7a5e065
commit 166dacee83
2 changed files with 15 additions and 0 deletions

View File

@@ -162,6 +162,7 @@ ElunaRegister<Object> 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

View File

@@ -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<uint16>(L, 2);
uint32 value = Eluna::CHECKVAL<uint32>(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.
*