In Warcraft III Replays the path and the checksum of the required map are saved. Warcraft III knows like this whether a map is valid or not. Exactly the same algorithm is used by W3GPC to verify maps. Since we don't want to compute every checksum of every file in the Warcraft III map folder, we divide the search into several steps (explained underneath). Like this we get much faster results for common and original named maps.
At first W3GPC tries to verify the map path of the replay. If this succeeds, no search will be done.
There is an incorrect map path. At first W3GPC compares the checksum of the searched map with all stored checksums in a Harcoded Table. If this does not succeed we go to Step 3. If the returned map exists, we are done. If it does not exist, W3GPC tries to find the returned map name via Map Folder Search. When the result is valid, we are done.
Now we do exactly the same from Step 2 for a Extern Table. Success => Done
This time we search via Map Folder Search for the map name. Success => Done
The last option to find the replay is a Exhaustive Search. If this search failes, the required map is non-existent and needs to be downloaded.
A hardcoded table with almost all frequently played ladder maps.
Search speed : Very fast
Detection rate: Low (just detects standard ladder maps)
A extern table with no entries at the beginning. This table increases with every watched replay. Everytime we have a valid map path, the checksum and the path are stored in this table.
Only preconditions: the checksum must neither be stored in the hardcoded table nor in the extern table.
Search speed : Between Very fast and Fast (depending on the table size)
Detection rate: Between Bad and Very good (depending on the table size)
Searches for the map name in the Warcraft III map directory. This method only works for unmodified map names.
Search speed : Between Average and Slow (depending on the amount of maps)
Detection rate: Good
Computes the checksum for every file in the Warcraft III map directory and compares it to the searched checksum. This method can take several seconds, but it's exact!
Search speed : Between Slow and Horrible slow (depending on the amount of maps)
Detection rate: Perfect