Ok I went looking through the gatherer lua files to see what I could dig up... And here's a basic explanation shamelessly stolen from gatherer and Astrolabe (a library gatherer uses).
We'll take a mithril node at the top of my database for an example it's located at x=0.19387744, and y=0.60970711 and this is a mine in azshara so when you're reading the new data file and we get to a mine in azshara we would do an sql select query where the map, zone, nodeType, and nodeTypeWord are the same and it would return that node.
So we have a new coordinate uploaded that is located at x=0.19399000 and y=0.60842301 so lets see if they match up with the following formula:
- Code: Select all
xDelta = (x2 - x1) * 1002;
yDelta = (y2 - y1) * 668;
dist = sqrt(xDelta*xDelta + yDelta*yDelta);
So using my example numbers above:
- Code: Select all
xDelta = (0.19399 - 0.19387744) * 1002
yDelta = (0.60842301 - 0.60970711) * 668
dist = sqrt[(0.11278512 * 0.11278512) + -(0.8577788 * -0.8577788)]
dist = 0.865161807
if dist is greater than or = 1 then you've got a unique node. If it's less than or equal to 1 like in the case above where dist would be 0.865161807 then the node can be considered a duplicate.
Now I might be misinterpretting the way this is done. But that's what it looks like to me. I'd say code it up, backup your gatherer.lua savedvariable file and go find a mine that's already in there, but just before tapping it use the gatherer command to clear all node information to wipe the data clean then mine it. It should then record the gather to the savedvariables with a different location than before since gatherer takes the precise position the player is at as the location of the mine.