mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Add GetDBTableGuid method
This commit is contained in:
@@ -837,6 +837,22 @@ namespace LuaCreature
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Returns the guid of the [Creature] that is used as the ID in the database
|
||||
*
|
||||
* @return uint32 dbguid
|
||||
*/
|
||||
int GetDBTableGUIDLow(Eluna* /*E*/, lua_State* L, Creature* creature)
|
||||
{
|
||||
#ifdef TRINITY
|
||||
Eluna::Push(L, creature->GetDBTableGUIDLow());
|
||||
#else
|
||||
// on mangos based this is same as lowguid
|
||||
Eluna::Push(L, creature->GetGUIDLow());
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* SETTERS */
|
||||
|
||||
/**
|
||||
|
||||
@@ -146,6 +146,22 @@ namespace LuaGameObject
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the guid of the [GameObject] that is used as the ID in the database
|
||||
*
|
||||
* @return uint32 dbguid
|
||||
*/
|
||||
int GetDBTableGUIDLow(Eluna* /*E*/, lua_State* L, GameObject* go)
|
||||
{
|
||||
#ifdef TRINITY
|
||||
Eluna::Push(L, go->GetDBTableGUIDLow());
|
||||
#else
|
||||
// on mangos based this is same as lowguid
|
||||
Eluna::Push(L, go->GetGUIDLow());
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the state of a [GameObject]
|
||||
*
|
||||
|
||||
@@ -149,7 +149,7 @@ ElunaRegister<Object> ObjectMethods[] =
|
||||
// Getters
|
||||
{ "GetEntry", &LuaObject::GetEntry }, // :GetEntry() - Returns the object's entryId
|
||||
{ "GetGUID", &LuaObject::GetGUID }, // :GetGUID() - Returns uint64 guid as hex string
|
||||
{ "GetGUIDLow", &LuaObject::GetGUIDLow }, // :GetGUIDLow() - Returns uint32 guid (low guid) that is used in database.
|
||||
{ "GetGUIDLow", &LuaObject::GetGUIDLow }, // :GetGUIDLow() - Returns uint32 guid (low guid) that is used to differentiate objects of same type.
|
||||
{ "GetInt32Value", &LuaObject::GetInt32Value }, // :GetInt32Value(index) - returns an int value from object fields
|
||||
{ "GetUInt32Value", &LuaObject::GetUInt32Value }, // :GetUInt32Value(index) - returns an uint value from object fields
|
||||
{ "GetFloatValue", &LuaObject::GetFloatValue }, // :GetFloatValue(index) - returns a float value from object fields
|
||||
@@ -775,6 +775,7 @@ ElunaRegister<Creature> CreatureMethods[] =
|
||||
#ifndef CATA
|
||||
{ "GetShieldBlockValue", &LuaCreature::GetShieldBlockValue },
|
||||
#endif
|
||||
{ "GetDBTableGUIDLow", &LuaCreature::GetDBTableGUIDLow },
|
||||
|
||||
// Setters
|
||||
{ "SetHover", &LuaCreature::SetHover },
|
||||
@@ -859,6 +860,7 @@ ElunaRegister<GameObject> GameObjectMethods[] =
|
||||
{ "GetLootState", &LuaGameObject::GetLootState },
|
||||
{ "GetLootRecipient", &LuaGameObject::GetLootRecipient },
|
||||
{ "GetLootRecipientGroup", &LuaGameObject::GetLootRecipientGroup },
|
||||
{ "GetDBTableGUIDLow", &LuaGameObject::GetDBTableGUIDLow },
|
||||
|
||||
// Setters
|
||||
{ "SetGoState", &LuaGameObject::SetGoState },
|
||||
|
||||
Reference in New Issue
Block a user