mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Updated method documentation and cleaned up
Method documentation should be completed. Only thing left now is polishing up (fixing typos, update wording, add enumerator data to method documentation that doesn't have it, etc).. Cleaned whitespaces Corrected/Fixed up some comments Removed all known documented method comments in LuaFunctions.cpp. Commented out methods are now marked as undocumented until they are uncommented & documented in their respective header files. Removed 'Getter, Setter, Boolean, Other' comments in method files Documented VehicleMethods, the rest of PlayerMethods, UnitMethods, CreatureMethods and GuildMethods. Refer to #101 for more information
This commit is contained in:
@@ -14,8 +14,6 @@
|
||||
*/
|
||||
namespace LuaCreature
|
||||
{
|
||||
/* BOOLEAN */
|
||||
|
||||
/**
|
||||
* Returns `true` if the [Creature] is set to not give reputation when killed,
|
||||
* and returns `false` otherwise.
|
||||
@@ -368,12 +366,25 @@ namespace LuaCreature
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the [Creature] is damaged enough for looting
|
||||
*
|
||||
* @return bool isDamagedEnough
|
||||
*/
|
||||
int IsDamageEnoughForLootingAndReward(Eluna* /*E*/, lua_State* L, Creature* creature)
|
||||
{
|
||||
Eluna::Push(L, creature->IsDamageEnoughForLootingAndReward());
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the [Creature] can start attacking specified target
|
||||
*
|
||||
* Does not work on most targets
|
||||
*
|
||||
* @param [Unit] target
|
||||
* @param bool force = true : force [Creature] to attack
|
||||
*/
|
||||
int CanStartAttack(Eluna* /*E*/, lua_State* L, Creature* creature) // TODO: Implement core side
|
||||
{
|
||||
Unit* target = Eluna::CHECKOBJ<Unit>(L, 2);
|
||||
@@ -383,6 +394,12 @@ namespace LuaCreature
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if [Creature] has the specified loot mode
|
||||
*
|
||||
* @param uint16 lootMode
|
||||
* @return bool hasLootMode
|
||||
*/
|
||||
int HasLootMode(Eluna* /*E*/, lua_State* L, Creature* creature) // TODO: Implement LootMode features
|
||||
{
|
||||
uint16 lootMode = Eluna::CHECKVAL<uint16>(L, 2);
|
||||
@@ -392,8 +409,6 @@ namespace LuaCreature
|
||||
}
|
||||
#endif
|
||||
|
||||
/* GETTERS */
|
||||
|
||||
/**
|
||||
* Returns the time it takes for this [Creature] to respawn once killed.
|
||||
*
|
||||
@@ -853,8 +868,6 @@ namespace LuaCreature
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* SETTERS */
|
||||
|
||||
/**
|
||||
* Sets the [Creature]'s NPC flags to `flags`.
|
||||
*
|
||||
@@ -1091,8 +1104,6 @@ namespace LuaCreature
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* OTHER */
|
||||
|
||||
/**
|
||||
* Despawn this [Creature].
|
||||
*
|
||||
@@ -1129,7 +1140,7 @@ namespace LuaCreature
|
||||
}
|
||||
|
||||
/**
|
||||
* Make the [Creature] start following it's waypoint path.
|
||||
* Make the [Creature] start following its waypoint path.
|
||||
*/
|
||||
int MoveWaypoint(Eluna* /*E*/, lua_State* /*L*/, Creature* creature)
|
||||
{
|
||||
@@ -1229,12 +1240,20 @@ namespace LuaCreature
|
||||
}
|
||||
|
||||
#ifdef TRINITY
|
||||
/**
|
||||
* Resets [Creature]'s loot mode to default
|
||||
*/
|
||||
int ResetLootMode(Eluna* /*E*/, lua_State* /*L*/, Creature* creature) // TODO: Implement LootMode features
|
||||
{
|
||||
creature->ResetLootMode();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes specified loot mode from [Creature]
|
||||
*
|
||||
* @param uint16 lootMode
|
||||
*/
|
||||
int RemoveLootMode(Eluna* /*E*/, lua_State* L, Creature* creature) // TODO: Implement LootMode features
|
||||
{
|
||||
uint16 lootMode = Eluna::CHECKVAL<uint16>(L, 2);
|
||||
@@ -1243,6 +1262,11 @@ namespace LuaCreature
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a loot mode to the [Creature]
|
||||
*
|
||||
* @param uint16 lootMode
|
||||
*/
|
||||
int AddLootMode(Eluna* /*E*/, lua_State* L, Creature* creature) // TODO: Implement LootMode features
|
||||
{
|
||||
uint16 lootMode = Eluna::CHECKVAL<uint16>(L, 2);
|
||||
|
||||
Reference in New Issue
Block a user