Skip to content

Commit

Permalink
fix: ability to set InstancingOptions properties (#1657)
Browse files Browse the repository at this point in the history
* The server's InstancingOptions properties couldn't be set through their .json files, this commit fixes this behavior by allowing the user to input values other than the default ones.
* chore: removes unused property "RegenManaOnInstanceDeath" since is not really implemented (yet?).
  • Loading branch information
Arufonsu committed Nov 10, 2022
1 parent 5e91f2a commit c5c74cd
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions Intersect (Core)/Config/InstancingOptions.cs
Expand Up @@ -12,40 +12,35 @@ public partial class InstancingOptions
/// <summary>
/// Whether or not dieing in a shared instance "respawns" you at the instance entrance. Useful for dungeon implementations
/// </summary>
public bool SharedInstanceRespawnInInstance { get; } = true;
public bool SharedInstanceRespawnInInstance { get; set; } = true;

/// <summary>
/// Whether a player that leaves a shared instance can come back in to that instance after leaving.
/// </summary>
public bool RejoinableSharedInstances { get; } = false;
public bool RejoinableSharedInstances { get; set; } = false;

/// <summary>
/// How many lives a party has in a shared instance, if enabled
/// </summary>
public int MaxSharedInstanceLives { get; } = DefaultInstanceLives;
public int MaxSharedInstanceLives { get; set; } = DefaultInstanceLives;

/// <summary>
/// Whether or not all party members get booted out of an instance on lives reaching -1
/// </summary>
public bool BootAllFromInstanceWhenOutOfLives { get; } = true;
public bool BootAllFromInstanceWhenOutOfLives { get; set; } = true;

/// <summary>
/// Whether or not you lose experience on death in a shared instance
/// </summary>
public bool LoseExpOnInstanceDeath { get; } = false;

/// <summary>
/// Whether or not you regenerate mana on instance death
/// </summary>
public bool RegenManaOnInstanceDeath { get; } = false;
public bool LoseExpOnInstanceDeath { get; set; } = false;

[OnDeserialized]
internal void OnDeserializedMethod(StreamingContext context)
{
Validate();
}

public void Validate()
private void Validate()
{
}
}
Expand Down

0 comments on commit c5c74cd

Please sign in to comment.