mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 05:56:39 +00:00 
			
		
		
		
	removed set sizes, consted sizes, added itemleveledlist check
This commit is contained in:
		
							parent
							
								
									1da56e1790
								
							
						
					
					
						commit
						f04a727af6
					
				
					 4 changed files with 37 additions and 48 deletions
				
			
		| 
						 | 
					@ -10,36 +10,20 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CSMTools::ReferenceableCheckStage::ReferenceableCheckStage(const CSMWorld::RefIdData& referenceable) :
 | 
					CSMTools::ReferenceableCheckStage::ReferenceableCheckStage(const CSMWorld::RefIdData& referenceable) :
 | 
				
			||||||
    mReferencables(referenceable),
 | 
					    mReferencables(referenceable),
 | 
				
			||||||
    mBooksSize(0),
 | 
					    mBooksSize(mReferencables.getBooks().getSize()),
 | 
				
			||||||
    mActivatorsSize(0),
 | 
					    mActivatorsSize(mReferencables.getActivators().getSize()),
 | 
				
			||||||
    mPotionsSize(0),
 | 
					    mPotionsSize(mReferencables.getPotions().getSize()),
 | 
				
			||||||
    mApparatiSize(0),
 | 
					    mApparatiSize(mReferencables.getApparati().getSize()),
 | 
				
			||||||
    mArmorsSzie(0),
 | 
					    mArmorsSzie(mReferencables.getArmors().getSize()),
 | 
				
			||||||
    mClothingSize(0),
 | 
					    mClothingSize(mReferencables.getClothing().getSize()),
 | 
				
			||||||
    mContainersSize(0),
 | 
					    mContainersSize(mReferencables.getContainers().getSize()),
 | 
				
			||||||
    mCreaturesSize(0),
 | 
					    mCreaturesSize(mReferencables.getCreatures().getSize()),
 | 
				
			||||||
    mDoorsSize(0),
 | 
					    mDoorsSize(mReferencables.getDoors().getSize()),
 | 
				
			||||||
    mIngredientsSize(0),
 | 
					    mIngredientsSize(mReferencables.getIngredients().getSize()),
 | 
				
			||||||
    mCreaturesLevListsSize(0),
 | 
					    mCreaturesLevListsSize(mReferencables.getCreatureLevelledLists().getSize()),
 | 
				
			||||||
    mItemLevelledListsSize(0)
 | 
					    mItemLevelledListsSize(mReferencables.getItemLevelledList().getSize()),
 | 
				
			||||||
 | 
					    mLightsSize(mReferencables.getLights().getSize())
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    setSizeVariables();
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void CSMTools::ReferenceableCheckStage::setSizeVariables()
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    mBooksSize = mReferencables.getBooks().getSize();
 | 
					 | 
				
			||||||
    mActivatorsSize = mReferencables.getActivators().getSize();
 | 
					 | 
				
			||||||
    mPotionsSize = mReferencables.getPotions().getSize();
 | 
					 | 
				
			||||||
    mApparatiSize = mReferencables.getApparati().getSize();
 | 
					 | 
				
			||||||
    mArmorsSzie = mReferencables.getArmors().getSize();
 | 
					 | 
				
			||||||
    mClothingSize = mReferencables.getClothing().getSize();
 | 
					 | 
				
			||||||
    mContainersSize = mReferencables.getContainers().getSize();
 | 
					 | 
				
			||||||
    mCreaturesSize = mReferencables.getCreatures().getSize();
 | 
					 | 
				
			||||||
    mDoorsSize = mReferencables.getDoors().getSize();
 | 
					 | 
				
			||||||
    mIngredientsSize = mReferencables.getIngredients().getSize();
 | 
					 | 
				
			||||||
    mCreaturesLevListsSize = mReferencables.getCreatureLevelledLists().getSize();
 | 
					 | 
				
			||||||
    mItemLevelledListsSize = mReferencables.getItemLevelledList().getSize();
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void CSMTools::ReferenceableCheckStage::perform(int stage, std::vector< std::string >& messages)
 | 
					void CSMTools::ReferenceableCheckStage::perform(int stage, std::vector< std::string >& messages)
 | 
				
			||||||
| 
						 | 
					@ -647,7 +631,7 @@ void CSMTools::ReferenceableCheckStage::mItemLevelledListCheck(int stage, const
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const ESM::ItemLevList& ItemLevList = (static_cast<const CSMWorld::Record<ESM::ItemLevList>& >(baserecord)).get();
 | 
					    const ESM::ItemLevList& ItemLevList = (static_cast<const CSMWorld::Record<ESM::ItemLevList>& >(baserecord)).get();
 | 
				
			||||||
    CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_ItemLevelledList, CreatureLevList.mId);
 | 
					    CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_ItemLevelledList, ItemLevList.mId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (int i = 0; i < ItemLevList.mList.size(); ++i)
 | 
					    for (int i = 0; i < ItemLevList.mList.size(); ++i)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,23 +30,22 @@ namespace CSMTools
 | 
				
			||||||
	    void creaturesLevListCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::CreatureLevList>& records, std::vector<std::string>& messages);
 | 
						    void creaturesLevListCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::CreatureLevList>& records, std::vector<std::string>& messages);
 | 
				
			||||||
	    void mItemLevelledListCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::ItemLevList>& records, std::vector<std::string>& messages);
 | 
						    void mItemLevelledListCheck(int stage, const CSMWorld::RefIdDataContainer<ESM::ItemLevList>& records, std::vector<std::string>& messages);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            void setSizeVariables();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            const CSMWorld::RefIdData mReferencables;
 | 
					            const CSMWorld::RefIdData mReferencables;
 | 
				
			||||||
	    
 | 
						    
 | 
				
			||||||
	    //SIZES OF CONCRETE TYPES
 | 
						    //SIZES OF CONCRETE TYPES
 | 
				
			||||||
            int mBooksSize;
 | 
					            const int mBooksSize;
 | 
				
			||||||
            int mActivatorsSize;
 | 
					            const int mActivatorsSize;
 | 
				
			||||||
            int mPotionsSize;
 | 
					            const int mPotionsSize;
 | 
				
			||||||
	    int mApparatiSize;
 | 
						    const int mApparatiSize;
 | 
				
			||||||
	    int mArmorsSzie;
 | 
						    const int mArmorsSzie;
 | 
				
			||||||
	    int mClothingSize;
 | 
						    const int mClothingSize;
 | 
				
			||||||
	    int mContainersSize;
 | 
						    const int mContainersSize;
 | 
				
			||||||
	    int mCreaturesSize;
 | 
						    const int mCreaturesSize;
 | 
				
			||||||
	    int mDoorsSize;
 | 
						    const int mDoorsSize;
 | 
				
			||||||
	    int mIngredientsSize;
 | 
						    const int mIngredientsSize;
 | 
				
			||||||
	    int mCreaturesLevListsSize;
 | 
						    const int mCreaturesLevListsSize;
 | 
				
			||||||
	    int mItemLevelledListsSize;
 | 
						    const int mItemLevelledListsSize;
 | 
				
			||||||
 | 
						    const int mLightsSize;
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif // REFERENCEABLECHECKSTAGE_H
 | 
					#endif // REFERENCEABLECHECKSTAGE_H
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -291,3 +291,8 @@ const CSMWorld::RefIdDataContainer< ESM::ItemLevList >& CSMWorld::RefIdData::get
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return mItemLevelledLists;
 | 
					    return mItemLevelledLists;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const CSMWorld::RefIdDataContainer< ESM::Light >& CSMWorld::RefIdData::getLights() const
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    return mLights;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -233,6 +233,7 @@ namespace CSMWorld
 | 
				
			||||||
	    const RefIdDataContainer<ESM::Ingredient>& getIngredients() const;
 | 
						    const RefIdDataContainer<ESM::Ingredient>& getIngredients() const;
 | 
				
			||||||
	    const RefIdDataContainer<ESM::CreatureLevList>& getCreatureLevelledLists() const;
 | 
						    const RefIdDataContainer<ESM::CreatureLevList>& getCreatureLevelledLists() const;
 | 
				
			||||||
	    const RefIdDataContainer<ESM::ItemLevList>& getItemLevelledList() const;
 | 
						    const RefIdDataContainer<ESM::ItemLevList>& getItemLevelledList() const;
 | 
				
			||||||
 | 
						    const RefIdDataContainer<ESM::Light>& getLights() const;
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue