mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-27 07:51:29 +00:00
Add rule instead of define for IDLE_WHEN_EMPTY
This commit is contained in:
parent
c3b7f6d0bf
commit
542d0795c4
@ -266,6 +266,7 @@ RULE_INT(Zone, MinOfflineTimeToReplenishments, 21600) // 21600 seconds is 6 Hour
|
||||
RULE_BOOL(Zone, UseZoneController, true) // Enables the ability to use persistent quest based zone controllers (zone_controller.pl/lua)
|
||||
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_BOOL(Zone, IdleWhenEmpty, true) // Don't process NPCs while zone is empty. Defaults to true.
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Map)
|
||||
|
||||
@ -408,10 +408,10 @@ void EntityList::RaidProcess()
|
||||
|
||||
void EntityList::DoorProcess()
|
||||
{
|
||||
#ifdef IDLE_WHEN_EMPTY
|
||||
if (numclients < 1)
|
||||
return;
|
||||
#endif
|
||||
if (RuleB(Zone, IdleWhenEmpty)) {
|
||||
if (numclients < 1)
|
||||
return;
|
||||
}
|
||||
if (door_list.empty()) {
|
||||
net.door_timer.Disable();
|
||||
return;
|
||||
@ -477,7 +477,7 @@ void EntityList::MobProcess()
|
||||
|
||||
size_t sz = mob_list.size();
|
||||
|
||||
#ifdef IDLE_WHEN_EMPTY
|
||||
if (RuleB(Zone, IdleWhenEmpty)) {
|
||||
if (numclients > 0 ||
|
||||
mob->GetWanderType() == 4 || mob->GetWanderType() == 6) {
|
||||
// Normal processing, or assuring that spawns that should
|
||||
@ -490,9 +490,11 @@ void EntityList::MobProcess()
|
||||
// At the very least, process that.
|
||||
mob_dead = mob->CastToNPC()->GetDepop();
|
||||
}
|
||||
#else
|
||||
}
|
||||
else
|
||||
{
|
||||
mob_dead = !mob->Process();
|
||||
#endif
|
||||
}
|
||||
size_t a_sz = mob_list.size();
|
||||
|
||||
if(a_sz > sz) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user