| 880 | } |
| 881 | |
| 882 | int CDataFileReader::FindItemIndex(int Type, int Id) |
| 883 | { |
| 884 | dbg_assert(m_pDataFile != nullptr, "File not open"); |
| 885 | |
| 886 | int Start, Num; |
| 887 | GetType(Type, &Start, &Num); |
| 888 | for(int Index = Start; Index < Start + Num; Index++) |
| 889 | { |
| 890 | const CDatafileItem *pItem = m_pDataFile->GetItem(Index); |
| 891 | if(pItem->Id() == Id) |
| 892 | { |
| 893 | return Index; |
| 894 | } |
| 895 | } |
| 896 | return -1; |
| 897 | } |
| 898 | |
| 899 | void *CDataFileReader::FindItem(int Type, int Id) |
| 900 | { |