loot source for item drops

Added support for Items to have a loot source attached to them when dropped or rolled.  This fixes the issue where achievements would give the item before it appeared in the achievement window.
This commit is contained in:
EmosewaMC
2022-04-23 20:35:34 -07:00
parent ceab229a63
commit 7a051afd97
29 changed files with 65 additions and 62 deletions

View File

@@ -87,10 +87,12 @@ public:
* @param sourceType the source of the item, used to determine if the item is dropped or mailed if the inventory is full
* @param bound whether this item is bound
* @param preferredSlot the preferred slot to store this item
* @param lootSourceType The source of the loot. Defaults to none.
*/
void AddItem(
LOT lot,
uint32_t count,
eLootSourceType lootSourceType = eLootSourceType::LOOT_SOURCE_NONE,
eInventoryType inventoryType = INVALID,
const std::vector<LDFBaseData*>& config = {},
LWOOBJID parent = LWOOBJID_EMPTY,
@@ -100,8 +102,7 @@ public:
eInventoryType inventorySourceType = INVALID,
int32_t sourceType = 0,
bool bound = false,
int32_t preferredSlot = -1,
eLootSourceType lootSourceType = eLootSourceType::LOOT_SOURCE_NONE
int32_t preferredSlot = -1
);
/**