Fix bugs with static containers not being reset between unit test runs. Add in player test checks for seeded damage reduction test.

This commit is contained in:
2024-06-25 16:51:52 -05:00
parent 6cb67ccaa6
commit fd62ab749c
4 changed files with 33 additions and 1 deletions
+5
View File
@@ -162,6 +162,10 @@ public:
const std::vector<std::pair<int,Stats>>&GetSetBonusBreakpoints()const;
};
namespace PlayerTests{
class PlayerTest;
};
class Item{
friend class Inventory;
friend class AiL;
@@ -169,6 +173,7 @@ class Item{
friend class SaveFile;
friend void Merchant::PurchaseItem(IT item,uint32_t amt);
friend void Merchant::SellItem(std::weak_ptr<Item>,uint32_t amt);
friend class PlayerTests::PlayerTest;
private:
//The amount in the current item stack.
uint32_t amt;
+9
View File
@@ -81,6 +81,15 @@ Menu::Menu(vf2d pos,vf2d size)
}
void Menu::InitializeMenus(){
std::for_each(menus.begin(),menus.end(),[](std::pair<MenuType,Menu*>data){delete data.second;}); //EW RAW POINTER.
menus.clear();
for(auto&[key,value]:DATA["ItemCategory"].GetKeys()){
inventoryListeners[key].clear();
merchantInventoryListeners[key].clear();
}
equipStatListeners.clear();
chapterListeners.clear();
stack.clear();
stack.reserve(MAX_MENUS);
InitializeConsumableInventoryWindow();
InitializeClassSelectionWindow();
+1 -1
View File
@@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
#define VERSION_PATCH 3
#define VERSION_BUILD 9840
#define VERSION_BUILD 9849
#define stringify(a) stringify_(a)
#define stringify_(a) #a