mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
Fix for static zone issue with mobs congregating after last player zones
This commit is contained in:
parent
d6af1b566f
commit
5989edb6ec
@ -280,6 +280,7 @@ RULE_BOOL(Zone, UseZoneController, true, "Enables the ability to use persistent
|
|||||||
RULE_BOOL(Zone, EnableZoneControllerGlobals, false, "Enables the ability to use quest globals with the zone controller NPC")
|
RULE_BOOL(Zone, EnableZoneControllerGlobals, false, "Enables the ability to use quest globals with the zone controller NPC")
|
||||||
RULE_INT(Zone, GlobalLootMultiplier, 1, "Sets Global Loot drop multiplier for database based drops, useful for double, triple loot etc")
|
RULE_INT(Zone, GlobalLootMultiplier, 1, "Sets Global Loot drop multiplier for database based drops, useful for double, triple loot etc")
|
||||||
RULE_BOOL(Zone, KillProcessOnDynamicShutdown, true, "When process has booted a zone and has hit its zone shut down timer, it will hard kill the process to free memory back to the OS")
|
RULE_BOOL(Zone, KillProcessOnDynamicShutdown, true, "When process has booted a zone and has hit its zone shut down timer, it will hard kill the process to free memory back to the OS")
|
||||||
|
RULE_INT(Zone, SecondsBeforeIdle, 60, "Seconds before IDLE_WHEN_EMPTY define kicks in")
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(Map)
|
RULE_CATEGORY(Map)
|
||||||
|
|||||||
@ -498,11 +498,30 @@ void EntityList::MobProcess()
|
|||||||
size_t sz = mob_list.size();
|
size_t sz = mob_list.size();
|
||||||
|
|
||||||
#ifdef IDLE_WHEN_EMPTY
|
#ifdef IDLE_WHEN_EMPTY
|
||||||
|
static int old_client_count=0;
|
||||||
|
static Timer *mob_settle_timer = new Timer();
|
||||||
|
|
||||||
|
if (numclients == 0 && old_client_count > 0 &&
|
||||||
|
RuleI(Zone, SecondsBeforeIdle) > 0) {
|
||||||
|
// Start Timer to allow any mobs that chased chars from zone
|
||||||
|
// to return home.
|
||||||
|
mob_settle_timer->Start(RuleI(Zone, SecondsBeforeIdle) * 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
old_client_count = numclients;
|
||||||
|
|
||||||
|
// Disable settle timer if someone zones into empty zone
|
||||||
|
if (numclients > 0 || mob_settle_timer->Check()) {
|
||||||
|
mob_settle_timer->Disable();
|
||||||
|
}
|
||||||
|
|
||||||
if (numclients > 0 ||
|
if (numclients > 0 ||
|
||||||
mob->GetWanderType() == 4 || mob->GetWanderType() == 6) {
|
mob->GetWanderType() == 4 || mob->GetWanderType() == 6 ||
|
||||||
|
mob_settle_timer->Enabled()) {
|
||||||
// Normal processing, or assuring that spawns that should
|
// Normal processing, or assuring that spawns that should
|
||||||
// path and depop do that. Otherwise all of these type mobs
|
// path and depop do that. Otherwise all of these type mobs
|
||||||
// will be up and at starting positions when idle zone wakes up.
|
// will be up and at starting positions, or waiting at the zoneline
|
||||||
|
// if they chased the PCs when idle zone wakes up.
|
||||||
mob_dead = !mob->Process();
|
mob_dead = !mob->Process();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user