Properly remove movement restriction

* Remove the movement restriction from Longing for Freedom when it becomes active with an Ensemble skill.
This commit is contained in:
aleos 2023-10-13 15:32:41 -04:00
parent 3df537e2a8
commit b759efef25
2 changed files with 10 additions and 0 deletions

View File

@ -1702,6 +1702,8 @@ Body:
CalcFlags: CalcFlags:
Speed: true Speed: true
Aspd: true Aspd: true
States:
NoMove: true
- Status: Hermode - Status: Hermode
Icon: EFST_HERMODE Icon: EFST_HERMODE
DurationLookup: CG_HERMODE DurationLookup: CG_HERMODE

View File

@ -5403,12 +5403,20 @@ void status_calc_state( struct block_list *bl, status_change *sc, std::bitset<SC
|| (sc->getSCE(SC_SPIDERWEB) && sc->getSCE(SC_SPIDERWEB)->val1) || (sc->getSCE(SC_SPIDERWEB) && sc->getSCE(SC_SPIDERWEB)->val1)
|| (sc->getSCE(SC_HIDING) && (bl->type != BL_PC || (pc_checkskill(BL_CAST(BL_PC,bl),RG_TUNNELDRIVE) <= 0))) || (sc->getSCE(SC_HIDING) && (bl->type != BL_PC || (pc_checkskill(BL_CAST(BL_PC,bl),RG_TUNNELDRIVE) <= 0)))
|| (sc->getSCE(SC_DANCING) && sc->getSCE(SC_DANCING)->val4 && ( || (sc->getSCE(SC_DANCING) && sc->getSCE(SC_DANCING)->val4 && (
#ifndef RENEWAL
!sc->getSCE(SC_LONGING) ||
#endif
(sc->getSCE(SC_DANCING)->val1&0xFFFF) == CG_MOONLIT || (sc->getSCE(SC_DANCING)->val1&0xFFFF) == CG_MOONLIT ||
(sc->getSCE(SC_DANCING)->val1&0xFFFF) == CG_HERMODE (sc->getSCE(SC_DANCING)->val1&0xFFFF) == CG_HERMODE
)) ))
|| (sc->getSCE(SC_CRYSTALIZE) && bl->type != BL_MOB) || (sc->getSCE(SC_CRYSTALIZE) && bl->type != BL_MOB)
) )
sc->cant.move += (start ? 1 : ((sc->cant.move) ? -1 : 0)); sc->cant.move += (start ? 1 : ((sc->cant.move) ? -1 : 0));
#ifndef RENEWAL
// Remove movement restriction when Longing for Freedom becomes active with an Ensemble skill.
if (start && sc->getSCE(SC_DANCING) && sc->getSCE(SC_DANCING)->val4 && sc->getSCE(SC_LONGING))
sc->cant.move = 0;
#endif
} }
// Can't use skills // Can't use skills