| 818 | } |
| 819 | |
| 820 | int CDataFileReader::GetInternalItemType(int ExternalType) |
| 821 | { |
| 822 | if(ExternalType < OFFSET_UUID) |
| 823 | { |
| 824 | return ExternalType; |
| 825 | } |
| 826 | |
| 827 | const CUuid Uuid = g_UuidManager.GetUuid(ExternalType); |
| 828 | int Start, Num; |
| 829 | GetType(ITEMTYPE_EX, &Start, &Num); |
| 830 | for(int Index = Start; Index < Start + Num; Index++) |
| 831 | { |
| 832 | if(GetItemSize(Index) < (int)sizeof(CItemEx)) |
| 833 | { |
| 834 | continue; |
| 835 | } |
| 836 | int Id; |
| 837 | if(Uuid == static_cast<const CItemEx *>(GetItem(Index, nullptr, &Id))->ToUuid()) |
| 838 | { |
| 839 | return Id; |
| 840 | } |
| 841 | } |
| 842 | return -1; |
| 843 | } |
| 844 | |
| 845 | void *CDataFileReader::GetItem(int Index, int *pType, int *pId, CUuid *pUuid) |
| 846 | { |