mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-18 08:18:27 +00:00
[Quest API] Add IsRaining() and IsSnowing() to Perl/Lua. (#2477)
* [Quest API] Add IsRaining() and IsSnowing() to Perl/Lua. - Add quest::IsRaining() to Perl. - Add quest::IsSnowing() to Perl. - Add eq.is_raining() to Lua. - Add eq.is_snowing() to Lua. This will allow server operators to tell if a zone is currently raining, snowing, or neither. * Remove unnecessary quest manager stuff. * Added constants and cleaned up #weather command * Revert "Added constants and cleaned up #weather command" This reverts commit2ec85304b7. * Revert "Revert "Added constants and cleaned up #weather command"" This reverts commit76f4e411b6. * Delete settings.json * Update zone.cpp
This commit is contained in:
+21
-2
@@ -1203,8 +1203,9 @@ luabind::adl::object lua_get_characters_in_instance(lua_State *L, uint16 instanc
|
||||
}
|
||||
|
||||
int lua_get_zone_weather() {
|
||||
if(!zone)
|
||||
return 0;
|
||||
if (!zone) {
|
||||
return EQ::constants::WeatherTypes::None;
|
||||
}
|
||||
|
||||
return zone->zone_weather;
|
||||
}
|
||||
@@ -3427,6 +3428,22 @@ bool lua_has_recipe_learned(uint32 recipe_id) {
|
||||
return quest_manager.HasRecipeLearned(recipe_id);
|
||||
}
|
||||
|
||||
bool lua_is_raining() {
|
||||
if (!zone) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return zone->IsRaining();
|
||||
}
|
||||
|
||||
bool lua_is_snowing() {
|
||||
if (!zone) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return zone->IsSnowing();
|
||||
}
|
||||
|
||||
#define LuaCreateNPCParse(name, c_type, default_value) do { \
|
||||
cur = table[#name]; \
|
||||
if(luabind::type(cur) != LUA_TNIL) { \
|
||||
@@ -3891,6 +3908,8 @@ luabind::scope lua_register_general() {
|
||||
luabind::def("get_recipe_made_count", &lua_get_recipe_made_count),
|
||||
luabind::def("get_recipe_name", &lua_get_recipe_name),
|
||||
luabind::def("has_recipe_learned", &lua_has_recipe_learned),
|
||||
luabind::def("is_raining", &lua_is_raining),
|
||||
luabind::def("is_snowing", &lua_is_snowing),
|
||||
|
||||
/*
|
||||
Cross Zone
|
||||
|
||||
Reference in New Issue
Block a user