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

Achievement =11259 treasures of stormheim #170

Open
Elgrimm opened this issue Jan 28, 2024 · 11 comments
Open

Achievement =11259 treasures of stormheim #170

Elgrimm opened this issue Jan 28, 2024 · 11 comments

Comments

@Elgrimm
Copy link

Elgrimm commented Jan 28, 2024

Hi. Need help! When opening any of the achievement chests, the condition is not counted.
https://www.wowhead.com/achievement=11259/treasures-of-stormheim
Any chest from this list does not provide progress.
https://www.wowhead.com/achievement=11259/treasures-of-stormheim#comments
Where is this and how should it be implemented in sql or how to do it in code?

@Elgrimm
Copy link
Author

Elgrimm commented Jan 28, 2024

Player->UpdateAchievementCriteria(CRITERIA_TYPE_USE_GAMEOBJECT, ?);
If you do it in code, how can you make it count exactly when you open a chest?

@Elgrimm
Copy link
Author

Elgrimm commented Jan 28, 2024

@SoulSeekkor
@dufernst
Hi, need help!

@dufernst
Copy link
Owner

@Elgrimm I will check next Friday and/or Saturday in a debugger.

@Elgrimm
Copy link
Author

Elgrimm commented Jan 28, 2024

@dufernst Thanks!

@Elgrimm
Copy link
Author

Elgrimm commented Feb 3, 2024

@dufernst You don’t have to look, everything is clear there. A spell is attached to each chest and a SmartGameobjectAI is given to the chest

@Elgrimm
Copy link
Author

Elgrimm commented Feb 3, 2024

UPDATE gameobject_template SET AIName = 'SmartGameObjectAI' WHERE entry = 251782;
INSERT INTO legion_world.smart_scripts (entryorguid, source_type, id, link, event_type, event_phase_mask, event_chance, event_flags, event_param1, event_param2, event_param3, event_param4, action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, target_type, target_param1, target_param2, target_param3, target_x, target_y, target_z, target_o, comment) VALUES
(251782, 1, 0, 0, 70, 0, 100, 0, 2, 0, 0, 0, 7, 43240, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, '');

@Elgrimm
Copy link
Author

Elgrimm commented Feb 3, 2024

I suppose you would have thought for a long time about how to do this... There is another question. And I'll probably open a new issue

@Elgrimm
Copy link
Author

Elgrimm commented Feb 3, 2024

Regarding this achievement, if necessary, write me, I’ll send you the full sql

@dufernst
Copy link
Owner

dufernst commented Feb 3, 2024

@Elgrimm I just now had the chance to look at it and this should be automatically handled by:
DEFINE_HANDLER(CMSG_GAME_OBJ_REPORT_USE, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleGameobjectReportUse);

HandleGameobjectReportUse calls Player->UpdateAchievementCriteria(CRITERIA_TYPE_USE_GAMEOBJECT, gameobject->entry()); so it is intended to automatically work, assuming the chests for these achievements all have a unique ID/entry. And assuming that when players open a chest the CMSG_GAME_OBJ_REPORT_USE OPCODE is sent. Adding a script to each object does not seem like the right way to go.
Should we still check if that is the case? Or are you happy to leave it as is?

@Elgrimm
Copy link
Author

Elgrimm commented Feb 4, 2024

@dufernst The meaning remains the same. Check any chest in Stormheim and check if the condition is counted towards you in the "Treasures of Stormheim" criterion One way or another, there is logic in your words. But at the moment I have found only such a solution to this problem! Through SmartAI, assigning each chest to complete a quest when using it.

@dufernst
Copy link
Owner

dufernst commented Feb 4, 2024

I looked at this today, and the objects and quests are linked via Vignette.db2.
Not sure yet how these objects/vignettes are marked to complete the tracking quest on opening them.
Maybe I'll look at it some other time, but an initial look resulted in nothing much.

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