mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
feature: Add GetGlyph (#178)
Co-authored-by: 55Honey <71938210+55Honey@users.noreply.github.com>
This commit is contained in:
@@ -706,6 +706,7 @@ ElunaRegister<Player> PlayerMethods[] =
|
||||
{ "LearnSpell", &LuaPlayer::LearnSpell },
|
||||
{ "LearnTalent", &LuaPlayer::LearnTalent },
|
||||
{ "SetGlyph", &LuaPlayer::SetGlyph },
|
||||
{ "GetGlyph", &LuaPlayer::GetGlyph },
|
||||
#if !defined(CLASSIC)
|
||||
{ "RemoveArenaSpellCooldowns", &LuaPlayer::RemoveArenaSpellCooldowns },
|
||||
#endif
|
||||
|
||||
@@ -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<uint32>(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.
|
||||
|
||||
Reference in New Issue
Block a user