LandSandBoat / server

:sailboat: LandSandBoat - a server emulator for Final Fantasy XI
https://landsandboat.github.io/server/
GNU General Public License v3.0
299 stars 603 forks source link

🐛 /heal not working? #2851

Closed Zofra2020 closed 2 years ago

Zofra2020 commented 2 years ago

OS / platform the server is running (if known)

Window 11

Branch affected by issue

base

Steps to reproduce

After I fight with Boreal Tiger and Boreal Hound, my party got hurt and was working to heal for 3rd fight but it seems not working? The newest update patch(10/1/22) made them broken or some spells or something from those NM's makes /heal not working after fighting? As you can see I timed on each screenshot.. about 2 minutes 30 second apart from those screenshots and not healed at all.

Expected behavior

should able to /heal hp and mp time 1 time 2

WinterSolstice8 commented 2 years ago

probably had disease from rot gas https://www.bg-wiki.com/ffxi/Category:Hound https://www.bg-wiki.com/ffxi/Disease

Zofra2020 commented 2 years ago

image They have no disease icon so maybe it makes that heal hp/mp not working until log out? Edit: I just tested to relog, doesn't work.

WinterSolstice8 commented 2 years ago

Dunno if this is your server, but what's HEALING_TICK_DELAY set to in settings\map.lua?

I can heal no problem on unmodified base

Zofra2020 commented 2 years ago

yes it is my server. image

WinterSolstice8 commented 2 years ago

do you have a character with GM?

target a player effected and use this command from your gm char's chatbox !exec print(target:hasStatusEffect(xi.effect.HEALING))

that will print true or false to your server's console. true means they've already got the status effect, which they shouldn't have it just trying to rule things out

WinterSolstice8 commented 2 years ago

!exec print(target:getStatusEffects()) is another one that will just print all status effects of a target to the log. For instance, this is what I see when I am /healing

[10/01/22 16:34:42:673][map][lua] table{ CLuaStatusEffect(794) } (lua_print:157)

WinterSolstice8 commented 2 years ago

More debugging commands for you to try,

!exec print(target:getMod(xi.mod.HPHEAL)) this is the "Healed HP+" mod, which can be negative in theory. Should print 0 naked without any status effects.

when healing: !exec print(target:getStatusEffect(xi.effect.HEALING):getTick()) prints 10,000 for me, which I guess is that "tick delay" config.

WinterSolstice8 commented 2 years ago

And finally, something you don't need a GM char for:

Open scripts\globals\effects\healing.lua

modify the on effect tick function:

effect_object.onEffectTick = function(target, effect)
    local healtime = effect:getTickCount()

    if healtime > 2 then
        print("healing effect tick before status effect check")
        -- curse II also known as "zombie"
        if not(target:hasStatusEffect(xi.effect.DISEASE)) and target:hasStatusEffect(xi.effect.PLAGUE) == false and target:hasStatusEffect(xi.effect.CURSE_II) == false then
            print("healing effect tick after status effect check")

This covers everything I can think of without more input about what might be wrong.

TeoTwawki commented 2 years ago

does the game stand your char back down or do you rest forever with nothing happening?

sounds like the latter, just being sure

Zofra2020 commented 2 years ago

Sorry I was away for couple hours. image

Zofra2020 commented 2 years ago

I can stand or sit... I can sit forever and not heal at all.

WinterSolstice8 commented 2 years ago

Aha, I think you just need to rebuild xi_map. That was a recent addition https://github.com/LandSandBoat/server/pull/2742

It adds a core binding, which you can't get just from lua updates.

Zofra2020 commented 2 years ago

Yep that is it. I rebuild with vs 2022 and now it works

I guess close this?

Should I be rebuilding every time after getting lua updates through powershell?