Feat(Documentation): Add missing documentation for all methods and classes (#315)

This commit is contained in:
Aldori
2025-09-17 09:01:24 -04:00
committed by GitHub
parent 313596f86e
commit b559d02658
20 changed files with 498 additions and 55 deletions

View File

@@ -8,6 +8,8 @@
#define UNITMETHODS_H
/***
* Represents a non-[Player] controlled [Unit] (i.e. NPCs).
*
* Inherits all methods from: [Object], [WorldObject]
*/
namespace LuaUnit
@@ -1175,13 +1177,11 @@ namespace LuaUnit
return 1;
}
/*
int GetVehicle(lua_State* L, Unit* unit)
/*int GetVehicle(lua_State* L, Unit* unit)
{
Eluna::Push(L, unit->GetVehicle());
return 1;
}
*/
}*/
/**
* Returns the Critter Guid
@@ -1793,6 +1793,13 @@ namespace LuaUnit
return 0;
}
/**
* Sets the [Unit]'s critter companion by GUID.
*
* This method assigns the specified [ObjectGuid] as the critter (non-combat pet) companion of the [Unit].
*
* @param [ObjectGuid] guid : The GUID of the critter to set
*/
int SetCritterGUID(lua_State* L, Unit* unit)
{
ObjectGuid guid = Eluna::CHECKVAL<ObjectGuid>(L, 2);