Skip to content

Commit ff712ef

Browse files
committed
Update documentation
1 parent 74780a8 commit ff712ef

File tree

7 files changed

+85
-5
lines changed

7 files changed

+85
-5
lines changed

TrinityCore/CreatureMethods.h

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,13 +807,26 @@ namespace LuaCreature
807807
}
808808
#endif
809809

810+
/**
811+
* Returns the loot mode for the [Creature].
812+
*
813+
* <pre>
814+
* LOOT_MODE_DEFAULT = 1,
815+
* LOOT_MODE_HARD_MODE_1 = 2,
816+
* LOOT_MODE_HARD_MODE_2 = 4,
817+
* LOOT_MODE_HARD_MODE_3 = 8,
818+
* LOOT_MODE_HARD_MODE_4 = 16,
819+
* LOOT_MODE_JUNK_FISH = 32768
820+
* </pre>
821+
*
822+
* @return uint16 lootMode
823+
*/
810824
int GetLootMode(Eluna* E, Creature* creature)
811825
{
812826
E->Push(creature->GetLootMode());
813827
return 1;
814828
}
815829

816-
817830
/**
818831
* Returns the guid of the [Creature] that is used as the ID in the database
819832
*
@@ -864,6 +877,20 @@ namespace LuaCreature
864877
return 0;
865878
}
866879

880+
/**
881+
* Sets the loot mode for the [Creature].
882+
*
883+
* <pre>
884+
* LOOT_MODE_DEFAULT = 1,
885+
* LOOT_MODE_HARD_MODE_1 = 2,
886+
* LOOT_MODE_HARD_MODE_2 = 4,
887+
* LOOT_MODE_HARD_MODE_3 = 8,
888+
* LOOT_MODE_HARD_MODE_4 = 16,
889+
* LOOT_MODE_JUNK_FISH = 32768
890+
* </pre>
891+
*
892+
* @param uint16 lootMode
893+
*/
867894
int SetLootMode(Eluna* E, Creature* creature)
868895
{
869896
uint16 lootMode = Eluna::CHECKVAL<uint16>(E->L, 2);

TrinityCore/GameObjectMethods.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ namespace LuaGameObject
5959
return 1;
6060
}
6161

62+
/**
63+
* Returns true if the [GameObject] is a destructible, false otherwise.
64+
*
65+
* @return bool isDestructible
66+
*/
6267
int IsDestructible(Eluna* E, GameObject* go)
6368
{
6469
E->Push(go->IsDestructibleBuilding());

TrinityCore/GlobalMethods.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ namespace LuaGlobalFunctions
4545
*
4646
* - for MaNGOS returns the realmID as it is stored in the core.
4747
* - for TrinityCore returns the realmID as it is in the conf file.
48+
*
4849
* @return uint32 realm ID
4950
*/
50-
5151
int GetRealmID(Eluna* E)
5252
{
5353
E->Push(sConfigMgr->GetIntDefault("RealmID", 1));

TrinityCore/GroupMethods.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ namespace LuaGroup
157157
return 1;
158158
}
159159

160+
/**
161+
* Returns true if the [Group] is a battlefield group, false otherwise
162+
*
163+
* @return bool isBFGroup
164+
*/
160165
int IsBFGroup(Eluna* E, Group* group)
161166
{
162167
E->Push(group->isBFGroup());
@@ -249,6 +254,7 @@ namespace LuaGroup
249254
return 1;
250255
}
251256

257+
#ifndef CATA
252258
/**
253259
* Returns the [Group] members' flags
254260
*
@@ -260,11 +266,10 @@ namespace LuaGroup
260266
* MEMBER_FLAG_MAINASSIST = 4
261267
* };
262268
* </pre>
263-
*
269+
*
264270
* @param ObjectGuid guid : guid of the player
265271
* @return uint8 flags
266272
*/
267-
#ifndef CATA
268273
int GetMemberFlags(Eluna* E, Group* group)
269274
{
270275
ObjectGuid guid = Eluna::CHECKVAL<ObjectGuid>(E->L, 2);
@@ -393,12 +398,16 @@ namespace LuaGroup
393398
return 0;
394399
}
395400

401+
/**
402+
* Converts the [Group] to a LFG group
403+
*/
396404
int ConvertToLFG(Eluna* /*E*/, Group* group)
397405
{
398406
group->ConvertToLFG();
399407
return 0;
400408
}
401409

410+
#ifndef CATA
402411
/**
403412
* Sets or removes a flag for a [Group] member
404413
*
@@ -415,7 +424,6 @@ namespace LuaGroup
415424
* @param bool apply : add the `flag` if `true`, remove the `flag` otherwise
416425
* @param [GroupMemberFlags] flag : the flag to set or unset
417426
*/
418-
#ifndef CATA
419427
int SetMemberFlag(Eluna* E, Group* group)
420428
{
421429
ObjectGuid target = Eluna::CHECKVAL<ObjectGuid>(E->L, 2);

TrinityCore/ItemMethods.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,11 @@ namespace LuaItem
221221
}
222222

223223
#ifndef CATA
224+
/**
225+
* Returns 'true' if the refund period has expired for this [Item], 'false' otherwise
226+
*
227+
* @return bool isRefundExpired
228+
*/
224229
int IsRefundExpired(Eluna* E, Item* item)
225230
{
226231
E->Push(item->IsRefundExpired());
@@ -315,6 +320,11 @@ namespace LuaItem
315320
return 1;
316321
}
317322

323+
/**
324+
* Returns GUID of the [Player] who currently owns the [Item]
325+
*
326+
* @return ObjectGuid guid : guid of the [Player] who owns the [Item]
327+
*/
318328
int GetOwnerGUID(Eluna* E, Item* item)
319329
{
320330
E->Push(item->GetOwnerGUID());
@@ -629,6 +639,11 @@ namespace LuaItem
629639
}
630640

631641
#ifdef WOTLK
642+
/**
643+
* Returns the amount of stat values on this [Item]
644+
*
645+
* @return uint32 statsCount
646+
*/
632647
int GetStatsCount(Eluna* E, Item* item)
633648
{
634649
E->Push(item->GetTemplate()->StatsCount);
@@ -651,6 +666,11 @@ namespace LuaItem
651666
return 1;
652667
}
653668

669+
/**
670+
* Returns the random suffix ID of this [Item]
671+
*
672+
* @return uint32 suffixId
673+
*/
654674
int GetRandomSuffix(Eluna* E, Item* item)
655675
{
656676
#ifdef CATA

TrinityCore/QuestMethods.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ namespace LuaQuest
173173
return 1;
174174
}
175175

176+
/**
177+
* Returns the maximum level where the [Quest] can still be picked up.
178+
*
179+
* @return uint32 maxLevel
180+
*/
176181
int GetMaxLevel(Eluna* E, Quest* quest)
177182
{
178183
E->Push(quest->GetMaxLevel());

TrinityCore/UnitMethods.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,18 +458,33 @@ namespace LuaUnit
458458
return 1;
459459
}
460460

461+
/**
462+
* Returns true if the [Unit] is visible, false otherwise.
463+
*
464+
* @return bool isVisible
465+
*/
461466
int IsVisible(Eluna* E, Unit* unit)
462467
{
463468
E->Push(unit->IsVisible());
464469
return 1;
465470
}
466471

472+
/**
473+
* Returns true if the [Unit] is moving, false otherwise.
474+
*
475+
* @return bool isMoving
476+
*/
467477
int IsMoving(Eluna* E, Unit* unit)
468478
{
469479
E->Push(unit->isMoving());
470480
return 1;
471481
}
472482

483+
/**
484+
* Returns true if the [Unit] is flying, false otherwise.
485+
*
486+
* @return bool isFlying
487+
*/
473488
int IsFlying(Eluna* E, Unit* unit)
474489
{
475490
E->Push(unit->IsFlying());

0 commit comments

Comments
 (0)