Currently, GameObject only exposes AddLoot(...), while Creature exposes the full Loot object through GetLoot().
This creates an inconsistency in the API and unnecessarily limits what can be done with GameObject loot from Lua.
With the current design, Lua scripts can only add item entries to a GameObject through AddLoot(...).
That means:
- no direct access to the underlying Loot object
- no ability to call existing Loot methods such as SetMoney(...)
Proposed change:
- Replace AddItem(...) with GetLoot(...)
Alternatively, AddItem(...) can be kept for backward compatibility.
Currently, GameObject only exposes AddLoot(...), while Creature exposes the full Loot object through GetLoot().
This creates an inconsistency in the API and unnecessarily limits what can be done with GameObject loot from Lua.
With the current design, Lua scripts can only add item entries to a GameObject through AddLoot(...).
That means:
Proposed change:
Alternatively, AddItem(...) can be kept for backward compatibility.