mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 11:28:25 +00:00
[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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user