Class Loot [-] [+]

Represents loot that can be obtained from various sources like creatures, gameobjects, or items.

Contains information about items that can be looted, their quantities, money, and loot state.

Inherits all methods from: none

Methods

AddItem

Adds an item to the Loot with the specified parameters.

AddLooter

Adds a Player to the list of players currently looting this Loot.

Clear

Clears all items and money from this Loot.

GenerateMoney

Generates a random amount of money for this Loot within the specified range.

GetContainer

Returns the container GUID that holds this loot.

GetItemCount

Returns the total number of items (regular + quest items) in this Loot.

GetItems

Returns a table containing all items in this Loot.

GetLootOwner

Returns the Player GUID that owns this loot.

GetLootType

Returns the Loot type.

GetMaxSlotForPlayer

Returns the maximum loot slot index available for the specified Player.

GetMoney

Returns the amount of money in this Loot.

GetRoundRobinPlayer

Returns the Player GUID that owns this loot for round robin distribution.

GetSourceWorldObject

Returns the source WorldObject GUID for this loot.

GetUnlootedCount

Returns the number of unlooted items in this Loot.

HasItem

Returns true if the Loot contains the specified item, and returns false otherwise.

HasItemForAll

Returns true if the Loot has items available for all players and returns false otherwise.

HasOverThresholdItem

Returns true if the Loot has items that are over the group loot threshold and returns false otherwise.

HasQuestItems

Returns true if the Loot contains quest items and returns false otherwise.

IsEmpty

Returns true if the Loot is completely empty (no items and no money), returns false otherwise.

IsLooted

Returns true if all loot has been taken from this Loot, returns false otherwise.

RemoveItem

Removes the specified item from the Loot.

RemoveLooter

Removes a Player from the list of players currently looting this Loot.

SetContainer

Sets the container GUID that holds this loot.

SetItemLooted

Sets the looted status of a specific item in this Loot.

SetLootOwner

Sets the Player GUID that owns this loot.

SetLootType

Sets the Loot type.

SetMoney

Sets the amount of money in this Loot.

SetRoundRobinPlayer

Sets the Player GUID for round robin loot distribution.

SetSourceWorldObject

Sets the source WorldObject GUID for this loot.

SetUnlootedCount

Sets the number of unlooted items in this Loot.

UpdateItemIndex

Updates the index of all items in this Loot to match their position in the list.

Generated on
©2016 - Eluna Lua Engine