Fix documentation indentation and implement emote state method. Closes https://github.com/ElunaLuaEngine/Eluna/issues/181

This commit is contained in:
Rochet2
2016-01-05 16:58:09 +02:00
parent 086ad796fc
commit 969c0bbbfa
4 changed files with 53 additions and 39 deletions

View File

@@ -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 },

View File

@@ -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
*