mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-20 17:58:20 +00:00
add rule and consolidate logic
This commit is contained in:
+9
-7
@@ -596,13 +596,15 @@ bool NPC::Process()
|
||||
}
|
||||
|
||||
// If mobs are under the world, move them back to spawn point.
|
||||
if (!IsEngaged() && IsTrackable()) {
|
||||
if (GetZ() <= zone->newzone_data.underworld) {
|
||||
if (respawn2) {
|
||||
Teleport(glm::vec3(respawn2->GetX(), respawn2->GetY(), respawn2->GetZ()));
|
||||
SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0, true);
|
||||
}
|
||||
}
|
||||
if (
|
||||
RuleB(NPC, ResetUnderworldMobsToSpawn) &&
|
||||
!IsEngaged() &&
|
||||
IsTrackable() &&
|
||||
GetZ() <= zone->newzone_data.underworld &&
|
||||
respawn2
|
||||
) {
|
||||
Teleport(glm::vec3(respawn2->GetX(), respawn2->GetY(), respawn2->GetZ()));
|
||||
SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0, true);
|
||||
}
|
||||
|
||||
SpellProcess();
|
||||
|
||||
Reference in New Issue
Block a user