HorizonFFXI / HorizonXI-Issues

Issue Tracker for HorizonXI
14 stars 1 forks source link

🐛[BUG][NPC] Cop 3-5 Darkness named issues #1611

Open TristtHXI opened 1 year ago

TristtHXI commented 1 year ago

What does this bug affect? The diremites below the battlefield dont agro if you fall down, also if a pet falls down, the pet can still attack diablos, our pet got hate after a while doing that, then diablos drew us all in, including the brd that dropped down.

dallano commented 1 year ago

Issue lies in what tracent pointed out: "these diremites currently do not aggro -- because they think cannot see the player (specifically CMobController::CanSeePoint fails)"

siknoz commented 1 year ago

So, I actually did some testing on this, the reason it cannot see the player is because we have the incorrect spawn points. To test this -

Battlefield 1 (I haven't checked points for 2 and 3 but presumably the same thing) INSERT INTO mob_spawn_points VALUES (16818178,'Diremite','Diremite',2,-243.367,-17.244,290.055,139); INSERT INTO mob_spawn_points VALUES (16818179,'Diremite','Diremite',2,-233.889,-17.245,279.957,36); INSERT INTO mob_spawn_points VALUES (16818180,'Diremite','Diremite',2,-239.323,-17.227,280.312,63); INSERT INTO mob_spawn_points VALUES (16818181,'Diremite','Diremite',2,-244.794,-17.244,286.114,72); INSERT INTO mob_spawn_points VALUES (16818182,'Diremite','Diremite',2,-239.666,-17.244,289.353,197); INSERT INTO mob_spawn_points VALUES (16818183,'Diremite','Diremite',2,-234.289,-17.248,286.192,56);

change to this - INSERT INTO mob_spawn_points VALUES (16818178,'Diremite','Diremite',2,-243.367,-16,290.055,139); INSERT INTO mob_spawn_points VALUES (16818179,'Diremite','Diremite',2,-233.889,-16,279.957,36); INSERT INTO mob_spawn_points VALUES (16818180,'Diremite','Diremite',2,-239.323,-16,280.312,63); INSERT INTO mob_spawn_points VALUES (16818181,'Diremite','Diremite',2,-244.794,-16,286.114,72); INSERT INTO mob_spawn_points VALUES (16818182,'Diremite','Diremite',2,-239.666,-16,289.353,197); INSERT INTO mob_spawn_points VALUES (16818183,'Diremite','Diremite',2,-234.289,-16,286.192,56);

then they will aggro as normal.

For bonus points if you want - can add this to the diremite.lua under onMobFight function -

if target:getYPos() < -30 and target:getXPos() > -246 then
    mob:setMobMod(xi.mobMod.NO_AGGRO, 1)
    mob:disengage()
    mob:setPos(mob:getSpawnPos().x, mob:getSpawnPos().y, mob:getSpawnPos().z)
end

will also need to set this in onMobRoam

mob:setMobMod(xi.mobMod.NO_AGGRO, 0)

This will make it so that the Diremites will aggro and chase to the stairs but once you reach the top of the stairs they will "reset" back to the pit.

For Diabolos you can set this in onMobFight and if somehow Diabolos falls into the pit it will put him back up top so the party doesn't need to drop into the pit.

if mob:getYPos() >= -30.5 then
    mob:setPos(mob:getSpawnPos().x, mob:getSpawnPos().y, mob:getSpawnPos().z)
end

If nobody else does it I'll eventually get around to making a PR for it but been busy tinkering with things...