LegionCore-7.3.5
LegionCore-7.3.5 copied to clipboard
Achievement =11259 treasures of stormheim
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?
Player->UpdateAchievementCriteria(CRITERIA_TYPE_USE_GAMEOBJECT, ?); If you do it in code, how can you make it count exactly when you open a chest?
@SoulSeekkor @dufernst Hi, need help!
@Elgrimm I will check next Friday and/or Saturday in a debugger.
@dufernst Thanks!
@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
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, '');
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
Regarding this achievement, if necessary, write me, I’ll send you the full sql
@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?
@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.
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.