@ -49,7 +49,7 @@ void printAIPackage(ESM::AIPackage p)
std : : cout < < " BadPackage: " < < boost : : format ( " 0x%08x " ) % p . mType < < std : : endl ;
}
if ( p . mCellName ! = " " )
if ( ! p . mCellName . empty ( ) )
std : : cout < < " Cell Name: " < < p . mCellName < < std : : endl ;
}
@ -130,43 +130,41 @@ std::string ruleString(ESM::DialInfo::SelectStruct ss)
void printEffectList ( ESM : : EffectList effects )
{
int i = 0 ;
std : : vector < ESM : : ENAMstruct > : : iterator eit ;
for ( eit = effects . mList . begin ( ) ; eit ! = effects . mList . end ( ) ; + + eit )
{
std : : cout < < " Effect[ " < < i < < " ]: " < < magicEffectLabel ( eit - > mEffectID )
< < " ( " < < eit - > mEffectID < < " ) " < < std : : endl ;
if ( eit - > mSkill ! = - 1 )
std : : cout < < " Skill: " < < skillLabel ( eit - > mSkill )
< < " ( " < < ( int ) eit - > mSkill < < " ) " < < std : : endl ;
if ( eit - > mAttribute ! = - 1 )
std : : cout < < " Attribute: " < < attributeLabel ( eit - > mAttribute )
< < " ( " < < ( int ) eit - > mAttribute < < " ) " < < std : : endl ;
std : : cout < < " Range: " < < rangeTypeLabel ( eit - > mRange )
< < " ( " < < eit - > mRange < < " ) " < < std : : endl ;
for ( const ESM : : ENAMstruct & effect : effects . mList )
{
std : : cout < < " Effect[ " < < i < < " ]: " < < magicEffectLabel ( effect . mEffectID )
< < " ( " < < effect . mEffectID < < " ) " < < std : : endl ;
if ( effect . mSkill ! = - 1 )
std : : cout < < " Skill: " < < skillLabel ( effect . mSkill )
< < " ( " < < ( int ) effect . mSkill < < " ) " < < std : : endl ;
if ( effect . mAttribute ! = - 1 )
std : : cout < < " Attribute: " < < attributeLabel ( effect . mAttribute )
< < " ( " < < ( int ) effect . mAttribute < < " ) " < < std : : endl ;
std : : cout < < " Range: " < < rangeTypeLabel ( effect . mRange )
< < " ( " < < effect . mRange < < " ) " < < std : : endl ;
// Area is always zero if range type is "Self"
if ( e it- > mRange ! = ESM : : RT_Self )
std : : cout < < " Area: " < < e it- > mArea < < std : : endl ;
std : : cout < < " Duration: " < < e it- > mDuration < < std : : endl ;
std : : cout < < " Magnitude: " < < e it- > mMagnMin < < " - " < < e it- > mMagnMax < < std : : endl ;
if ( e ffect. mRange ! = ESM : : RT_Self )
std : : cout < < " Area: " < < e ffect. mArea < < std : : endl ;
std : : cout < < " Duration: " < < e ffect. mDuration < < std : : endl ;
std : : cout < < " Magnitude: " < < e ffect. mMagnMin < < " - " < < e ffect. mMagnMax < < std : : endl ;
i + + ;
}
}
void printTransport ( const std : : vector < ESM : : Transport : : Dest > & transport )
{
std : : vector < ESM : : Transport : : Dest > : : const_iterator dit ;
for ( dit = transport . begin ( ) ; dit ! = transport . end ( ) ; + + dit )
for ( const ESM : : Transport : : Dest & dest : transport )
{
std : : cout < < " Destination Position: "
< < boost : : format ( " %12.3f " ) % d it- > mPos . pos [ 0 ] < < " , "
< < boost : : format ( " %12.3f " ) % d it- > mPos . pos [ 1 ] < < " , "
< < boost : : format ( " %12.3f " ) % d it- > mPos . pos [ 2 ] < < " ) " < < std : : endl ;
< < boost : : format ( " %12.3f " ) % d est. mPos . pos [ 0 ] < < " , "
< < boost : : format ( " %12.3f " ) % d est. mPos . pos [ 1 ] < < " , "
< < boost : : format ( " %12.3f " ) % d est. mPos . pos [ 2 ] < < " ) " < < std : : endl ;
std : : cout < < " Destination Rotation: "
< < boost : : format ( " %9.6f " ) % d it- > mPos . rot [ 0 ] < < " , "
< < boost : : format ( " %9.6f " ) % d it- > mPos . rot [ 1 ] < < " , "
< < boost : : format ( " %9.6f " ) % d it- > mPos . rot [ 2 ] < < " ) " < < std : : endl ;
if ( dit - > mCellName ! = " " )
std : : cout < < " Destination Cell: " < < d it- > mCellName < < std : : endl ;
< < boost : : format ( " %9.6f " ) % d est. mPos . rot [ 0 ] < < " , "
< < boost : : format ( " %9.6f " ) % d est. mPos . rot [ 1 ] < < " , "
< < boost : : format ( " %9.6f " ) % d est. mPos . rot [ 2 ] < < " ) " < < std : : endl ;
if ( ! dest . mCellName . empty ( ) )
std : : cout < < " Destination Cell: " < < d est. mCellName < < std : : endl ;
}
}
@ -414,7 +412,7 @@ void Record<ESM::Potion>::print()
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
std : : cout < < " Model: " < < mData . mModel < < std : : endl ;
std : : cout < < " Icon: " < < mData . mIcon < < std : : endl ;
if ( mData . mScript ! = " " )
if ( ! mData . mScript . empty ( ) )
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
std : : cout < < " Weight: " < < mData . mData . mWeight < < std : : endl ;
std : : cout < < " Value: " < < mData . mData . mValue < < std : : endl ;
@ -429,9 +427,9 @@ void Record<ESM::Armor>::print()
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
std : : cout < < " Model: " < < mData . mModel < < std : : endl ;
std : : cout < < " Icon: " < < mData . mIcon < < std : : endl ;
if ( mData . mScript ! = " " )
if ( ! mData . mScript . empty ( ) )
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
if ( mData . mEnchant ! = " " )
if ( ! mData . mEnchant . empty ( ) )
std : : cout < < " Enchantment: " < < mData . mEnchant < < std : : endl ;
std : : cout < < " Type: " < < armorTypeLabel ( mData . mData . mType )
< < " ( " < < mData . mData . mType < < " ) " < < std : : endl ;
@ -440,15 +438,15 @@ void Record<ESM::Armor>::print()
std : : cout < < " Health: " < < mData . mData . mHealth < < std : : endl ;
std : : cout < < " Armor: " < < mData . mData . mArmor < < std : : endl ;
std : : cout < < " Enchantment Points: " < < mData . mData . mEnchant < < std : : endl ;
std : : vector < ESM : : PartReference > : : iterator pit ;
for ( pit = mData . mParts . mParts . begin ( ) ; pit ! = mData . mParts . mParts . end ( ) ; + + pit )
for ( const ESM : : PartReference & part : mData . mParts . mParts )
{
std : : cout < < " Body Part: " < < bodyPartLabel ( p it- > mPart )
< < " ( " < < ( int ) ( p it- > mPart ) < < " ) " < < std : : endl ;
std : : cout < < " Male Name: " < < p it- > mMale < < std : : endl ;
if ( pit - > mFemale ! = " " )
std : : cout < < " Female Name: " < < p it- > mFemale < < std : : endl ;
std : : cout < < " Body Part: " < < bodyPartLabel ( p art. mPart )
< < " ( " < < ( int ) ( p art. mPart ) < < " ) " < < std : : endl ;
std : : cout < < " Male Name: " < < p art. mMale < < std : : endl ;
if ( ! part . mFemale . empty ( ) )
std : : cout < < " Female Name: " < < p art. mFemale < < std : : endl ;
}
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
@ -487,9 +485,9 @@ void Record<ESM::Book>::print()
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
std : : cout < < " Model: " < < mData . mModel < < std : : endl ;
std : : cout < < " Icon: " < < mData . mIcon < < std : : endl ;
if ( mData . mScript ! = " " )
if ( ! mData . mScript . empty ( ) )
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
if ( mData . mEnchant ! = " " )
if ( ! mData . mEnchant . empty ( ) )
std : : cout < < " Enchantment: " < < mData . mEnchant < < std : : endl ;
std : : cout < < " Weight: " < < mData . mData . mWeight < < std : : endl ;
std : : cout < < " Value: " < < mData . mData . mValue < < std : : endl ;
@ -516,9 +514,8 @@ void Record<ESM::BirthSign>::print()
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
std : : cout < < " Texture: " < < mData . mTexture < < std : : endl ;
std : : cout < < " Description: " < < mData . mDescription < < std : : endl ;
std : : vector < std : : string > : : iterator pit ;
for ( pit = mData . mPowers . mList . begin ( ) ; pit ! = mData . mPowers . mList . end ( ) ; + + pit )
std : : cout < < " Power: " < < * pit < < std : : endl ;
for ( const std : : string & power : mData . mPowers . mList )
std : : cout < < " Power: " < < power < < std : : endl ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
@ -526,9 +523,9 @@ template<>
void Record < ESM : : Cell > : : print ( )
{
// None of the cells have names...
if ( mData . mName ! = " " )
if ( ! mData . mName . empty ( ) )
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
if ( mData . mRegion ! = " " )
if ( ! mData . mRegion . empty ( ) )
std : : cout < < " Region: " < < mData . mRegion < < std : : endl ;
std : : cout < < " Flags: " < < cellFlags ( mData . mData . mFlags ) < < std : : endl ;
@ -580,23 +577,22 @@ void Record<ESM::Clothing>::print()
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
std : : cout < < " Model: " < < mData . mModel < < std : : endl ;
std : : cout < < " Icon: " < < mData . mIcon < < std : : endl ;
if ( mData . mScript ! = " " )
if ( ! mData . mScript . empty ( ) )
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
if ( mData . mEnchant ! = " " )
if ( ! mData . mEnchant . empty ( ) )
std : : cout < < " Enchantment: " < < mData . mEnchant < < std : : endl ;
std : : cout < < " Type: " < < clothingTypeLabel ( mData . mData . mType )
< < " ( " < < mData . mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Weight: " < < mData . mData . mWeight < < std : : endl ;
std : : cout < < " Value: " < < mData . mData . mValue < < std : : endl ;
std : : cout < < " Enchantment Points: " < < mData . mData . mEnchant < < std : : endl ;
std : : vector < ESM : : PartReference > : : iterator pit ;
for ( pit = mData . mParts . mParts . begin ( ) ; pit ! = mData . mParts . mParts . end ( ) ; + + pit )
for ( const ESM : : PartReference & part : mData . mParts . mParts )
{
std : : cout < < " Body Part: " < < bodyPartLabel ( p it- > mPart )
< < " ( " < < ( int ) ( p it- > mPart ) < < " ) " < < std : : endl ;
std : : cout < < " Male Name: " < < p it- > mMale < < std : : endl ;
if ( pit - > mFemale ! = " " )
std : : cout < < " Female Name: " < < p it- > mFemale < < std : : endl ;
std : : cout < < " Body Part: " < < bodyPartLabel ( p art. mPart )
< < " ( " < < ( int ) ( p art. mPart ) < < " ) " < < std : : endl ;
std : : cout < < " Male Name: " < < p art. mMale < < std : : endl ;
if ( ! part . mFemale . empty ( ) )
std : : cout < < " Female Name: " < < p art. mFemale < < std : : endl ;
}
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
@ -606,14 +602,13 @@ void Record<ESM::Container>::print()
{
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
std : : cout < < " Model: " < < mData . mModel < < std : : endl ;
if ( mData . mScript ! = " " )
if ( ! mData . mScript . empty ( ) )
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
std : : cout < < " Flags: " < < containerFlags ( mData . mFlags ) < < std : : endl ;
std : : cout < < " Weight: " < < mData . mWeight < < std : : endl ;
std : : vector < ESM : : ContItem > : : iterator cit ;
for ( cit = mData . mInventory . mList . begin ( ) ; cit ! = mData . mInventory . mList . end ( ) ; + + cit )
std : : cout < < " Inventory: Count: " < < boost : : format ( " %4d " ) % cit - > mCount
< < " Item: " < < cit - > mItem . toString ( ) < < std : : endl ;
for ( const ESM : : ContItem & item : mData . mInventory . mList )
std : : cout < < " Inventory: Count: " < < boost : : format ( " %4d " ) % item . mCount
< < " Item: " < < item . mItem . toString ( ) < < std : : endl ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
@ -656,14 +651,12 @@ void Record<ESM::Creature>::print()
< < " - " < < mData . mData . mAttack [ 5 ] < < std : : endl ;
std : : cout < < " Gold: " < < mData . mData . mGold < < std : : endl ;
std : : vector < ESM : : ContItem > : : iterator cit ;
for ( cit = mData . mInventory . mList . begin ( ) ; cit ! = mData . mInventory . mList . end ( ) ; + + cit )
std : : cout < < " Inventory: Count: " < < boost : : format ( " %4d " ) % cit - > mCount
< < " Item: " < < cit - > mItem . toString ( ) < < std : : endl ;
for ( const ESM : : ContItem & item : mData . mInventory . mList )
std : : cout < < " Inventory: Count: " < < boost : : format ( " %4d " ) % item . mCount
< < " Item: " < < item . mItem . toString ( ) < < std : : endl ;
std : : vector < std : : string > : : iterator sit ;
for ( sit = mData . mSpells . mList . begin ( ) ; sit ! = mData . mSpells . mList . end ( ) ; + + sit )
std : : cout < < " Spell: " < < * sit < < std : : endl ;
for ( const std : : string & spell : mData . mSpells . mList )
std : : cout < < " Spell: " < < spell < < std : : endl ;
printTransport ( mData . getTransport ( ) ) ;
@ -678,9 +671,8 @@ void Record<ESM::Creature>::print()
std : : cout < < " AI U4: " < < ( int ) mData . mAiData . mU4 < < std : : endl ;
std : : cout < < " AI Services: " < < boost : : format ( " 0x%08X " ) % mData . mAiData . mServices < < std : : endl ;
std : : vector < ESM : : AIPackage > : : iterator pit ;
for ( pit = mData . mAiPackage . mList . begin ( ) ; pit ! = mData . mAiPackage . mList . end ( ) ; + + pit )
printAIPackage ( * pit ) ;
for ( const ESM : : AIPackage & package : mData . mAiPackage . mList )
printAIPackage ( package ) ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
@ -693,9 +685,8 @@ void Record<ESM::Dialogue>::print()
// Sadly, there are no DialInfos, because the loader dumps as it
// loads, rather than loading and then dumping. :-( Anyone mind if
// I change this?
ESM : : Dialogue : : InfoContainer : : iterator iit ;
for ( iit = mData . mInfo . begin ( ) ; iit ! = mData . mInfo . end ( ) ; + + iit )
std : : cout < < " INFO! " < < iit - > mId < < std : : endl ;
for ( const ESM : : DialInfo & info : mData . mInfo )
std : : cout < < " INFO! " < < info . mId < < std : : endl ;
}
template < >
@ -735,7 +726,7 @@ void Record<ESM::Faction>::print()
std : : cout < < " Skill: " < < skillLabel ( mData . mData . mSkills [ i ] )
< < " ( " < < mData . mData . mSkills [ i ] < < " ) " < < std : : endl ;
for ( int i = 0 ; i ! = 10 ; i + + )
if ( mData . mRanks [ i ] ! = " " )
if ( ! mData . mRanks [ i ] . empty ( ) )
{
std : : cout < < " Rank: " < < mData . mRanks [ i ] < < std : : endl ;
std : : cout < < " Attribute1 Requirement: "
@ -749,9 +740,8 @@ void Record<ESM::Faction>::print()
std : : cout < < " Faction Reaction: "
< < mData . mData . mRankData [ i ] . mFactReaction < < std : : endl ;
}
std : : map < std : : string , int > : : iterator rit ;
for ( rit = mData . mReactions . begin ( ) ; rit ! = mData . mReactions . end ( ) ; + + rit )
std : : cout < < " Reaction: " < < rit - > second < < " = " < < rit - > first < < std : : endl ;
for ( const std : : pair < std : : string , int > & reaction : mData . mReactions )
std : : cout < < " Reaction: " < < reaction . second < < " = " < < reaction . first < < std : : endl ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
@ -772,34 +762,34 @@ template<>
void Record < ESM : : DialInfo > : : print ( )
{
std : : cout < < " Id: " < < mData . mId < < std : : endl ;
if ( mData . mPrev ! = " " )
if ( ! mData . mPrev . empty ( ) )
std : : cout < < " Previous ID: " < < mData . mPrev < < std : : endl ;
if ( mData . mNext ! = " " )
if ( ! mData . mNext . empty ( ) )
std : : cout < < " Next ID: " < < mData . mNext < < std : : endl ;
std : : cout < < " Text: " < < mData . mResponse < < std : : endl ;
if ( mData . mActor ! = " " )
if ( ! mData . mActor . empty ( ) )
std : : cout < < " Actor: " < < mData . mActor < < std : : endl ;
if ( mData . mRace ! = " " )
if ( ! mData . mRace . empty ( ) )
std : : cout < < " Race: " < < mData . mRace < < std : : endl ;
if ( mData . mClass ! = " " )
if ( ! mData . mClass . empty ( ) )
std : : cout < < " Class: " < < mData . mClass < < std : : endl ;
std : : cout < < " Factionless: " < < mData . mFactionLess < < std : : endl ;
if ( mData . mFaction ! = " " )
if ( ! mData . mFaction . empty ( ) )
std : : cout < < " NPC Faction: " < < mData . mFaction < < std : : endl ;
if ( mData . mData . mRank ! = - 1 )
std : : cout < < " NPC Rank: " < < ( int ) mData . mData . mRank < < std : : endl ;
if ( mData . mPcFaction ! = " " )
if ( ! mData . mPcFaction . empty ( ) )
std : : cout < < " PC Faction: " < < mData . mPcFaction < < std : : endl ;
// CHANGE? non-standard capitalization mPCrank -> mPCRank (mPcRank?)
if ( mData . mData . mPCrank ! = - 1 )
std : : cout < < " PC Rank: " < < ( int ) mData . mData . mPCrank < < std : : endl ;
if ( mData . mCell ! = " " )
if ( ! mData . mCell . empty ( ) )
std : : cout < < " Cell: " < < mData . mCell < < std : : endl ;
if ( mData . mData . mDisposition > 0 )
std : : cout < < " Disposition/Journal index: " < < mData . mData . mDisposition < < std : : endl ;
if ( mData . mData . mGender ! = ESM : : DialInfo : : NA )
std : : cout < < " Gender: " < < mData . mData . mGender < < std : : endl ;
if ( mData . mSound ! = " " )
if ( ! mData . mSound . empty ( ) )
std : : cout < < " Sound File: " < < mData . mSound < < std : : endl ;
@ -808,11 +798,10 @@ void Record<ESM::DialInfo>::print()
std : : cout < < " Unknown1: " < < mData . mData . mUnknown1 < < std : : endl ;
std : : cout < < " Unknown2: " < < ( int ) mData . mData . mUnknown2 < < std : : endl ;
std : : vector < ESM : : DialInfo : : SelectStruct > : : iterator sit ;
for ( sit = mData . mSelects . begin ( ) ; sit ! = mData . mSelects . end ( ) ; + + sit )
std : : cout < < " Select Rule: " < < ruleString ( * sit ) < < std : : endl ;
for ( const ESM : : DialInfo : : SelectStruct & rule : mData . mSelects )
std : : cout < < " Select Rule: " < < ruleString ( rule ) < < std : : endl ;
if ( mData . mResultScript ! = " " )
if ( ! mData . mResultScript . empty ( ) )
{
if ( mPrintPlain )
{
@ -835,7 +824,7 @@ void Record<ESM::Ingredient>::print()
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
std : : cout < < " Model: " < < mData . mModel < < std : : endl ;
std : : cout < < " Icon: " < < mData . mIcon < < std : : endl ;
if ( mData . mScript ! = " " )
if ( ! mData . mScript . empty ( ) )
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
std : : cout < < " Weight: " < < mData . mData . mWeight < < std : : endl ;
std : : cout < < " Value: " < < mData . mData . mValue < < std : : endl ;
@ -877,10 +866,9 @@ void Record<ESM::CreatureLevList>::print()
std : : cout < < " Chance for None: " < < ( int ) mData . mChanceNone < < std : : endl ;
std : : cout < < " Flags: " < < creatureListFlags ( mData . mFlags ) < < std : : endl ;
std : : cout < < " Number of items: " < < mData . mList . size ( ) < < std : : endl ;
std : : vector < ESM : : LevelledListBase : : LevelItem > : : iterator iit ;
for ( iit = mData . mList . begin ( ) ; iit ! = mData . mList . end ( ) ; + + iit )
std : : cout < < " Creature: Level: " < < iit - > mLevel
< < " Creature: " < < iit - > mId < < std : : endl ;
for ( const ESM : : LevelledListBase : : LevelItem & item : mData . mList )
std : : cout < < " Creature: Level: " < < item . mLevel
< < " Creature: " < < item . mId < < std : : endl ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
@ -890,23 +878,22 @@ void Record<ESM::ItemLevList>::print()
std : : cout < < " Chance for None: " < < ( int ) mData . mChanceNone < < std : : endl ;
std : : cout < < " Flags: " < < itemListFlags ( mData . mFlags ) < < std : : endl ;
std : : cout < < " Number of items: " < < mData . mList . size ( ) < < std : : endl ;
std : : vector < ESM : : LevelledListBase : : LevelItem > : : iterator iit ;
for ( iit = mData . mList . begin ( ) ; iit ! = mData . mList . end ( ) ; + + iit )
std : : cout < < " Inventory: Level: " < < iit - > mLevel
< < " Item: " < < iit - > mId < < std : : endl ;
for ( const ESM : : LevelledListBase : : LevelItem & item : mData . mList )
std : : cout < < " Inventory: Level: " < < item . mLevel
< < " Item: " < < item . mId < < std : : endl ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
template < >
void Record < ESM : : Light > : : print ( )
{
if ( mData . mName ! = " " )
if ( ! mData . mName . empty ( ) )
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
if ( mData . mModel ! = " " )
if ( ! mData . mModel . empty ( ) )
std : : cout < < " Model: " < < mData . mModel < < std : : endl ;
if ( mData . mIcon ! = " " )
if ( ! mData . mIcon . empty ( ) )
std : : cout < < " Icon: " < < mData . mIcon < < std : : endl ;
if ( mData . mScript ! = " " )
if ( ! mData . mScript . empty ( ) )
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
std : : cout < < " Flags: " < < lightFlags ( mData . mData . mFlags ) < < std : : endl ;
std : : cout < < " Weight: " < < mData . mData . mWeight < < std : : endl ;
@ -924,7 +911,7 @@ void Record<ESM::Lockpick>::print()
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
std : : cout < < " Model: " < < mData . mModel < < std : : endl ;
std : : cout < < " Icon: " < < mData . mIcon < < std : : endl ;
if ( mData . mScript ! = " " )
if ( ! mData . mScript . empty ( ) )
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
std : : cout < < " Weight: " < < mData . mData . mWeight < < std : : endl ;
std : : cout < < " Value: " < < mData . mData . mValue < < std : : endl ;
@ -939,7 +926,7 @@ void Record<ESM::Probe>::print()
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
std : : cout < < " Model: " < < mData . mModel < < std : : endl ;
std : : cout < < " Icon: " < < mData . mIcon < < std : : endl ;
if ( mData . mScript ! = " " )
if ( ! mData . mScript . empty ( ) )
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
std : : cout < < " Weight: " < < mData . mData . mWeight < < std : : endl ;
std : : cout < < " Value: " < < mData . mData . mValue < < std : : endl ;
@ -954,7 +941,7 @@ void Record<ESM::Repair>::print()
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
std : : cout < < " Model: " < < mData . mModel < < std : : endl ;
std : : cout < < " Icon: " < < mData . mIcon < < std : : endl ;
if ( mData . mScript ! = " " )
if ( ! mData . mScript . empty ( ) )
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
std : : cout < < " Weight: " < < mData . mData . mWeight < < std : : endl ;
std : : cout < < " Value: " < < mData . mData . mValue < < std : : endl ;
@ -981,21 +968,21 @@ void Record<ESM::MagicEffect>::print()
std : : cout < < " Icon: " < < mData . mIcon < < std : : endl ;
std : : cout < < " Flags: " < < magicEffectFlags ( mData . mData . mFlags ) < < std : : endl ;
std : : cout < < " Particle Texture: " < < mData . mParticle < < std : : endl ;
if ( mData . mCasting ! = " " )
if ( ! mData . mCasting . empty ( ) )
std : : cout < < " Casting Static: " < < mData . mCasting < < std : : endl ;
if ( mData . mCastSound ! = " " )
if ( ! mData . mCastSound . empty ( ) )
std : : cout < < " Casting Sound: " < < mData . mCastSound < < std : : endl ;
if ( mData . mBolt ! = " " )
if ( ! mData . mBolt . empty ( ) )
std : : cout < < " Bolt Static: " < < mData . mBolt < < std : : endl ;
if ( mData . mBoltSound ! = " " )
if ( ! mData . mBoltSound . empty ( ) )
std : : cout < < " Bolt Sound: " < < mData . mBoltSound < < std : : endl ;
if ( mData . mHit ! = " " )
if ( ! mData . mHit . empty ( ) )
std : : cout < < " Hit Static: " < < mData . mHit < < std : : endl ;
if ( mData . mHitSound ! = " " )
if ( ! mData . mHitSound . empty ( ) )
std : : cout < < " Hit Sound: " < < mData . mHitSound < < std : : endl ;
if ( mData . mArea ! = " " )
if ( ! mData . mArea . empty ( ) )
std : : cout < < " Area Static: " < < mData . mArea < < std : : endl ;
if ( mData . mAreaSound ! = " " )
if ( ! mData . mAreaSound . empty ( ) )
std : : cout < < " Area Sound: " < < mData . mAreaSound < < std : : endl ;
std : : cout < < " School: " < < schoolLabel ( mData . mData . mSchool )
< < " ( " < < mData . mData . mSchool < < " ) " < < std : : endl ;
@ -1015,7 +1002,7 @@ void Record<ESM::Miscellaneous>::print()
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
std : : cout < < " Model: " < < mData . mModel < < std : : endl ;
std : : cout < < " Icon: " < < mData . mIcon < < std : : endl ;
if ( mData . mScript ! = " " )
if ( ! mData . mScript . empty ( ) )
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
std : : cout < < " Weight: " < < mData . mData . mWeight < < std : : endl ;
std : : cout < < " Value: " < < mData . mData . mValue < < std : : endl ;
@ -1032,9 +1019,9 @@ void Record<ESM::NPC>::print()
std : : cout < < " Head Model: " < < mData . mHead < < std : : endl ;
std : : cout < < " Race: " < < mData . mRace < < std : : endl ;
std : : cout < < " Class: " < < mData . mClass < < std : : endl ;
if ( mData . mScript ! = " " )
if ( ! mData . mScript . empty ( ) )
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
if ( mData . mFaction ! = " " )
if ( ! mData . mFaction . empty ( ) )
std : : cout < < " Faction: " < < mData . mFaction < < std : : endl ;
std : : cout < < " Flags: " < < npcFlags ( mData . mFlags ) < < std : : endl ;
@ -1083,14 +1070,12 @@ void Record<ESM::NPC>::print()
std : : cout < < " Gold: " < < mData . mNpdt . mGold < < std : : endl ;
}
std : : vector < ESM : : ContItem > : : iterator cit ;
for ( cit = mData . mInventory . mList . begin ( ) ; cit ! = mData . mInventory . mList . end ( ) ; + + cit )
std : : cout < < " Inventory: Count: " < < boost : : format ( " %4d " ) % cit - > mCount
< < " Item: " < < cit - > mItem . toString ( ) < < std : : endl ;
for ( const ESM : : ContItem & item : mData . mInventory . mList )
std : : cout < < " Inventory: Count: " < < boost : : format ( " %4d " ) % item . mCount
< < " Item: " < < item . mItem . toString ( ) < < std : : endl ;
std : : vector < std : : string > : : iterator sit ;
for ( sit = mData . mSpells . mList . begin ( ) ; sit ! = mData . mSpells . mList . end ( ) ; + + sit )
std : : cout < < " Spell: " < < * sit < < std : : endl ;
for ( const std : : string & spell : mData . mSpells . mList )
std : : cout < < " Spell: " < < spell < < std : : endl ;
printTransport ( mData . getTransport ( ) ) ;
@ -1105,9 +1090,8 @@ void Record<ESM::NPC>::print()
std : : cout < < " AI U4: " < < ( int ) mData . mAiData . mU4 < < std : : endl ;
std : : cout < < " AI Services: " < < boost : : format ( " 0x%08X " ) % mData . mAiData . mServices < < std : : endl ;
std : : vector < ESM : : AIPackage > : : iterator pit ;
for ( pit = mData . mAiPackage . mList . begin ( ) ; pit ! = mData . mAiPackage . mList . end ( ) ; + + pit )
printAIPackage ( * pit ) ;
for ( const ESM : : AIPackage & package : mData . mAiPackage . mList )
printAIPackage ( package ) ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
@ -1124,23 +1108,22 @@ void Record<ESM::Pathgrid>::print()
std : : cout < < " Edge Count: " < < mData . mEdges . size ( ) < < std : : endl ;
int i = 0 ;
ESM : : Pathgrid : : PointList : : iterator pit ;
for ( pit = mData . mPoints . begin ( ) ; pit ! = mData . mPoints . end ( ) ; + + pit )
for ( const ESM : : Pathgrid : : Point & point : mData . mPoints )
{
std : : cout < < " Point[ " < < i < < " ]: " < < std : : endl ;
std : : cout < < " Coordinates: ( " < < p it- > mX < < " , "
< < p it- > mY < < " , " < < p it- > mZ < < " ) " < < std : : endl ;
std : : cout < < " Auto-Generated: " < < ( int ) p it- > mAutogenerated < < std : : endl ;
std : : cout < < " Connections: " < < ( int ) p it- > mConnectionNum < < std : : endl ;
std : : cout < < " Unknown: " < < p it- > mUnknown < < std : : endl ;
std : : cout < < " Coordinates: ( " < < p oint. mX < < " , "
< < p oint. mY < < " , " < < p oint. mZ < < " ) " < < std : : endl ;
std : : cout < < " Auto-Generated: " < < ( int ) p oint. mAutogenerated < < std : : endl ;
std : : cout < < " Connections: " < < ( int ) p oint. mConnectionNum < < std : : endl ;
std : : cout < < " Unknown: " < < p oint. mUnknown < < std : : endl ;
i + + ;
}
i = 0 ;
ESM : : Pathgrid : : EdgeList : : iterator eit ;
for ( eit = mData . mEdges . begin ( ) ; eit ! = mData . mEdges . end ( ) ; + + eit )
for ( const ESM : : Pathgrid : : Edge & edge : mData . mEdges )
{
std : : cout < < " Edge[ " < < i < < " ]: " < < e it- > mV0 < < " -> " < < e it- > mV1 < < std : : endl ;
if ( e it- > mV0 > = mData . mData . mS2 | | e it- > mV1 > = mData . mData . mS2 )
std : : cout < < " Edge[ " < < i < < " ]: " < < e dge. mV0 < < " -> " < < e dge. mV1 < < std : : endl ;
if ( e dge. mV0 > = mData . mData . mS2 | | e dge. mV1 > = mData . mData . mS2 )
std : : cout < < " BAD POINT IN EDGE! " < < std : : endl ;
i + + ;
}
@ -1183,9 +1166,8 @@ void Record<ESM::Race>::print()
< < " ( " < < mData . mData . mBonus [ i ] . mSkill < < " ) = "
< < mData . mData . mBonus [ i ] . mBonus < < std : : endl ;
std : : vector < std : : string > : : iterator sit ;
for ( sit = mData . mPowers . mList . begin ( ) ; sit ! = mData . mPowers . mList . end ( ) ; + + sit )
std : : cout < < " Power: " < < * sit < < std : : endl ;
for ( const std : : string & power : mData . mPowers . mList )
std : : cout < < " Power: " < < power < < std : : endl ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
@ -1207,11 +1189,10 @@ void Record<ESM::Region>::print()
std : : cout < < " UnknownA: " < < ( int ) mData . mData . mA < < std : : endl ;
std : : cout < < " UnknownB: " < < ( int ) mData . mData . mB < < std : : endl ;
std : : cout < < " Map Color: " < < mData . mMapColor < < std : : endl ;
if ( mData . mSleepList ! = " " )
if ( ! mData . mSleepList . empty ( ) )
std : : cout < < " Sleep List: " < < mData . mSleepList < < std : : endl ;
std : : vector < ESM : : Region : : SoundRef > : : iterator sit ;
for ( sit = mData . mSoundList . begin ( ) ; sit ! = mData . mSoundList . end ( ) ; + + sit )
std : : cout < < " Sound: " < < ( int ) sit - > mChance < < " = " < < sit - > mSound . toString ( ) < < std : : endl ;
for ( const ESM : : Region : : SoundRef & soundref : mData . mSoundList )
std : : cout < < " Sound: " < < ( int ) soundref . mChance < < " = " < < soundref . mSound . toString ( ) < < std : : endl ;
}
template < >
@ -1225,15 +1206,12 @@ void Record<ESM::Script>::print()
std : : cout < < " Script Data Size: " < < mData . mData . mScriptDataSize < < std : : endl ;
std : : cout < < " Table Size: " < < mData . mData . mStringTableSize < < std : : endl ;
std : : vector < std : : string > : : iterator vit ;
for ( vit = mData . mVarNames . begin ( ) ; vit ! = mData . mVarNames . end ( ) ; + + vit )
std : : cout < < " Variable: " < < * vit < < std : : endl ;
for ( const std : : string & variable : mData . mVarNames )
std : : cout < < " Variable: " < < variable < < std : : endl ;
std : : cout < < " ByteCode: " ;
std : : vector < unsigned char > : : iterator cit ;
for ( cit = mData . mScriptData . begin ( ) ; cit ! = mData . mScriptData . end ( ) ; + + cit )
std : : cout < < boost : : format ( " %02X " ) % ( int ) ( * cit ) ;
for ( const unsigned char & byte : mData . mScriptData )
std : : cout < < boost : : format ( " %02X " ) % ( int ) ( byte ) ;
std : : cout < < std : : endl ;
if ( mPrintPlain )
@ -1268,7 +1246,8 @@ void Record<ESM::Skill>::print()
template < >
void Record < ESM : : SoundGenerator > : : print ( )
{
std : : cout < < " Creature: " < < mData . mCreature < < std : : endl ;
if ( ! mData . mCreature . empty ( ) )
std : : cout < < " Creature: " < < mData . mCreature < < std : : endl ;
std : : cout < < " Sound: " < < mData . mSound < < std : : endl ;
std : : cout < < " Type: " < < soundTypeLabel ( mData . mType )
< < " ( " < < mData . mType < < " ) " < < std : : endl ;
@ -1316,15 +1295,15 @@ template<>
void Record < ESM : : Weapon > : : print ( )
{
// No names on VFX bolts
if ( mData . mName ! = " " )
if ( ! mData . mName . empty ( ) )
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
std : : cout < < " Model: " < < mData . mModel < < std : : endl ;
// No icons on VFX bolts or magic bolts
if ( mData . mIcon ! = " " )
if ( ! mData . mIcon . empty ( ) )
std : : cout < < " Icon: " < < mData . mIcon < < std : : endl ;
if ( mData . mScript ! = " " )
if ( ! mData . mScript . empty ( ) )
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
if ( mData . mEnchant ! = " " )
if ( ! mData . mEnchant . empty ( ) )
std : : cout < < " Enchantment: " < < mData . mEnchant < < std : : endl ;
std : : cout < < " Type: " < < weaponTypeLabel ( mData . mData . mType )
< < " ( " < < mData . mData . mType < < " ) " < < std : : endl ;
@ -1356,25 +1335,25 @@ std::string Record<ESM::Cell>::getId() const
template < >
std : : string Record < ESM : : Land > : : getId ( ) const
{
return " " ; // No ID for Land record
return std : : string ( ) ; // No ID for Land record
}
template < >
std : : string Record < ESM : : MagicEffect > : : getId ( ) const
{
return " " ; // No ID for MagicEffect record
return std : : string ( ) ; // No ID for MagicEffect record
}
template < >
std : : string Record < ESM : : Pathgrid > : : getId ( ) const
{
return " " ; // No ID for Pathgrid record
return std : : string ( ) ; // No ID for Pathgrid record
}
template < >
std : : string Record < ESM : : Skill > : : getId ( ) const
{
return " " ; // No ID for Skill record
return std : : string ( ) ; // No ID for Skill record
}
} // end namespace