diff --git a/src/LuaEngine/LuaFunctions.cpp b/src/LuaEngine/LuaFunctions.cpp index 3c1fa03..8eb804a 100644 --- a/src/LuaEngine/LuaFunctions.cpp +++ b/src/LuaEngine/LuaFunctions.cpp @@ -706,6 +706,7 @@ ElunaRegister PlayerMethods[] = { "LearnSpell", &LuaPlayer::LearnSpell }, { "LearnTalent", &LuaPlayer::LearnTalent }, { "SetGlyph", &LuaPlayer::SetGlyph }, + { "GetGlyph", &LuaPlayer::GetGlyph }, #if !defined(CLASSIC) { "RemoveArenaSpellCooldowns", &LuaPlayer::RemoveArenaSpellCooldowns }, #endif diff --git a/src/LuaEngine/PlayerMethods.h b/src/LuaEngine/PlayerMethods.h index b6684f4..503ca48 100644 --- a/src/LuaEngine/PlayerMethods.h +++ b/src/LuaEngine/PlayerMethods.h @@ -3953,6 +3953,18 @@ namespace LuaPlayer return 0; } + /** + * Get glyphId of the glyph slot specified by `slotIndex` off the [Player]'s current talent specialization.` + * @param uint32 slotIndex + * @return glyphId of the glyph in the selected glyph slot or 0 in case the glyph slot is empty + */ + int GetGlyph(lua_State* L, Player* player) + { + auto slotIndex = Eluna::CHECKVAL(L, 2); + Eluna::Push(L,player->GetGlyph(slotIndex)); + return 1; + } + #if !defined(CLASSIC) /** * Remove cooldowns on spells that have less than 10 minutes of cooldown from the [Player], similarly to when you enter an arena.