diff --git a/src/LuaEngine/GlobalMethods.h b/src/LuaEngine/GlobalMethods.h index 8545f73..3003a5a 100644 --- a/src/LuaEngine/GlobalMethods.h +++ b/src/LuaEngine/GlobalMethods.h @@ -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