-
Notifications
You must be signed in to change notification settings - Fork 230
Add ZoneInitPacket and handler #1767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
FFXIVClientStructs/FFXIV/Client/Game/Network/ZoneInitPacket.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| namespace FFXIVClientStructs.FFXIV.Client.Game.Network; | ||
|
|
||
| [GenerateInterop] | ||
| [StructLayout(LayoutKind.Explicit, Size = 0x88)] | ||
| public partial struct ZoneInitPacket { | ||
| [FieldOffset(0x00)] public ushort ServerId; | ||
| [FieldOffset(0x02)] public ushort TerritoryTypeId; | ||
| [FieldOffset(0x04)] public ushort Instance; // only when IsInstancedArea is true | ||
| [FieldOffset(0x06)] public ushort ContentFinderConditionId; | ||
| [FieldOffset(0x08)] public uint TransitionTerritoryFilterKey; | ||
| [FieldOffset(0x0C)] public uint PopRangeId; // InstanceId in the PlanMap lgb | ||
| [FieldOffset(0x10)] public byte WeatherId; | ||
|
|
||
| [FieldOffset(0x12)] public ZoneInitFlags Flags; | ||
|
|
||
| [FieldOffset(0x15)] private byte UnkInputTimerFlags; // flags set to InputTimerModule+0x4F4 | ||
|
|
||
| [FieldOffset(0x20)] public uint RankedCrystallineConflictHostingDataCenterId; // WorldDCGroupType RowId | ||
| [FieldOffset(0x24)] public bool IsLimitedTimeBonusActive; | ||
|
|
||
| // Saved to GameMain, used by various systems like LayoutManager, WeatherManager, EventHandlers etc. for how things should look | ||
| [FieldOffset(0x26), FixedSizeArray] internal FixedSizeArray8<ushort> _gameFestivalIds; | ||
| [FieldOffset(0x36), FixedSizeArray] internal FixedSizeArray8<ushort> _gameFestivalPhases; | ||
| // Saved to PlayerState, used by UI systems like ContentsFinder, AgentHalloweenNpcSelect, AgentFriendlist (for "Invite Friend to Return") and lua scripts for what options should be displayed | ||
| [FieldOffset(0x46), FixedSizeArray] internal FixedSizeArray8<ushort> _uiFestivalIds; | ||
| [FieldOffset(0x56), FixedSizeArray] internal FixedSizeArray8<ushort> _uiFestivalPhases; | ||
|
|
||
| // Used for camera and streaming layout | ||
| [FieldOffset(0x68)] public float PositionX; | ||
| [FieldOffset(0x6C)] public float PositionY; | ||
| [FieldOffset(0x70)] public float PositionZ; | ||
| [FieldOffset(0x74), FixedSizeArray] internal FixedSizeArray11<byte> _contentRouletteRoleBonuses; // ContentsRouletteRole[11] | ||
| [FieldOffset(0x80), FixedSizeArray] internal FixedSizeArray2<int> _penaltyTimestamps; | ||
| } | ||
|
|
||
| [Flags] | ||
| public enum ZoneInitFlags : ushort { | ||
| None = 0, | ||
| IsInitialLogin = 1 << 0, | ||
| Unknown1 = 1 << 1, | ||
| Unknown2 = 1 << 2, | ||
| IsCrossWorld = 1 << 3, | ||
| IsFlyingEnabled = 1 << 4, | ||
| Unknown5 = 1 << 5, | ||
| Unknown6 = 1 << 6, | ||
| IsInstancedArea = 1 << 7, | ||
| Unknown8 = 1 << 8, | ||
| Unknown9 = 1 << 9, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly like the other ones where it is only set to true if it is replay and false if not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a boolean. Has values 0-3. I don't know what it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From looking into it a bit seems to be tied to if it has to handle
Instancefrom the ZoneInitPacket (value 3) and what ever setsfield_734in ContentsReplayManager to< 0x40(value 2) and>= 0x40(value 1)