Skip to content

Commit

Permalink
Update documentation for world/map exclusive methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Foereaper committed Jan 20, 2024
1 parent b609f93 commit 8047cf5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions TrinityCore/GlobalMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ namespace LuaGlobalFunctions
/**
* Finds and Returns [Player] by guid if found
*
* In multistate, this method is only available in the WORLD state
*
* @param ObjectGuid guid : guid of the [Player], you can get it with [Object:GetGUID]
* @return [Player] player
*/
Expand All @@ -138,6 +140,8 @@ namespace LuaGlobalFunctions
/**
* Finds and Returns [Player] by name if found
*
* In multistate, this method is only available in the WORLD state
*
* @param string name : name of the [Player]
* @return [Player] player
*/
Expand Down Expand Up @@ -171,6 +175,8 @@ namespace LuaGlobalFunctions
* TEAM_NEUTRAL = 2
* };
*
* In multistate, this method is only available in the WORLD state
*
* @param [TeamId] team = TEAM_NEUTRAL : optional check team of the [Player], Alliance, Horde or Neutral (All)
* @param bool onlyGM = false : optional check if GM only
* @return table worldPlayers
Expand Down
2 changes: 2 additions & 0 deletions TrinityCore/GroupMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ namespace LuaGroup
/**
* Returns a table with the [Player]s in this [Group]
*
* In multistate, this method is only available in the WORLD state
*
* @return table groupPlayers : table of [Player]s
*/
int GetMembers(Eluna* E, Group* group)
Expand Down
4 changes: 4 additions & 0 deletions TrinityCore/GuildMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ namespace LuaGuild
*
* Only the players that are online and on some map.
*
* In multistate, this method is only available in the WORLD state
*
* @return table guildPlayers : table of [Player]s
*/
int GetMembers(Eluna* E, Guild* guild)
Expand Down Expand Up @@ -57,6 +59,8 @@ namespace LuaGuild
/**
* Finds and returns the [Guild] leader by their GUID if logged in
*
* In multistate, this method is only available in the WORLD state
*
* @return [Player] leader
*/
int GetLeader(Eluna* E, Guild* guild)
Expand Down
6 changes: 6 additions & 0 deletions TrinityCore/WorldObjectMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,8 @@ namespace LuaWorldObject
* worldobject:RegisterEvent(Timed, 1000, 5) -- do it after 1 second 5 times
* worldobject:RegisterEvent(Timed, {1000, 10000}, 0) -- do it after 1 to 10 seconds forever
*
* In multistate, this method is only available in the MAP states
*
* @proto eventId = (function, delay)
* @proto eventId = (function, delaytable)
* @proto eventId = (function, delay, repeats)
Expand Down Expand Up @@ -803,6 +805,8 @@ namespace LuaWorldObject
/**
* Removes the timed event from a [WorldObject] by the specified event ID
*
* In multistate, this method is only available in the MAP states
*
* @param int eventId : event Id to remove
*/
int RemoveEventById(Eluna* E, WorldObject* obj)
Expand All @@ -815,6 +819,8 @@ namespace LuaWorldObject
/**
* Removes all timed events from a [WorldObject]
*
* In multistate, this method is only available in the MAP states
*
*/
int RemoveEvents(Eluna* /*E*/, WorldObject* obj)
{
Expand Down

0 comments on commit 8047cf5

Please sign in to comment.