fix: crash caused by VendorRemoveAllItems (#142)

This commit is contained in:
najoast
2023-05-31 06:49:55 +08:00
committed by GitHub
parent 61c1ef924b
commit cc138e8c9b

View File

@@ -2066,7 +2066,7 @@ namespace LuaGlobalFunctions
return 0;
auto const& itemlist = items->m_items;
for (auto itr = itemlist.begin(); itr != itemlist.end(); ++itr)
for (auto itr = itemlist.rbegin(); itr != itemlist.rend(); ++itr)
#if defined(CATA) || defined(MISTS)
eObjectMgr->RemoveVendorItem(entry, (*itr)->item, 1);
#else