TrinityCore / WowPacketParser

World of Warcraft Packet Parser
GNU General Public License v3.0
410 stars 352 forks source link

Implement SaveExistingSpawns and lookup of existing spawns #809

Closed killerwife closed 6 months ago

killerwife commented 7 months ago

This features enables sorting through sniffs in quick succession for subsequent missing spawns without requiring to insert everything into the database. Lines which are already found in db will be commented out optionally.

This is not usable across all patches, I found that for example draenei island shifted by 0.2 in X coordinate for whatever reason, comparing Legion vs Wotlk Classic data, however for using same expansion data its very useful when tracking down missing spawns.

I use a precision of 0.000001f for comparison, because due to serialization and decimal loading and other shenanigans, mysql float is no longer able to fit exact equal value after 15th decimal on average. This is not worth reworking the database columns, however it does mean that == operator is not usable.

Optionally, I can add designation between TC and Cmangos schema, for now I made TBC conform with our db schema as a workaround and kept the rest conforming with wotlk+ for TC.

mdX7 commented 7 months ago

i kinda recall that i tried this a few months ago and it wasn't working much, as the offset varied a lot due to mysql rounding - is this still the case?

killerwife commented 7 months ago

Well i mitigated it with the round sql in this pr. Its down to a manageable level. Used it this weekend to get all spawns in azuremyst isle across 7 sniffs.