mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
add Player:SetGlyph (#152)
This commit is contained in:
@@ -689,6 +689,7 @@ ElunaRegister<Player> PlayerMethods[] =
|
|||||||
{ "ModifyMoney", &LuaPlayer::ModifyMoney },
|
{ "ModifyMoney", &LuaPlayer::ModifyMoney },
|
||||||
{ "LearnSpell", &LuaPlayer::LearnSpell },
|
{ "LearnSpell", &LuaPlayer::LearnSpell },
|
||||||
{ "LearnTalent", &LuaPlayer::LearnTalent },
|
{ "LearnTalent", &LuaPlayer::LearnTalent },
|
||||||
|
{ "SetGlyph", &LuaPlayer::SetGlyph },
|
||||||
#if !defined(CLASSIC)
|
#if !defined(CLASSIC)
|
||||||
{ "RemoveArenaSpellCooldowns", &LuaPlayer::RemoveArenaSpellCooldowns },
|
{ "RemoveArenaSpellCooldowns", &LuaPlayer::RemoveArenaSpellCooldowns },
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -3834,6 +3834,23 @@ namespace LuaPlayer
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a glyph specified by `glyphId` to the [Player]'s current talent specialization into the slot with the index `slotIndex`
|
||||||
|
*
|
||||||
|
* @param uint32 glyphId
|
||||||
|
* @param uint32 slotIndex
|
||||||
|
*/
|
||||||
|
int SetGlyph(lua_State* L, Player* player)
|
||||||
|
{
|
||||||
|
uint32 glyphId = Eluna::CHECKVAL<uint32>(L, 2);
|
||||||
|
uint32 slotIndex = Eluna::CHECKVAL<uint32>(L, 3);
|
||||||
|
|
||||||
|
player->SetGlyph(slotIndex, glyphId, true);
|
||||||
|
player->SendTalentsInfoData(false); // Also handles GlyphData
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#if !defined(CLASSIC)
|
#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.
|
* 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