Fixed an issue where Mercenaries were causing several DB queries per second while suspended.

This commit is contained in:
Trevius 2015-01-25 11:28:34 -06:00
parent 5266d7b25c
commit 966acb25b3
3 changed files with 7 additions and 8 deletions

View File

@ -1,5 +1,8 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 01/25/2015 ==
Trevius: Fixed an issue where Mercenaries were causing several DB queries per second while suspended.
== 01/24/2015 ==
Uleat: Added equipment light source functionality to all mob derived classes (may still need tweaking...)
Notes:

View File

@ -232,12 +232,9 @@ bool Client::Process() {
}
if(GetMercInfo().MercTemplateID != 0 && GetMercInfo().IsSuspended)
{
if(p_timers.Expired(&database, pTimerMercSuspend, false))
{
CheckMercSuspendTimer();
}
}
if(IsAIControlled())
AI_Process();

View File

@ -5299,7 +5299,8 @@ void Client::CheckMercSuspendTimer() {
if(GetMercInfo().SuspendedTime != 0)
{
if(time(nullptr) >= GetMercInfo().SuspendedTime)
//if(time(nullptr) >= GetMercInfo().SuspendedTime)
if (p_timers.Expired(&database, pTimerMercSuspend, false))
{
GetMercInfo().SuspendedTime = 0;
SendMercResponsePackets(0);
@ -5399,8 +5400,6 @@ void Client::SpawnMercOnZone() {
}
// Send Mercenary Status/Timer packet
SendMercTimer(GetMerc());
//SendMercPersonalInfo();
CheckMercSuspendTimer();
if (MERC_DEBUG > 0)
Message(7, "Mercenary Debug: SpawnMercOnZone Suspended Merc.");