From e11286164f8aa4e00f77cee59c65b314485e865b Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Thu, 28 Mar 2024 20:05:55 -0400 Subject: [PATCH] [Bug Fix] Fix Luabind Double Class Register (#4219) * [Bug Fix] Fix Luabind Double Class Register # Notes - These two methods were registering to the same class as another method, causing an error seen by @neckkola and others. # Error ``` zone: /home/eqemu/source_jas/libs/luabind/src/class_registry.cpp:151: void luabind::detail::class_registry::add_class(const luabind::type_id&, luabind::detail::class_rep*): Assertion `(m_classes.find(info) == m_classes.end()) && "you are trying to register a class twice"' failed. ``` * Update lua_general.cpp --- zone/lua_general.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index 870a1e8df..75534c696 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -41,6 +41,8 @@ struct MessageTypes { }; struct Rule { }; struct Journal_SpeakMode { }; struct Journal_Mode { }; +struct ZoneIDs { }; +struct LanguageIDs { }; struct lua_registered_event { std::string encounter_name; @@ -7249,7 +7251,7 @@ luabind::scope lua_register_message_types() { } luabind::scope lua_register_zone_types() { - return luabind::class_("Zone") + return luabind::class_("Zone") .enum_("constants") [( luabind::value("qeynos", Zones::QEYNOS), @@ -7737,7 +7739,7 @@ luabind::scope lua_register_zone_types() { } luabind::scope lua_register_languages() { - return luabind::class_("Language") + return luabind::class_("Language") .enum_("constants") [( luabind::value("CommonTongue", Language::CommonTongue),