Skip to content

Commit

Permalink
Fix documentation indentation and implement emote state method. Closes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rochet2 committed Jan 5, 2016
1 parent 086ad79 commit 969c0bb
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 39 deletions.
1 change: 1 addition & 0 deletions LuaFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
16 changes: 8 additions & 8 deletions PlayerMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -3927,10 +3927,10 @@ namespace LuaPlayer
}

/**
* Starts a cinematic for the [Player]
*
* @param uint32 CinematicSequenceId : entry of a cinematic
*/
* Starts a cinematic for the [Player]
*
* @param uint32 CinematicSequenceId : entry of a cinematic
*/
int SendCinematicStart(Eluna* /*E*/, lua_State* L, Player* player)
{
uint32 CinematicSequenceId = Eluna::CHECKVAL<uint32>(L, 2);
Expand All @@ -3940,10 +3940,10 @@ namespace LuaPlayer
}

/**
* Starts a movie for the [Player]
*
* @param uint32 MovieId : entry of a movie
*/
* Starts a movie for the [Player]
*
* @param uint32 MovieId : entry of a movie
*/
int SendMovieStart(Eluna* /*E*/, lua_State* L, Player* player)
{
uint32 MovieId = Eluna::CHECKVAL<uint32>(L, 2);
Expand Down
13 changes: 13 additions & 0 deletions UnitMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
62 changes: 31 additions & 31 deletions WorldObjectMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -836,16 +836,16 @@ namespace LuaWorldObject
}

/**
* The [WorldObject] plays music to a [Player]
*
* If no [Player] provided it will play the music to everyone near.
* This method does not interrupt previously played music.
*
* See also [WorldObject:PlayDistanceSound], [WorldObject:PlayDirectSound]
*
* @param uint32 music : entry of a music
* @param [Player] player = nil : [Player] to play the music to
*/
* The [WorldObject] plays music to a [Player]
*
* If no [Player] provided it will play the music to everyone near.
* This method does not interrupt previously played music.
*
* See also [WorldObject:PlayDistanceSound], [WorldObject:PlayDirectSound]
*
* @param uint32 music : entry of a music
* @param [Player] player = nil : [Player] to play the music to
*/
int PlayMusic(Eluna* /*E*/, lua_State* L, WorldObject* obj)
{
uint32 musicid = Eluna::CHECKVAL<uint32>(L, 2);
Expand All @@ -861,16 +861,16 @@ namespace LuaWorldObject
}

/**
* The [WorldObject] plays a sound to a [Player]
*
* If no [Player] provided it will play the sound to everyone near.
* This method will play sound and does not interrupt prvious sound.
*
* See also [WorldObject:PlayDistanceSound], [WorldObject:PlayMusic]
*
* @param uint32 sound : entry of a sound
* @param [Player] player = nil : [Player] to play the sound to
*/
* The [WorldObject] plays a sound to a [Player]
*
* If no [Player] provided it will play the sound to everyone near.
* This method will play sound and does not interrupt prvious sound.
*
* See also [WorldObject:PlayDistanceSound], [WorldObject:PlayMusic]
*
* @param uint32 sound : entry of a sound
* @param [Player] player = nil : [Player] to play the sound to
*/
int PlayDirectSound(Eluna* /*E*/, lua_State* L, WorldObject* obj)
{
uint32 soundId = Eluna::CHECKVAL<uint32>(L, 2);
Expand All @@ -886,17 +886,17 @@ namespace LuaWorldObject
}

/**
* The [WorldObject] plays a sound to a [Player]
*
* If no [Player] it will play the sound to everyone near.
* Sound will fade the further you are from the [WorldObject].
* This method interrupts previously playing sound.
*
* See also [WorldObject:PlayDirectSound], [WorldObject:PlayMusic]
*
* @param uint32 sound : entry of a sound
* @param [Player] player = nil : [Player] to play the sound to
*/
* The [WorldObject] plays a sound to a [Player]
*
* If no [Player] it will play the sound to everyone near.
* Sound will fade the further you are from the [WorldObject].
* This method interrupts previously playing sound.
*
* See also [WorldObject:PlayDirectSound], [WorldObject:PlayMusic]
*
* @param uint32 sound : entry of a sound
* @param [Player] player = nil : [Player] to play the sound to
*/
int PlayDistanceSound(Eluna* /*E*/, lua_State* L, WorldObject* obj)
{
uint32 soundId = Eluna::CHECKVAL<uint32>(L, 2);
Expand Down

0 comments on commit 969c0bb

Please sign in to comment.