Skip to content

[cpp] Enable cutscene immunity on zone-in events#10059

Merged
Xaver-DaRed merged 1 commit into
LandSandBoat:basefrom
Nobutadas:zone-in-event-cutscene
May 19, 2026
Merged

[cpp] Enable cutscene immunity on zone-in events#10059
Xaver-DaRed merged 1 commit into
LandSandBoat:basefrom
Nobutadas:zone-in-event-cutscene

Conversation

@Nobutadas
Copy link
Copy Markdown
Contributor

This enables the cutscene immunity using setLocked. It also adds in invisibility until the cutscene is done.

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

This code change effects all zone-in events. It does two things:

  • Sets the zone-in event to act like a Cutscene by setting PChar->setLocked(true). setLocked(true) removes emnity and makes it so you can not be targeted by single-target attacks and friendly spells.
  • While in a zone-in event, the player is invisible to the other players.

charentity.h: Added m_zoneInCutscene bool for the state.
charentity.cpp: Set the default m_zoneInCutscene state to false.
event_info.h: Updated the reset to have the default type reset back to NORMAL.
luautils.cpp: Sets the m_zoneInCutscene to false as a fail safe. Then checks for a zone-in event and sets locked, type, and state.
char_update.cpp: Updates the packet to other players to set the visibility of the player based on the m_zoneInCutscene bool.

Steps to test these changes

You need two characters to test this. They should be in the same party.

  • Check zone-in events. The easiest one to get to is Windurst 1-2. As a Windurst affiliated character, do !addmission 2 1. Make sure you are not in East Sarutabaruta, then do !setmissionstatus 5 2. Zone into East Sarutabaruta at the same location your second character is so you can observe.
  • Check if a non zone-in event handles normally. Zone into anywhere and make sure you are vulnerable and visible to your second character.

@Nobutadas Nobutadas force-pushed the zone-in-event-cutscene branch from dae25c2 to 604521d Compare May 18, 2026 18:43
@claywar
Copy link
Copy Markdown
Contributor

claywar commented May 18, 2026

I'm curious, since there's no aggressive mobs in range of the zone line, are there other test areas you've witnessed that can cause issues? Also, what caused it in your scenario?

@Nobutadas
Copy link
Copy Markdown
Contributor Author

Nobutadas commented May 18, 2026

I'm curious, since there's no aggressive mobs in range of the zone line, are there other test areas you've witnessed that can cause issues? Also, what caused it in your scenario?

I'm working on Event Skipped. One of the issues with my Event Skipped change, is players need to be marked as in cutscenes or else the Event Skip will apply when a player casts a friendly buff (Cure, Protect, etc.), so this isn't just about enemies.

Right now, the event cutscene, progressCutscene, and progressOptionalCutscene set m_islocked which makes the player untargetable and is the basis for the Event Skipped I'm working on. I'm currently going through and fixing all the edge cases where the player was not correctly set as in a cutscene. The problem calls are in mission and quest lua files, but this is one of those edge cases where the event is called using zoneIn instead of Mission:progressCutscene. I needed to update zoneIn events to match cutscene events.

I added in the invisibility for zone-in events at the same time to match retail.

If you need another zone location with enemies, I could probably find one. There are a lot of zone-in events in the Windurst mission line. But again, this is mostly to prevent friendly buffs.

Comment thread src/map/lua/luautils.cpp Outdated
This enables the cutscene immunity using setLocked. It also adds in invisibility until the cutscene is done.
@Nobutadas Nobutadas force-pushed the zone-in-event-cutscene branch from 604521d to faba088 Compare May 18, 2026 20:30
@Xaver-DaRed Xaver-DaRed merged commit 5a6854c into LandSandBoat:base May 19, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants