I ended up going with a two way approach. When GARRISON_MISSION_NPC_OPENED fires, I run a scanner that reruns itself every half second until there are no completed quests. I also have GARRISON_MISSION_FINISHED directly call C_Garrison.MarkMissionComplete() using the passed mission id and trigger a delayed scan to make sure everything was caught. I handle looting with GARRISON_MISSION_COMPLETE_RESPONSE checking C_Garrison.CanOpenMissionChest() and running C_Garrison.MissionBonusRoll() if true.
Note: GARRISON_MISSION_COMPLETE_RESPONSE should fire in response to C_Garrison.MarkMissionComplete() with info on whether the mission succeeded or not. It isn't reliable right now as it only seems to fire on successful missions.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
|
|