mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Loot] Remove from shared memory, simplification (#3988)
* First pass of pulling loot out of shared memory, functional * More code cleanup * More cleanup * More cleanup * More cleanup * Add loot reload type * Reload, logging * Update npc.h * Cleanup * Logging, don't load attempt to load loottable id 0 * Update worldserver.cpp * Update client.cpp * Update zone_loot.cpp * PR feedback * Update zone.cpp * Memory leak suggestion * Update CMakeLists.txt * Post rebase issues
This commit is contained in:
@@ -2263,14 +2263,14 @@ void Perl_Client_UntrainDiscBySpellID(Client* self, uint16 spell_id, bool update
|
||||
|
||||
void Perl_Client_SummonBaggedItems(Client* self, uint32 bag_item_id, perl::reference bag_items_ref) // @categories Inventory and Items, Script Utility
|
||||
{
|
||||
std::vector<ServerLootItem_Struct> bagged_items;
|
||||
std::vector<LootItem> bagged_items;
|
||||
|
||||
perl::array bag_items = bag_items_ref;
|
||||
for (perl::hash bag_item : bag_items) // only works if all elements are hashrefs
|
||||
{
|
||||
if (bag_item.exists("item_id") && bag_item.exists("charges"))
|
||||
{
|
||||
ServerLootItem_Struct item{};
|
||||
LootItem item{};
|
||||
item.item_id = bag_item["item_id"];
|
||||
item.charges = bag_item["charges"];
|
||||
item.attuned = bag_item.exists("attuned") ? bag_item["attuned"] : 0;
|
||||
|
||||
Reference in New Issue
Block a user