Show / Hide Table of Contents

# Struct MJIManager

Manager struct (?) for Island Sanctuary (internally MJI).

##### Inherited Members

System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)

###### Namespace: FFXIVClientStructs.FFXIV.Client.Game

###### Assembly: FFXIVClientStructs.dll

##### Syntax

    public struct MJIManager

### Fields

| Improve this Doc View Source

#### AllowedVisitors

Represents the currently allowed visitors to the Island Sanctuary.

##### Declaration

    public MJIAllowedVisitors AllowedVisitors

##### Field Value

Type | Description
--- | ---
MJIAllowedVisitors |

| Improve this Doc View Source

#### BuildingPlacements

A struct representing building placements on the Island Sanctuary. Each index represents a specific building slot directly. Refer to MJIBuildingPlacement for more information.

##### Declaration

    public MJIBuildingPlacements BuildingPlacements

##### Field Value

Type | Description
--- | ---
MJIBuildingPlacements |

##### Remarks

This field's exact purpose is currently unknown, but seems to be related to either mapping or rendering logic. To that end, this field doesn't actually seem authoritative for determining what's going on - see Granaries and Workshops for what seems to be used by system logic.

| Improve this Doc View Source

#### CabinGlamour

The current glamour cast on the Cozy Cabin (if any). Relates to the appropriate sub-row in MJIBuilding.

##### Declaration

    public byte CabinGlamour

##### Field Value

Type | Description
--- | ---
System.Byte |

##### Remarks

This field is not offset by one like CabinLevel; Cabin Level 3 will report here as 2.

| Improve this Doc View Source

#### CabinLevel

The current level of the Cozy Cabin for the Island Sanctuary.

##### Declaration

    public byte CabinLevel

##### Field Value

Type | Description
--- | ---
System.Byte |

##### Remarks

This field is offset by 1 compared to the level present in MJIBuildings. Cabin Level 3 will actually have a value of 3 in this field. This is probably because Cabin Level 0 is "nonexistent"..?

| Improve this Doc View Source

#### CraftworksRestDays

An array containing the currently-configured rest days for the Isleworks. Contains values 0 - 13, and is always in order.

##### Declaration

    public byte *CraftworksRestDays

##### Field Value

Type | Description
--- | ---
System.Byte* |

##### Remarks

Like CurrentCycleDay, 0 represents Reset Day. 7, likewise, represents the next reset. This field may not be populated until the Craftworks have been opened at least once.

| Improve this Doc View Source

#### CurrentCycleDay

The current day in the Craftworks cycle, from 0 to 6.

##### Declaration

    public byte CurrentCycleDay

##### Field Value

Type | Description
--- | ---
System.Byte |

##### Remarks

0 represents reset day (Tuesday).

| Improve this Doc View Source

#### CurrentGroove

The current groove level of the Isleworks.

##### Declaration

    public uint CurrentGroove

##### Field Value

Type | Description
--- | ---
System.UInt32 |

##### Remarks

May not be present until the Isleworks is loaded at least once by the player.

| Improve this Doc View Source

#### CurrentMode

The current mode (as listed in MJIHudMode) that the player is in.

##### Declaration

    public uint CurrentMode

##### Field Value

Type | Description
--- | ---
System.UInt32 |

| Improve this Doc View Source

#### CurrentModeItem

The currently-selected item for the player's gathering mode. Will only have a value if the gathering mode in question supports item usage.

##### Declaration

    public uint CurrentModeItem

##### Field Value

Type | Description
--- | ---
System.UInt32 |

| Improve this Doc View Source

#### CurrentPopularity

A reference to the current set of popularity scores given to craftworks on the player's island. The actual popularity scores can be pulled from the MJICraftworksPopularity sheet using this value as a Row ID.

##### Declaration

    public byte CurrentPopularity

##### Field Value

Type | Description
--- | ---
System.Byte |

| Improve this Doc View Source

#### CurrentProgress

The current progress of the player, as represented by MJIProgress. Appears to be bound to the island sanctuary "tutorial" more than anything.

##### Declaration

    public byte CurrentProgress

##### Field Value

Type | Description
--- | ---
System.Byte |

| Improve this Doc View Source

#### CurrentRank

The current Sanctuary Rank of the player's island. Controls what buildings/items/recipes are or aren't available to the player, and represented by MJIRank.

##### Declaration

    public byte CurrentRank

##### Field Value

Type | Description
--- | ---
System.Byte |

| Improve this Doc View Source

#### CurrentXP

The XP earned towards the next Island Sanctuary rank. Resets to 0 upon leveling up the Sanctuary.

##### Declaration

    public uint CurrentXP

##### Field Value

Type | Description
--- | ---
System.UInt32 |

| Improve this Doc View Source

#### Granaries

A struct representing the current state of granaries present on the island. See the struct documentation for more information on how to access this data.

##### Declaration

    public MJIGranaries Granaries

##### Field Value

Type | Description
--- | ---
MJIGranaries |

| Improve this Doc View Source

#### IsPlayerInSanctuary

Reports if the player is currently on the Island Sanctuary.

##### Declaration

    public byte IsPlayerInSanctuary

##### Field Value

Type | Description
--- | ---
System.Byte |

| Improve this Doc View Source

#### LandmarkHoursToCompletion

The current number of hours remaining until a specific Landmark has finished construction.

This value may be zero when there is either no construction or if construction is finished and the landmark needs to be "finalized" by the player.

This array is indexed by the RowID of an MJILandmarkPlace.

##### Declaration

    public byte *LandmarkHoursToCompletion

##### Field Value

Type | Description
--- | ---
System.Byte* |

| Improve this Doc View Source

#### LandmarkIds

The RowID of the MJILandmark present at a specific MJILandmarkPlace.

This array is indexed by the RowID of an MJILandmarkPlace.

##### Declaration

    public byte *LandmarkIds

##### Field Value

Type | Description
--- | ---
System.Byte* |

| Improve this Doc View Source

#### LandmarkPlacements

A struct representing landmark placements on the Island Sanctuary. Each index represents a specific landmark slot directly. Refer to MJILandmarkPlacement for more information.

##### Declaration

    public MJILandmarkPlacements LandmarkPlacements

##### Field Value

Type | Description
--- | ---
MJILandmarkPlacements |

##### Remarks

This field's exact purpose is currently unknown, but seems to be related to either mapping or rendering logic. To that end, this field doesn't actually seem authoritative for determining what's going on - see LandmarkIds et al for what seems to be used by system logic.

| Improve this Doc View Source

#### LandmarkUnderConstruction

The current construction status of a landmark at a specific MJILandmarkPlace.

This array is indexed by the RowID of an MJILandmarkPlace.

##### Declaration

    public byte *LandmarkUnderConstruction

##### Field Value

Type | Description
--- | ---
System.Byte* |

| Improve this Doc View Source

#### LockedPouchItems

An array of booleans representing if a specific item is (un)locked. Locked/unavailable items are set to true, while those that are unlocked are false. This array is indexed by RowID from the MJIItemPouch table. An item appears to be unlocked upon being gathered or crafted for the first time. IsPouchItemLocked(UInt16)

##### Declaration

    public byte *LockedPouchItems

##### Field Value

Type | Description
--- | ---
System.Byte* |

| Improve this Doc View Source

#### NextPopularity

A reference to the next cycle's popularity scores (called "predicted demand" in-game). Follows the same rules as CurrentPopularity.

##### Declaration

    public byte NextPopularity

##### Field Value

Type | Description
--- | ---
System.Byte |

| Improve this Doc View Source

#### SupplyAndDemandShifts

An array of bytes representing the current supply and demand shift for each craftwork that the player can create. Information for a specific item can be retrieved by querying the RowID for the item under inspection.
The current supply value is stored in the upper half of each byte, while the current demand shift is stored in the lower half.

##### Declaration

    public byte *SupplyAndDemandShifts

##### Field Value

Type | Description
--- | ---
System.Byte* |

| Improve this Doc View Source

#### UnlockedKeyItems

A bitfield representing all unlocked key items (MJIKeyItem) for the player. Backing field for IsKeyItemUnlocked(UInt16), which should be used where possible.

##### Declaration

    public ushort UnlockedKeyItems

##### Field Value

Type | Description
--- | ---
System.UInt16 |

##### Remarks

The index of this field will be (RowID - 1), so "Islekeep's Stone Hatchet" appears at position 0.

| Improve this Doc View Source

#### UnlockedRecipes

A bitfield representing if a specific recipe (MJIRecipe) is unlocked. Backing field for IsRecipeUnlocked(UInt16), which should be used where possible.

##### Declaration

    public byte *UnlockedRecipes

##### Field Value

Type | Description
--- | ---
System.Byte* |

| Improve this Doc View Source

#### VillageDevelopmentLevel

The current development level of the player's village on their island. Controls what building zones are available.

##### Declaration

    public byte VillageDevelopmentLevel

##### Field Value

Type | Description
--- | ---
System.Byte |

##### Remarks

Allowed building locations are part of the MJIBuildingPlace (+0x10) and MJILandmarkPlace (+0x10) Lumina sheets.

| Improve this Doc View Source

#### Workshops

A struct representing the current state of workshops present on the island. See the struct documentation for more information on how to access this data.

Note that this struct only provides mapping from a workshop ID to other data. If information about a building at a specific location is desired, it may be better to use et al.

##### Declaration

    public MJIWorkshops Workshops

##### Field Value

Type | Description
--- | ---
MJIWorkshops |

### Methods

| Improve this Doc View Source

#### GetDemandShiftForCraftwork(UInt32)

Return the Demand Shift value for a specified craftwork.

##### Declaration

    public CraftworkDemandShift GetDemandShiftForCraftwork(uint itemId)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt32 | itemId | The Craftwork ID to look up

##### Returns

Type | Description
--- | ---
CraftworkDemandShift | Returns an enum value.

| Improve this Doc View Source

#### GetSupplyForCraftwork(UInt32)

Return the Supply value for a specified craftwork.

##### Declaration

    public CraftworkSupply GetSupplyForCraftwork(uint itemId)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt32 | itemId | The Craftwork ID to look up

##### Returns

Type | Description
--- | ---
CraftworkSupply | Returns an enum value.

| Improve this Doc View Source

#### Instance()

##### Declaration

    public static MJIManager*Instance()

##### Returns

Type | Description
--- | ---
MJIManager* |

| Improve this Doc View Source

#### IsKeyItemUnlocked(UInt16)

Check if a specific MJIKeyItem is unlocked by the player.

##### Declaration

    public bool IsKeyItemUnlocked(ushort keyItemId)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt16 | keyItemId | The RowID of the MJIKeyItem to check.

##### Returns

Type | Description
--- | ---
System.Boolean | Returns true if the key item is unlocked.

##### Remarks

This is manually implemented as the only place this key item check actually seems to exist in the code is (frustratingly) not within MJIManager. See

    E8 ?? ?? ?? ?? 84 C0 74 61 48 85 DB

for the reference(-ish) implementation used here.
| Improve this Doc View Source

#### IsPouchItemLocked(UInt16)

##### Declaration

    public bool IsPouchItemLocked(ushort itemId)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt16 | itemId |

##### Returns

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### IsRecipeUnlocked(UInt16)

##### Declaration

    public bool IsRecipeUnlocked(ushort recipeId)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt16 | recipeId |

##### Returns

Type | Description
--- | ---
System.Boolean |