mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-14 20:12:26 +00:00
Make #repop work almost instantly
This commit is contained in:
parent
718a2c2205
commit
4d3dda23f8
@ -3895,6 +3895,8 @@ void command_depopzone(Client *c, const Seperator *sep)
|
||||
void command_repop(Client *c, const Seperator *sep)
|
||||
{
|
||||
int timearg = 1;
|
||||
int delay = 0;
|
||||
|
||||
if (sep->arg[1] && strcasecmp(sep->arg[1], "force") == 0) {
|
||||
timearg++;
|
||||
|
||||
@ -3913,13 +3915,19 @@ void command_repop(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
if (!sep->IsNumber(timearg)) {
|
||||
c->Message(0, "Zone depoped. Repoping now.");
|
||||
c->Message(0, "Zone depopped - repopping now.");
|
||||
|
||||
zone->Repop();
|
||||
|
||||
/* Force a spawn2 timer trigger so we don't delay actually spawning the NPC's */
|
||||
zone->spawn2_timer.Trigger();
|
||||
return;
|
||||
}
|
||||
|
||||
c->Message(0, "Zone depoped. Repop in %i seconds", atoi(sep->arg[timearg]));
|
||||
zone->Repop(atoi(sep->arg[timearg])*1000);
|
||||
zone->Repop(atoi(sep->arg[timearg]) * 1000);
|
||||
|
||||
zone->spawn2_timer.Trigger();
|
||||
}
|
||||
|
||||
void command_repopclose(Client *c, const Seperator *sep)
|
||||
|
||||
@ -1168,10 +1168,13 @@ bool Zone::Process() {
|
||||
spawn_conditions.Process();
|
||||
|
||||
if(spawn2_timer.Check()) {
|
||||
|
||||
LinkedListIterator<Spawn2*> iterator(spawn2_list);
|
||||
|
||||
EQEmu::InventoryProfile::CleanDirty();
|
||||
|
||||
Log(Logs::Detail, Logs::Spawns, "Running Zone::Process -> Spawn2::Process");
|
||||
|
||||
iterator.Reset();
|
||||
while (iterator.MoreElements()) {
|
||||
if (iterator.GetData()->Process()) {
|
||||
@ -1181,10 +1184,10 @@ bool Zone::Process() {
|
||||
iterator.RemoveCurrent();
|
||||
}
|
||||
}
|
||||
|
||||
if(adv_data && !did_adventure_actions)
|
||||
{
|
||||
DoAdventureActions();
|
||||
}
|
||||
|
||||
}
|
||||
if(initgrids_timer.Check()) {
|
||||
//delayed grid loading stuff.
|
||||
|
||||
@ -106,6 +106,7 @@ public:
|
||||
inline const uint8 GetZoneType() const { return zone_type; }
|
||||
|
||||
inline Timer* GetInstanceTimer() { return Instance_Timer; }
|
||||
Timer spawn2_timer;
|
||||
|
||||
inline glm::vec3 GetSafePoint() { return m_SafePoint; }
|
||||
inline const uint32& graveyard_zoneid() { return pgraveyard_zoneid; }
|
||||
@ -336,7 +337,6 @@ private:
|
||||
|
||||
Timer autoshutdown_timer;
|
||||
Timer clientauth_timer;
|
||||
Timer spawn2_timer;
|
||||
Timer qglobal_purge_timer;
|
||||
Timer* Weather_Timer;
|
||||
Timer* Instance_Timer;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user