[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 commit 2ec85304b7.

* Revert "Revert "Added constants and cleaned up #weather command""

This reverts commit 76f4e411b6.

* Delete settings.json

* Update zone.cpp
This commit is contained in:
Kinglykrab
2022-10-13 21:59:55 -04:00
committed by GitHub
parent eb02525d36
commit 0240a9cc76
9 changed files with 249 additions and 141 deletions
+6 -3
View File
@@ -1750,11 +1750,14 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
outapp = new EQApplicationPacket(OP_Weather, 12);
Weather_Struct *ws = (Weather_Struct *)outapp->pBuffer;
ws->val1 = 0x000000FF;
if (zone->zone_weather == 1) { ws->type = 0x31; } // Rain
if (zone->zone_weather == 2) {
if (zone->zone_weather == EQ::constants::WeatherTypes::Raining) {
ws->type = 0x31;
} else if (zone->zone_weather == EQ::constants::WeatherTypes::Snowing) {
outapp->pBuffer[8] = 0x01;
ws->type = 0x02;
ws->type = EQ::constants::WeatherTypes::Snowing;
}
outapp->priority = 6;
QueuePacket(outapp);
safe_delete(outapp);