ElunaLuaEngine / Eluna

Eluna Lua Engine © for WoW Emulators
https://elunaluaengine.github.io
GNU General Public License v3.0
372 stars 356 forks source link

Loot method #470

Closed iThorgrim closed 5 months ago

iThorgrim commented 6 months ago

Loot Method and Object

Adding new [Loot] object and new method :

local loot = creature:GetLoot()
loot:AddItem(itemId, chance, needsquest, lootmode, mincount, maxcount)
loot:HaveItem(itemId or nil) -- return if have a specific item or have items
loot:RemoveItem(itemid)
loot:GetMoney()
loot:SetMoney(amount)
loot:GenerateMoney(minMoney, maxMoney)
...
Foereaper commented 6 months ago

This'll need some changes or methods possibly removed to be compatible with the Mangos based cores. I'll see if I have the time to add the Mangos files to this PR this weekend.

iThorgrim commented 5 months ago

I'm taking the liberty of closing this PR for the time being, as the Eluna structure is not up to date on this branch, so I'll have to update it manually.