MrxTaskObjectiveAccept
Module: mrxtaskobjectiveaccept.lua
Overview
The MrxTaskObjectiveAccept module is a task objective action that handles the acceptance of a task by a player. It displays a confirmation dialog to the player and processes their response.
Inheritance
- Inherits from:
MrxTaskObjectiveAction - Imports:
MrxGui,MrxPlayer
Instance pattern
This is a per-instance object module (keyed by uGuid). It tracks the following key fields:
_bConfPromptDisplayed: A boolean indicating whether the confirmation prompt has been displayed.
Functions
_TargetActioned(self, uActionerGuid, uActioneeGuid)
Called when an action target is acted upon. If the confirmation prompt has not been displayed yet, it sets _bConfPromptDisplayed to true and shows a dialog box to the player asking for confirmation.
_ConfPromptDismissed(self, uActionerGuid, uActioneeGuid, nSelectedIndex)
Called when the player dismisses the confirmation dialog. It resets _bConfPromptDisplayed to false and checks if the player selected βYesβ. If so, it calls the base classβs _TargetActioned method.
_PrintObjectiveMessage(self, sMsgType)
A placeholder function that does nothing. This is likely a stub for future functionality related to printing objective messages.
Events
- Listens for an internal event (not explicitly defined in this file) to call
_ConfPromptDismissedwhen the player dismisses the confirmation dialog.
Notes for modders
- Ensure that
_TargetActionedis called appropriately when an action target is acted upon. - Customize the dialog text by setting the
sDialogTextfield in the configuration. - Be aware that this module relies on the
MrxGuiandMrxPlayermodules for displaying dialogs and player-related operations.