mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Merge
This commit is contained in:
+14
-18
@@ -19,21 +19,17 @@
|
||||
#ifdef _EQDEBUG
|
||||
#include <iostream>
|
||||
#endif
|
||||
//#include <iomanip>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include "npc.h"
|
||||
#include "masterentity.h"
|
||||
#include "npc_ai.h"
|
||||
#include "map.h"
|
||||
#include "water_map.h"
|
||||
#include "../common/moremath.h"
|
||||
#include "string_ids.h"
|
||||
#include "../common/misc_functions.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "../common/rulesys.h"
|
||||
|
||||
#include "../common/features.h"
|
||||
#include "../common/misc_functions.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "map.h"
|
||||
#include "npc.h"
|
||||
#include "quest_parser_collection.h"
|
||||
#include "water_map.h"
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct wp_distance
|
||||
{
|
||||
@@ -265,7 +261,7 @@ void NPC::CalculateNewWaypoint()
|
||||
if(closest.size() != 0)
|
||||
{
|
||||
iter = closest.begin();
|
||||
std::advance(iter, MakeRandomInt(0, closest.size() - 1));
|
||||
std::advance(iter, zone->random.Int(0, closest.size() - 1));
|
||||
cur_wp = (*iter).index;
|
||||
}
|
||||
|
||||
@@ -273,7 +269,7 @@ void NPC::CalculateNewWaypoint()
|
||||
}
|
||||
case 2: //random
|
||||
{
|
||||
cur_wp = MakeRandomInt(0, Waypoints.size() - 1);
|
||||
cur_wp = zone->random.Int(0, Waypoints.size() - 1);
|
||||
if(cur_wp == old_wp)
|
||||
{
|
||||
if(cur_wp == (Waypoints.size() - 1))
|
||||
@@ -334,7 +330,7 @@ void NPC::CalculateNewWaypoint()
|
||||
if(closest.size() != 0)
|
||||
{
|
||||
iter = closest.begin();
|
||||
std::advance(iter, MakeRandomInt(0, closest.size() - 1));
|
||||
std::advance(iter, zone->random.Int(0, closest.size() - 1));
|
||||
cur_wp = (*iter).index;
|
||||
}
|
||||
break;
|
||||
@@ -407,13 +403,13 @@ void NPC::SetWaypointPause()
|
||||
switch (pausetype)
|
||||
{
|
||||
case 0: //Random Half
|
||||
AIwalking_timer->Start((cur_wp_pause - MakeRandomInt(0, cur_wp_pause-1)/2)*1000);
|
||||
AIwalking_timer->Start((cur_wp_pause - zone->random.Int(0, cur_wp_pause-1)/2)*1000);
|
||||
break;
|
||||
case 1: //Full
|
||||
AIwalking_timer->Start(cur_wp_pause*1000);
|
||||
break;
|
||||
case 2: //Random Full
|
||||
AIwalking_timer->Start(MakeRandomInt(0, cur_wp_pause-1)*1000);
|
||||
AIwalking_timer->Start(zone->random.Int(0, cur_wp_pause-1)*1000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user