[Lua] Add Zone and Language Constants (#4211)

* [LUA] Add Zone and Language Constants

This will add Zone:

```lua
if eq.get_zone_id() == Zone.Qeynos then
   foo()
end
```

It will also add Language:

```lua
if e.language == Language.ElderElvish and e.other:GetLanguageSkill(Language.ElderElvish) >= 100 then
   e.self:Say("You know my language!", Language.ElderElvish);
end
```

These changes should help avoid magic numbers in quests and aide in readability without the need for -- comments to clarify.

* Adjust to lower case
This commit is contained in:
Fryguy
2024-03-28 13:16:41 -04:00
committed by GitHub
parent f905ee70e4
commit a87496b0cf
3 changed files with 528 additions and 0 deletions
+2
View File
@@ -1264,6 +1264,8 @@ void LuaParser::MapFunctions(lua_State *L) {
lua_register_bodytypes(),
lua_register_filters(),
lua_register_message_types(),
lua_register_zone_types(),
lua_register_languages(),
lua_register_entity(),
lua_register_encounter(),
lua_register_mob(),