Solve crash that occurs when selling items not in your loadout item slots. Release Build 7872.

pull/35/head
sigonasr2 9 months ago
parent f8408dc530
commit 686fa7916c
  1. 2
      Adventures in Lestoria/AdventuresInLestoria.cpp
  2. 1
      Adventures in Lestoria/InputHelper.cpp
  3. 2
      Adventures in Lestoria/Key.cpp
  4. 2
      Adventures in Lestoria/Merchant.cpp
  5. 7
      Adventures in Lestoria/TODO.txt
  6. 2
      Adventures in Lestoria/Version.h
  7. BIN
      x64/Release/Adventures in Lestoria.exe

@ -3558,7 +3558,7 @@ void AiL::GetAnyKeyRelease(Key key){
if(InputGroup::menuNamesToInputGroups.count(Menu::menus[NEW_INPUT]->S(A::KEYBIND))){
InputGroup::menuNamesToInputGroups[Menu::menus[NEW_INPUT]->S(A::KEYBIND)]->SetNewPrimaryKeybind(Input{KEY,key});
Menu::alreadyClicked=true;
for(auto&[menuType,menu]:Menu::menus){
for(auto[menuType,menu]:Menu::menus){
menu->helpDisplay.Initialize(menu->inputGroups);
}
Menu::CloseMenu();

@ -48,7 +48,6 @@ INCLUDE_WINDOW_SIZE
InputHelper::InputHelper(){}
void InputHelper::Initialize(MenuInputGroups&inputGroups){
this->inputGroups.clear();
groupData=inputGroups;
}

@ -787,7 +787,7 @@ void InputGroup::RemovePrimaryKeybind(InputType type){
}
void InputGroup::AddPrimaryKeybind(Input key){
keys.insert(key);
keyOrder.insert(keyOrder.begin(),{key.GetType(),key.key});
keyOrder.insert(keyOrder.begin(),key);
}
void InputGroup::SetNewPrimaryKeybind(Input key){
RemovePrimaryKeybind(key.GetType());

@ -225,7 +225,7 @@ void Merchant::SellItem(std::weak_ptr<Item>item,uint32_t amt){
game->GetPlayer()->SetMoney(game->GetPlayer()->GetMoney()+totalCost);
//If we still have some in our inventory, we'll add them back in.
if(Inventory::GetItemCount(itemName)>0){
if(foundLoadoutSlot!=-1&&Inventory::GetItemCount(itemName)>0){
game->SetLoadoutItem(foundLoadoutSlot,itemName);
}

@ -33,5 +33,8 @@ feature to lock accesoires to protect them from selling would be nice
Gorbit99's viewport PGEX
Original Nico Sprite
Inventory scroll bar doesn't reset its size
Address selling of items that are in equipment slots and loadout slots.
Story I-I should not unlock Stage I-II.
Initial Gold Crafting costs does not get subtracted properly.
Menu controls are not properly saved in system settings (only for emscripten?)
The keyboard display controls for the merchant are messed up?

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0
#define VERSION_MINOR 4
#define VERSION_PATCH 2
#define VERSION_BUILD 7871
#define VERSION_BUILD 7872
#define stringify(a) stringify_(a)
#define stringify_(a) #a

Loading…
Cancel
Save