mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Fix segfault with VendorRemoveAllItems
This commit is contained in:
@@ -1895,7 +1895,7 @@ namespace LuaGlobalFunctions
|
|||||||
if (!items || items->Empty())
|
if (!items || items->Empty())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
auto const & itemlist = items->m_items;
|
auto const itemlist = items->m_items;
|
||||||
for (auto itr = itemlist.begin(); itr != itemlist.end(); ++itr)
|
for (auto itr = itemlist.begin(); itr != itemlist.end(); ++itr)
|
||||||
#if defined(CATA) || defined(MISTS)
|
#if defined(CATA) || defined(MISTS)
|
||||||
eObjectMgr->RemoveVendorItem(entry, (*itr)->item, 1);
|
eObjectMgr->RemoveVendorItem(entry, (*itr)->item, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user