[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
This commit is contained in:
Alex King 2024-03-28 20:05:55 -04:00 committed by GitHub
parent b946b800fb
commit e11286164f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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_<MessageTypes>("Zone")
return luabind::class_<ZoneIDs>("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_<MessageTypes>("Language")
return luabind::class_<LanguageIDs>("Language")
.enum_("constants")
[(
luabind::value("CommonTongue", Language::CommonTongue),