Skip to content

Commit

Permalink
TrinityCore/WotLK Added Object Method GetTypeId
Browse files Browse the repository at this point in the history
  • Loading branch information
Easelm committed Dec 31, 2013
1 parent 7d8f5f9 commit e120843
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions TrinityCore/WotLK/src/LuaEngine/LuaFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ ElunaRegister<Object> ObjectMethods[] =
{"GetByteValue", &LuaObject::GetByteValue}, // :GetByteValue(index, offset) - returns a byte value from object fields
{"GetUInt16Value", &LuaObject::GetUInt16Value}, // :GetUInt16Value(index, offset) - returns a uint16 value from object fields
{"GetScale", &LuaObject::GetScale}, // :GetScale()
{"GetTypeId", &LuaObject::GetTypeId}, // :GetTypeId() - Returns the object's typeId

// Setters
{"SetInt32Value", &LuaObject::SetInt32Value}, // :SetInt32Value(index, value) - Sets an int value for the object
Expand Down
5 changes: 5 additions & 0 deletions TrinityCore/WotLK/src/LuaEngine/ObjectMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ namespace LuaObject
sEluna->Push(L, obj->GetGUIDLow());
return 1;
}
static int GetTypeId(lua_State* L, Object* obj)
{
sEluna->Push(L, obj->GetTypeId());
return 1;
}
static int IsInWorld(lua_State* L, Object* obj)
{
sEluna->Push(L, obj->IsInWorld());
Expand Down

0 comments on commit e120843

Please sign in to comment.