mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-14 11:52:25 +00:00
Merge branch 'master' of https://github.com/EQEmu/Server
This commit is contained in:
commit
8febc906a5
@ -1,5 +1,11 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
== 03/25/2017 ==
|
||||||
|
Akkadius: Reduced CPU footprint in non-combat zones doing constant checks for combat related activities
|
||||||
|
Akkadius: Reduced CPU footprint in cases where a client is checking for aggro excessively every 750 millseconds. This has
|
||||||
|
been adjusted to 6 seconds per new rule RULE_INT(Aggro, ClientAggroCheckInterval)
|
||||||
|
- When zones have many players, with many NPC's, this adds up quickly
|
||||||
|
|
||||||
== 03/12/2017 ==
|
== 03/12/2017 ==
|
||||||
Akkadius:
|
Akkadius:
|
||||||
- Implemented range rules for packets and other functions
|
- Implemented range rules for packets and other functions
|
||||||
|
|||||||
@ -157,7 +157,7 @@ enum { //timer settings, all in milliseconds
|
|||||||
AIscanarea_delay = 6000,
|
AIscanarea_delay = 6000,
|
||||||
AIfeignremember_delay = 500,
|
AIfeignremember_delay = 500,
|
||||||
AItarget_check_duration = 500,
|
AItarget_check_duration = 500,
|
||||||
AIClientScanarea_delay = 750, //used in REVERSE_AGGRO
|
// AIClientScanarea_delay = 750, //used in REVERSE_AGGRO
|
||||||
AIassistcheck_delay = 3000, //now often a fighting NPC will yell for help
|
AIassistcheck_delay = 3000, //now often a fighting NPC will yell for help
|
||||||
AI_check_signal_timer_delay = 500, // How often EVENT_SIGNAL checks are processed
|
AI_check_signal_timer_delay = 500, // How often EVENT_SIGNAL checks are processed
|
||||||
ClientProximity_interval = 150,
|
ClientProximity_interval = 150,
|
||||||
|
|||||||
@ -536,6 +536,7 @@ RULE_INT(Aggro, MaxScalingProcAggro, 400) // Set to -1 for no limit. Maxmimum am
|
|||||||
RULE_INT(Aggro, IntAggroThreshold, 75) // Int <= this will aggro regardless of level difference.
|
RULE_INT(Aggro, IntAggroThreshold, 75) // Int <= this will aggro regardless of level difference.
|
||||||
RULE_BOOL(Aggro, AllowTickPulling, false) // tick pulling is an exploit in an NPC's call for help fixed sometime in 2006 on live
|
RULE_BOOL(Aggro, AllowTickPulling, false) // tick pulling is an exploit in an NPC's call for help fixed sometime in 2006 on live
|
||||||
RULE_BOOL(Aggro, UseLevelAggro, true) // Level 18+ and Undead will aggro regardless of level difference. (this will disabled Rule:IntAggroThreshold if set to true)
|
RULE_BOOL(Aggro, UseLevelAggro, true) // Level 18+ and Undead will aggro regardless of level difference. (this will disabled Rule:IntAggroThreshold if set to true)
|
||||||
|
RULE_INT(Aggro, ClientAggroCheckInterval, 6) // Interval in which clients actually check for aggro - in seconds
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(TaskSystem)
|
RULE_CATEGORY(TaskSystem)
|
||||||
|
|||||||
@ -135,7 +135,7 @@ Client::Client(EQStreamInterface* ieqs)
|
|||||||
forget_timer(0),
|
forget_timer(0),
|
||||||
autosave_timer(RuleI(Character, AutosaveIntervalS) * 1000),
|
autosave_timer(RuleI(Character, AutosaveIntervalS) * 1000),
|
||||||
#ifdef REVERSE_AGGRO
|
#ifdef REVERSE_AGGRO
|
||||||
scanarea_timer(AIClientScanarea_delay),
|
scanarea_timer(RuleI(Aggro, ClientAggroCheckInterval) * 1000),
|
||||||
#endif
|
#endif
|
||||||
tribute_timer(Tribute_duration),
|
tribute_timer(Tribute_duration),
|
||||||
proximity_timer(ClientProximity_interval),
|
proximity_timer(ClientProximity_interval),
|
||||||
|
|||||||
@ -616,7 +616,7 @@ bool Client::Process() {
|
|||||||
//At this point, we are still connected, everything important has taken
|
//At this point, we are still connected, everything important has taken
|
||||||
//place, now check to see if anybody wants to aggro us.
|
//place, now check to see if anybody wants to aggro us.
|
||||||
// only if client is not feigned
|
// only if client is not feigned
|
||||||
if(ret && !GetFeigned() && scanarea_timer.Check()) {
|
if(zone->CanDoCombat() && ret && !GetFeigned() && scanarea_timer.Check()) {
|
||||||
entity_list.CheckClientAggro(this);
|
entity_list.CheckClientAggro(this);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -726,6 +726,7 @@ void Client::AI_SpellCast()
|
|||||||
|
|
||||||
void Client::AI_Process()
|
void Client::AI_Process()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!IsAIControlled())
|
if (!IsAIControlled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -956,6 +957,10 @@ void Mob::AI_Process() {
|
|||||||
bool engaged = IsEngaged();
|
bool engaged = IsEngaged();
|
||||||
bool doranged = false;
|
bool doranged = false;
|
||||||
|
|
||||||
|
if (!zone->CanDoCombat()) {
|
||||||
|
engaged = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Begin: Additions for Wiz Fear Code
|
// Begin: Additions for Wiz Fear Code
|
||||||
//
|
//
|
||||||
if(RuleB(Combat, EnableFearPathing)){
|
if(RuleB(Combat, EnableFearPathing)){
|
||||||
@ -1022,7 +1027,8 @@ void Mob::AI_Process() {
|
|||||||
if (!target) {
|
if (!target) {
|
||||||
SetTarget(hate_list.GetEntWithMostHateOnList(this));
|
SetTarget(hate_list.GetEntWithMostHateOnList(this));
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if (!ImprovedTaunt())
|
if (!ImprovedTaunt())
|
||||||
SetTarget(hate_list.GetEntWithMostHateOnList(this));
|
SetTarget(hate_list.GetEntWithMostHateOnList(this));
|
||||||
}
|
}
|
||||||
@ -1059,7 +1065,8 @@ void Mob::AI_Process() {
|
|||||||
if (DistanceSquaredNoZ(m_Position, npcSpawnPoint) > tether_range) {
|
if (DistanceSquaredNoZ(m_Position, npcSpawnPoint) > tether_range) {
|
||||||
GMMove(npcSpawnPoint.x, npcSpawnPoint.y, npcSpawnPoint.z, npcSpawnPoint.w);
|
GMMove(npcSpawnPoint.x, npcSpawnPoint.y, npcSpawnPoint.z, npcSpawnPoint.w);
|
||||||
}
|
}
|
||||||
} else if(GetSpecialAbility(LEASH)) {
|
}
|
||||||
|
else if (GetSpecialAbility(LEASH)) {
|
||||||
float leash_range = static_cast<float>(GetSpecialAbilityParam(LEASH, 0));
|
float leash_range = static_cast<float>(GetSpecialAbilityParam(LEASH, 0));
|
||||||
leash_range = leash_range > 0.0f ? leash_range * leash_range : pAggroRange * pAggroRange;
|
leash_range = leash_range > 0.0f ? leash_range * leash_range : pAggroRange * pAggroRange;
|
||||||
|
|
||||||
@ -1263,7 +1270,8 @@ void Mob::AI_Process() {
|
|||||||
AI_walking_timer->Start(100);
|
AI_walking_timer->Start(100);
|
||||||
pLastFightingDelayMoving = Timer::GetCurrentTime();
|
pLastFightingDelayMoving = Timer::GetCurrentTime();
|
||||||
return;
|
return;
|
||||||
} else if(tar != nullptr) {
|
}
|
||||||
|
else if (tar != nullptr) {
|
||||||
SetTarget(tar);
|
SetTarget(tar);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1311,11 +1319,12 @@ void Mob::AI_Process() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
if (m_PlayerState & static_cast<uint32>(PlayerState::Aggressive))
|
if (m_PlayerState & static_cast<uint32>(PlayerState::Aggressive))
|
||||||
SendRemovePlayerState(PlayerState::Aggressive);
|
SendRemovePlayerState(PlayerState::Aggressive);
|
||||||
if(AI_feign_remember_timer->Check()) {
|
|
||||||
|
if(!zone->CanDoCombat() && AI_feign_remember_timer->Check()) {
|
||||||
// 6/14/06
|
// 6/14/06
|
||||||
// Improved Feign Death Memory
|
// Improved Feign Death Memory
|
||||||
// check to see if any of our previous feigned targets have gotten up.
|
// check to see if any of our previous feigned targets have gotten up.
|
||||||
@ -1340,7 +1349,7 @@ void Mob::AI_Process() {
|
|||||||
{
|
{
|
||||||
//we processed a spell action, so do nothing else.
|
//we processed a spell action, so do nothing else.
|
||||||
}
|
}
|
||||||
else if (AI_scan_area_timer->Check())
|
else if (!zone->CanDoCombat() && AI_scan_area_timer->Check())
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* This is where NPCs look around to see if they want to attack anybody.
|
* This is where NPCs look around to see if they want to attack anybody.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user