Skip to content

Commit

Permalink
Set JailMap during login
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed Mar 29, 2022
1 parent 4491547 commit e671401
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions EOLib/Domain/Login/LoginActions.cs
Expand Up @@ -111,6 +111,7 @@ public async Task<short> RequestCharacterLogin(ICharacter character)

_playerInfoRepository.IsFirstTimePlayer = data.FirstTimePlayer;
_currentMapStateRepository.CurrentMapID = data.MapID;
_currentMapStateRepository.JailMapID = data.JailMap;

_paperdollRepository.VisibleCharacterPaperdolls[data.SessionID] = new PaperdollData()
.WithName(data.Name)
Expand Down
7 changes: 7 additions & 0 deletions EOLib/Domain/Map/CurrentMapStateRepository.cs
Expand Up @@ -11,6 +11,8 @@ public interface ICurrentMapStateRepository

bool ShowMiniMap { get; set; }

short JailMapID { get; set; }

Dictionary<int, ICharacter> Characters { get; set; }

HashSet<INPC> NPCs { get; set; }
Expand All @@ -36,6 +38,8 @@ public interface ICurrentMapStateProvider

bool ShowMiniMap { get; }

short JailMapID { get; }

IReadOnlyDictionary<int, ICharacter> Characters { get; }

IReadOnlyCollection<INPC> NPCs { get; }
Expand All @@ -62,6 +66,8 @@ public class CurrentMapStateRepository : ICurrentMapStateRepository, ICurrentMap

public bool ShowMiniMap { get; set; }

public short JailMapID { get; set; }

public Dictionary<int, ICharacter> Characters { get; set; }

public HashSet<INPC> NPCs { get; set; }
Expand Down Expand Up @@ -101,6 +107,7 @@ public void ResetState()
{
CurrentMapID = 0;
ShowMiniMap = false;
JailMapID = 0;

Characters = new Dictionary<int, ICharacter>();
NPCs = new HashSet<INPC>();
Expand Down

0 comments on commit e671401

Please sign in to comment.