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

Ordering of quest objectives #26

Open
max-ri opened this issue May 28, 2021 · 3 comments
Open

Ordering of quest objectives #26

max-ri opened this issue May 28, 2021 · 3 comments

Comments

@max-ri
Copy link

max-ri commented May 28, 2021

It would be great if there was a way to query quest objectives in a way so that we also get information in which order they will appear in game when there is more than one objective.

The background of this unusual feature request: I am the developer of the leveling addon Guidelime. Many of my users have requested, that it would be nice to be able to use ClassicCodex as the quest database for the addon. Currently for this purpose Questie is a dependency. To me it seems it would be very well possible to use this excellent addon as a data source instead. Right now above issue seems to be the only thing which is in the way.

Here is an example:
The quest https://tbc.wowhead.com/quest=9761/clearing-the-way has two objectives.
When querying CodexDB.quests.data[9761].obj.U I can access the npc ids: {17609,17610}. But currently I do not see a way to get the information that actually the second id in the array corresponds to the first objective of the quest. (The order of the objectives shown on wowhead always is the same as it is in game, as well as e.g. used in functions like GetQuestLogLeaderBoard.)

Easiest solution would be if the array would respect the order e.g. {17610,17609} in above example. But this would be problematic when more than one id correspond to the same objective. As in https://tbc.wowhead.com/quest=10482/fel-orc-scavengers (new type of quests added in tbc). Maybe an additional array CodexDB.quests.data[x].obj.order or something like that could be added. Whatever would be easiest to implement.

Feel free to ignore my request. I would be very thankful if it could be realized.
Cheers, Borick

@YihaoPeng
Copy link

How do you find this ordering information from Questie?

In fact, ClassicCodex has been synchronizing quest data from Questie recently (see https://github.com/SwimmingTiger/MergeQuestieToCodexDB). So if the data exists in Questie, I can copy it to ClassicCodex.

@max-ri
Copy link
Author

max-ri commented May 28, 2021

Thank you for your quick answer!
With Questie I get:
QuestieDB:GetQuest(9761).objectives[1] = {{17610},{17609}}
So when there is more than one objective of one type they are given in a certain order.
For the other example where multiple npc ids are used for a single objective, Questie uses a different (new) objective type "killCredit". So QuestieDB:GetQuest(10482).objectives[1] is empty and instead QuestieDB:GetQuest(10482).objectives[5] contains the list of ids.

(If there are multiple objectives of different objective types it is assumed these are always in a fixed order: 1.creature / 2.object / 3.item / 4.reputation / 5.killCredit. So far I have not had issues with this. But more testing is required.)

@max-ri
Copy link
Author

max-ri commented May 28, 2021

From looking at the code you linked, I do not see where the different order should be coming from. Looks like npc id should be listed in the same order as in Questie when they are imported.
Another example where the order in ClassicCodex is different is https://tbc.wowhead.com/quest=9669/the-missing-expedition.

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