From 168bed979af72ab1610dfdabda027a9ae3e12491 Mon Sep 17 00:00:00 2001 From: WinterSolstice8 <60417494+wintersolstice8@users.noreply.github.com> Date: Fri, 17 Jan 2025 19:16:11 -0700 Subject: [PATCH] [core] [lua] Force luopans to be unable to move --- scripts/globals/pets/luopan.lua | 2 ++ src/map/ai/controllers/pet_controller.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/scripts/globals/pets/luopan.lua b/scripts/globals/pets/luopan.lua index b78311048c0..2e4f4b1743c 100644 --- a/scripts/globals/pets/luopan.lua +++ b/scripts/globals/pets/luopan.lua @@ -10,6 +10,8 @@ xi.pets.luopan.onMobSpawn = function(mob) mob:timer(600000, function(mobArg) mobArg:setHP(0) end) + + mob:setMod(xi.mod.MOVE_SPEED_OVERRIDE, 256) -- this mod > 255 = no movement end xi.pets.luopan.onMobDeath = function(mob) diff --git a/src/map/ai/controllers/pet_controller.cpp b/src/map/ai/controllers/pet_controller.cpp index 01dcc8d01e7..db70a13a2a4 100644 --- a/src/map/ai/controllers/pet_controller.cpp +++ b/src/map/ai/controllers/pet_controller.cpp @@ -105,6 +105,10 @@ void CPetController::DoRoamTick(time_point tick) return; } } + else if (PetEntity->m_PetID == PETID_LUOPAN) // Luopans do nothing + { + return; + } } float currentDistance = distance(PPet->loc.p, PPet->PMaster->loc.p);