mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Merge
This commit is contained in:
+31
-38
@@ -15,17 +15,14 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "../common/debug.h"
|
||||
|
||||
#include <float.h>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <float.h>
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#include <process.h>
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#else
|
||||
@@ -33,31 +30,26 @@
|
||||
#include "../common/unix.h"
|
||||
#endif
|
||||
|
||||
#include "masterentity.h"
|
||||
#include "../common/debug.h"
|
||||
#include "../common/features.h"
|
||||
#include "spawngroup.h"
|
||||
#include "spawn2.h"
|
||||
#include "zone.h"
|
||||
#include "worldserver.h"
|
||||
#include "npc.h"
|
||||
#include "net.h"
|
||||
#include "../common/seperator.h"
|
||||
#include "../common/packet_dump_file.h"
|
||||
#include "../common/eq_stream_factory.h"
|
||||
#include "../common/eq_stream.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "zone_config.h"
|
||||
#include "../common/breakdowns.h"
|
||||
#include "map.h"
|
||||
#include "water_map.h"
|
||||
#include "object.h"
|
||||
#include "petitions.h"
|
||||
#include "pathing.h"
|
||||
#include "event_codes.h"
|
||||
#include "client_logs.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/seperator.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "client_logs.h"
|
||||
#include "guild_mgr.h"
|
||||
#include "map.h"
|
||||
#include "net.h"
|
||||
#include "npc.h"
|
||||
#include "object.h"
|
||||
#include "pathing.h"
|
||||
#include "petitions.h"
|
||||
#include "quest_parser_collection.h"
|
||||
#include "spawn2.h"
|
||||
#include "spawngroup.h"
|
||||
#include "water_map.h"
|
||||
#include "worldserver.h"
|
||||
#include "zone_config.h"
|
||||
#include "zone.h"
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#define snprintf _snprintf
|
||||
@@ -65,18 +57,19 @@
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
|
||||
extern bool staticzone;
|
||||
extern NetConnection net;
|
||||
extern PetitionList petition_list;
|
||||
extern QuestParserCollection* parse;
|
||||
extern uint16 adverrornum;
|
||||
extern uint32 numclients;
|
||||
extern WorldServer worldserver;
|
||||
extern Zone* zone;
|
||||
extern uint32 numclients;
|
||||
extern NetConnection net;
|
||||
extern uint16 adverrornum;
|
||||
extern PetitionList petition_list;
|
||||
|
||||
Mutex MZoneShutdown;
|
||||
extern bool staticzone;
|
||||
Zone* zone = 0;
|
||||
|
||||
volatile bool ZoneLoaded = false;
|
||||
extern QuestParserCollection* parse;
|
||||
Zone* zone = 0;
|
||||
|
||||
bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
||||
const char* zonename = database.GetZoneName(iZoneID);
|
||||
@@ -1301,13 +1294,13 @@ void Zone::ChangeWeather()
|
||||
return;
|
||||
}
|
||||
|
||||
int chance = MakeRandomInt(0, 3);
|
||||
int chance = zone->random.Int(0, 3);
|
||||
uint8 rainchance = zone->newzone_data.rain_chance[chance];
|
||||
uint8 rainduration = zone->newzone_data.rain_duration[chance];
|
||||
uint8 snowchance = zone->newzone_data.snow_chance[chance];
|
||||
uint8 snowduration = zone->newzone_data.snow_duration[chance];
|
||||
uint32 weathertimer = 0;
|
||||
uint16 tmpweather = MakeRandomInt(0, 100);
|
||||
uint16 tmpweather = zone->random.Int(0, 100);
|
||||
uint8 duration = 0;
|
||||
uint8 tmpOldWeather = zone->zone_weather;
|
||||
bool changed = false;
|
||||
@@ -1316,7 +1309,7 @@ void Zone::ChangeWeather()
|
||||
{
|
||||
if(rainchance > 0 || snowchance > 0)
|
||||
{
|
||||
uint8 intensity = MakeRandomInt(1, 10);
|
||||
uint8 intensity = zone->random.Int(1, 10);
|
||||
if((rainchance > snowchance) || (rainchance == snowchance))
|
||||
{
|
||||
//It's gunna rain!
|
||||
|
||||
Reference in New Issue
Block a user