Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement SaveExistingSpawns and lookup of existing spawns #809

Merged
merged 5 commits into from
Dec 27, 2023

Conversation

killerwife
Copy link
Collaborator

@killerwife killerwife commented Nov 19, 2023

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
Copy link
Member

mdX7 commented Nov 20, 2023

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
Copy link
Collaborator Author

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.

@killerwife killerwife force-pushed the feature/ExistingSpawns branch from c9eb46d to 789b3f8 Compare November 25, 2023 21:08
Description: Spawn spawns which are already existing in db (compared by entry, position) or comment them in sql
Default: "false" (comment existing spawns in sql)
-->
<add key="SaveExistingSpawns" value="false"/>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mdX7 prolly just one thing, default should be True, thats the old behaviour. Forgot to change that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im going with default false, makes it easier for new people using wpp

@mdX7 mdX7 merged commit cd30ae4 into TrinityCore:master Dec 27, 2023
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants