mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Fix documentation indentation and implement emote state method. Closes https://github.com/ElunaLuaEngine/Eluna/issues/181
This commit is contained in:
@@ -389,6 +389,7 @@ ElunaRegister<Unit> UnitMethods[] =
|
||||
{ "InterruptSpell", &LuaUnit::InterruptSpell },
|
||||
{ "SendChatMessageToPlayer", &LuaUnit::SendChatMessageToPlayer },
|
||||
{ "Emote", &LuaUnit::Emote },
|
||||
{ "EmoteState", &LuaUnit::EmoteState },
|
||||
{ "CountPctFromCurHealth", &LuaUnit::CountPctFromCurHealth },
|
||||
{ "CountPctFromMaxHealth", &LuaUnit::CountPctFromMaxHealth },
|
||||
{ "Dismount", &LuaUnit::Dismount },
|
||||
|
||||
@@ -1947,6 +1947,19 @@ namespace LuaUnit
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the [Unit] perform the given emote continuously.
|
||||
*
|
||||
* @param uint32 emoteId
|
||||
*/
|
||||
int EmoteState(Eluna* /*E*/, lua_State* L, Unit* unit)
|
||||
{
|
||||
uint32 emoteId = Eluna::CHECKVAL<uint32>(L, 2);
|
||||
|
||||
unit->SetUInt32Value(UNIT_NPC_EMOTESTATE, emoteId);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns calculated percentage from Health
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user