fix #3930 + massively refactor LuaEventBatch.h (1/2)