mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-21 10:38:20 +00:00
Fix repop crash
This commit is contained in:
@@ -25,8 +25,9 @@ void command_repop(Client *c, const Seperator *sep)
|
|||||||
if (!sep->IsNumber(timearg)) {
|
if (!sep->IsNumber(timearg)) {
|
||||||
c->Message(Chat::White, "Zone depopped - repopping now.");
|
c->Message(Chat::White, "Zone depopped - repopping now.");
|
||||||
|
|
||||||
|
zone->spawn2_timer.Disable();
|
||||||
zone->Repop();
|
zone->Repop();
|
||||||
|
zone->spawn2_timer.Enable();
|
||||||
/* Force a spawn2 timer trigger so we don't delay actually spawning the NPC's */
|
/* Force a spawn2 timer trigger so we don't delay actually spawning the NPC's */
|
||||||
zone->spawn2_timer.Trigger();
|
zone->spawn2_timer.Trigger();
|
||||||
return;
|
return;
|
||||||
|
|||||||
+1
-1
@@ -154,7 +154,7 @@ bool Spawn2::Process() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timer.Check()) {
|
if (timer.Check() && zone->spawn2_timer.Enabled()) {
|
||||||
timer.Disable();
|
timer.Disable();
|
||||||
|
|
||||||
LogSpawns("Spawn2 [{}]: Timer has triggered", spawn2_id);
|
LogSpawns("Spawn2 [{}]: Timer has triggered", spawn2_id);
|
||||||
|
|||||||
@@ -1738,6 +1738,7 @@ bool Zone::Depop(bool StartSpawnTimer) {
|
|||||||
itr = npctable.begin();
|
itr = npctable.begin();
|
||||||
delete itr->second;
|
delete itr->second;
|
||||||
itr->second = nullptr;
|
itr->second = nullptr;
|
||||||
|
|
||||||
npctable.erase(itr);
|
npctable.erase(itr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user