Skip to content

Commit

Permalink
Ensure that currency is always in inventory on login
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed May 31, 2024
1 parent bfab277 commit cd845c1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions EOLib/Domain/Login/LoginActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ public async Task<WelcomeCode> CompleteCharacterLogin(int sessionID)
.WithRenderProperties(CharacterRenderProperties.FromCharacterMapInfo(mainCharacter));

_characterInventoryRepository.ItemInventory = new HashSet<InventoryItem>(data.Items.Select(InventoryItem.FromNet));
if (!_characterInventoryRepository.ItemInventory.Any(x => x.ItemID == 1))
_characterInventoryRepository.ItemInventory.Add(new InventoryItem(1, 0));

_characterInventoryRepository.SpellInventory = new HashSet<InventorySpell>(data.Spells.Select(InventorySpell.FromNet));

_currentMapStateRepository.Characters = new MapEntityCollectionHashSet<Character.Character>(
Expand Down

0 comments on commit cd845c1

Please sign in to comment.