mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +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:
+2
-2
@@ -2345,7 +2345,7 @@ void Lua_Client::SummonBaggedItems(uint32 bag_item_id, luabind::adl::object bag_
|
||||
return;
|
||||
}
|
||||
|
||||
std::vector<ServerLootItem_Struct> bagged_items;
|
||||
std::vector<LootItem> bagged_items;
|
||||
|
||||
luabind::raw_iterator end; // raw_iterator uses lua_rawget
|
||||
for (luabind::raw_iterator it(bag_items_table); it != end; ++it)
|
||||
@@ -2354,7 +2354,7 @@ void Lua_Client::SummonBaggedItems(uint32 bag_item_id, luabind::adl::object bag_
|
||||
if (luabind::type(*it) == LUA_TTABLE)
|
||||
{
|
||||
// no need to try/catch, quest lua parser already catches exceptions
|
||||
ServerLootItem_Struct item{};
|
||||
LootItem 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;
|
||||
|
||||
Reference in New Issue
Block a user