Exemple #1
0
bool CRubbishDropConfig::Save(CFileStream&file)
{
    file.WriteUInt( m_nRubbishDropID );

    file.WriteUShort( (unsigned short)m_MaleDrop.size() );
    std::vector<CDropItemInfo>::iterator it = m_MaleDrop.begin();
    for ( ; it != m_MaleDrop.end(); ++it )
    {
        file.WriteUInt( it->m_itemInfo.m_nItemType);
        file.WriteUShort( it->m_itemInfo.m_nItemCount);
        file.WriteInt( it->m_itemInfo.m_nValidTime);
        file.WriteUInt( it->m_nRate );
    }

    file.WriteUShort( (unsigned short)m_FemaleDrop.size() );
    std::vector<CDropItemInfo>::iterator it1 = m_FemaleDrop.begin();
    for ( ; it1 != m_FemaleDrop.end(); ++it1 )
    {
        file.WriteUInt( it1->m_itemInfo.m_nItemType);
        file.WriteUShort( it1->m_itemInfo.m_nItemCount);
        file.WriteInt( it1->m_itemInfo.m_nValidTime);
        file.WriteUInt( it1->m_nRate );
    }

    return true;
}
Exemple #2
0
bool CDebrisConfig::Save(CFileStream&file)
{
    file.WriteUInt( m_nDebrisID );

    file.WriteUShort((unsigned short)m_strName.size());
    file.WriteString(m_strName);

    file.WriteUShort((unsigned short)m_strIconName.size());
    file.WriteString(m_strIconName);

    file.WriteUShort((unsigned short)m_strAtlasName.size());
    file.WriteString(m_strAtlasName);

    file.WriteUInt( m_nNeedNum );
    file.WriteUInt( m_nCurrencyType );
    file.WriteUInt( m_nCurrencyCount );

    file.WriteUShort( (unsigned short)m_MaleExchangeItem.size() );
    std::vector<CItem>::iterator it = m_MaleExchangeItem.begin();
    for ( ; it != m_MaleExchangeItem.end(); ++it )
    {
        file.WriteUInt( it->m_nItemType );
        file.WriteUShort( it->m_nItemCount );
        file.WriteInt( it->m_nValidTime );
    }

    file.WriteUShort( (unsigned short)m_FemaleExchangeItem.size() );
    std::vector<CItem>::iterator it1 = m_FemaleExchangeItem.begin();
    for ( ; it1 != m_FemaleExchangeItem.end(); ++it1 )
    {
        file.WriteUInt( it1->m_nItemType );
        file.WriteUShort( it1->m_nItemCount );
        file.WriteInt( it1->m_nValidTime );
    }

    return true;
}
Exemple #3
0
bool CMainlineDropConfig::Save(CFileStream&file)
{
    file.WriteUInt( m_nParcloseID );
    file.WriteUInt( m_nMustDropNum );

    file.WriteUShort( (unsigned short)m_MustMaleDrop.size() );
    std::vector<CDropItemInfo>::iterator it = m_MustMaleDrop.begin();
    for ( ; it != m_MustMaleDrop.end(); ++it )
    {
        file.WriteUInt( it->m_itemInfo.m_nItemType);
        file.WriteUShort( it->m_itemInfo.m_nItemCount);
        file.WriteInt( it->m_itemInfo.m_nValidTime);
        file.WriteUInt( it->m_nRate );
    }

    file.WriteUShort( (unsigned short)m_MustFemaleDrop.size() );
    std::vector<CDropItemInfo>::iterator it1 = m_MustFemaleDrop.begin();
    for ( ; it1 != m_MustFemaleDrop.end(); ++it1 )
    {
        file.WriteUInt( it1->m_itemInfo.m_nItemType);
        file.WriteUShort( it1->m_itemInfo.m_nItemCount);
        file.WriteInt( it1->m_itemInfo.m_nValidTime);
        file.WriteUInt( it1->m_nRate );
    }

    file.WriteUShort( (unsigned short)m_MustDebrisDrop.size() );
    std::vector<CDebrisDropInfo>::iterator itDebris = m_MustDebrisDrop.begin();
    for ( ; itDebris != m_MustDebrisDrop.end(); ++itDebris )
    {
        file.WriteUInt( itDebris->m_nDebrisID);
        file.WriteUInt( itDebris->m_nDebrisCount );
        file.WriteUInt( itDebris->m_nDropRate );
    }

    file.WriteUInt( m_nOptionalRate );
    file.WriteUInt( m_nOptionalNum );

    file.WriteUShort( (unsigned short)m_OptionalMaleDrop.size() );
    std::vector<CDropItemInfo>::iterator it2 = m_OptionalMaleDrop.begin();
    for ( ; it2 != m_OptionalMaleDrop.end(); ++it2 )
    {
        file.WriteUInt( it2->m_itemInfo.m_nItemType);
        file.WriteUShort( it2->m_itemInfo.m_nItemCount);
        file.WriteInt( it2->m_itemInfo.m_nValidTime);
        file.WriteUInt( it2->m_nRate );
    }

    file.WriteUShort( (unsigned short)m_OptionalFemaleDrop.size() );
    std::vector<CDropItemInfo>::iterator it3 = m_OptionalFemaleDrop.begin();
    for ( ; it3 != m_OptionalFemaleDrop.end(); ++it3 )
    {
        file.WriteUInt( it3->m_itemInfo.m_nItemType);
        file.WriteUShort( it3->m_itemInfo.m_nItemCount);
        file.WriteInt( it3->m_itemInfo.m_nValidTime);
        file.WriteUInt( it3->m_nRate );
    }

    file.WriteUShort( (unsigned short)m_OptionalDebrisDrop.size() );
    std::vector<CDebrisDropInfo>::iterator itDebris1 = m_OptionalDebrisDrop.begin();
    for ( ; itDebris1 != m_OptionalDebrisDrop.end(); ++itDebris1 )
    {
        file.WriteUInt( itDebris1->m_nDebrisID);
        file.WriteUInt( itDebris1->m_nDebrisCount );
        file.WriteUInt( itDebris1->m_nDropRate );
    }

    return true;
}
Exemple #4
0
bool ExpConfig::Save(CFileStream&file)
{
    file.WriteUShort(m_nLev) ;
    file.WriteInt(m_nExp) ;
    return true ;
}