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

Suggestion: Sort unlocked transmogs by name or quality (or both) #133

Open
atrapalis opened this issue Sep 20, 2023 · 1 comment
Open

Suggestion: Sort unlocked transmogs by name or quality (or both) #133

atrapalis opened this issue Sep 20, 2023 · 1 comment

Comments

@atrapalis
Copy link

Unlocked transmogs seem to be listed in a random/not predictable order in the gossip window.
It would be nice to have items ordered in a predictable order, e.g. by name.

I have found a way to do this in code by changing the query in

transmog_scripts.cpp:

void OnAfterConfigLoad(bool reload) override
{
...
            QueryResult result = CharacterDatabase.Query("SELECT custom_unlocked_appearances.account_id, custom_unlocked_appearances.item_template_id, acore_world.item_template.name, acore_world.item_template.Quality FROM custom_unlocked_appearances INNER JOIN acore_world.item_template ON custom_unlocked_appearances.item_template_id=acore_world.item_template.entry ORDER BY acore_world.item_template.Quality DESC, acore_world.item_template.name ASC;");
...
}

This query would order transmogs by item quality first, and by item name second.

You would also have to remove the following std::sort call in

Transmogrification.cpp

bool Transmogrification::AddCollectedAppearance(uint32 accountId, uint32 itemId)
{
...
        std::sort(collectionCache[accountId].begin(), collectionCache[accountId].end());
...
}

This approach has some quirks (e.g. newly unlocked items are not ordered in the same way until a server restart) but I believe it makes it much easier to search through unlocked items.

@Helias
Copy link
Member

Helias commented Sep 20, 2023

Hey, thanks for the suggestion, you could make a Pull Request to propose a change

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

No branches or pull requests

2 participants