[Quest API] Add attuned/augment support to client->SummonBaggedItems() in Perl/Lua. (#1580)

Perl Example:
```pl
my @bag_items = (
      { item_id => 33649, charges => 1, attuned => 1, augment_one => 32940 }
    );
```

Lua Example:
```lua
local bag_items = {
	{ item_id = 33649, charges = 1, attuned = 1, augment_one = 32940 }
}
This commit is contained in:
Kinglykrab
2021-10-02 19:35:35 -04:00
committed by GitHub
parent b3e9e2099a
commit 5720a5020d
3 changed files with 36 additions and 9 deletions
+7
View File
@@ -2267,6 +2267,13 @@ void Lua_Client::SummonBaggedItems(uint32 bag_item_id, luabind::adl::object bag_
ServerLootItem_Struct item{};
item.item_id = luabind::object_cast<uint32>((*it)["item_id"]);
item.charges = luabind::object_cast<int16>((*it)["charges"]);
item.attuned = luabind::type((*it)["attuned"]) != LUA_TNIL ? luabind::object_cast<uint8>((*it)["attuned"]) : 0;
item.aug_1 = luabind::type((*it)["augment_one"]) != LUA_TNIL ? luabind::object_cast<uint32>((*it)["augment_one"]) : 0;
item.aug_2 = luabind::type((*it)["augment_two"]) != LUA_TNIL ? luabind::object_cast<uint32>((*it)["augment_two"]) : 0;
item.aug_3 = luabind::type((*it)["augment_three"]) != LUA_TNIL ? luabind::object_cast<uint32>((*it)["augment_three"]) : 0;
item.aug_4 = luabind::type((*it)["augment_four"]) != LUA_TNIL ? luabind::object_cast<uint32>((*it)["augment_four"]) : 0;
item.aug_5 = luabind::type((*it)["augment_five"]) != LUA_TNIL ? luabind::object_cast<uint32>((*it)["augment_five"]) : 0;
item.aug_6 = luabind::type((*it)["augment_six"]) != LUA_TNIL ? luabind::object_cast<uint32>((*it)["augment_six"]) : 0;
bagged_items.emplace_back(item);
}
}