Class Loot [-] [+]

Represents loot data for items, gold, and other rewards dropped by creatures or objects.

Inherits all methods from: none

Methods

AddItem

Adds an Item to the Loot with specified parameters

Clear

Clears all items and gold from the Loot

GenerateMoney

Generates a random gold value for the Loot between min and max

GetItems

Returns a table of items in the Loot with keys: id, index, count, needs_quest, is_looted, roll_winner_guid

GetMoney

Returns the amount of gold in the Loot

GetUnlootedCount

Returns the number of unlooted items in the Loot

HasItem

Returns 'true' if the Loot contains the specified Item, 'false' otherwise

IsLooted

Returns 'true' if the Loot has been looted, 'false' otherwise

RemoveItem

Removes an Item from the Loot, optionally reducing count

SetItemLooted

Sets the 'looted' flag on an Item in the Loot

SetMoney

Sets the amount of gold in the Loot

SetUnlootedCount

Sets the unlooted count for the Loot

UpdateItemIndex

Updates each item's index in the Loot to match its current order

Generated on
©2016 - Eluna Lua Engine