Skip to content

Adding Support for SetQuestCompletions_Emote_Type & Refactored/Cleaned up KillTask Function

Zarto requested to merge (removed):ZartoEmotes into ZartoEmotes

SetQuestCompletions_Emote Type

Added support for SetQuestCompletions_Emote Type. This emote type was already supported in the questTable.cpp. This merely extends that capacity to the EmoteManager.cpp. Parameters for this emote type beyond the base parameters required for all emotes are:

  1. msg: Contains the questname string
  2. amount: To what we want to set our quest completions.

Refactored & cleaned up KillTask Function.

Reviewed and greatly improved readability and efficiency of the original implementation.

  • Refactored the KillTask function to eliminate duplicate code.
  • Removed excessive variable copying in favor of &ref variables for better memory management.
  • Corrected poorly constructed function variables.
  • Added additional comments for readability.
  • **!!!!**Changed NPC initial emote type to start quest from StampQuest to SetQuestCompletions. This allows us to add the quest to the player quest table while still maintaining intial kills at 0 eliminating the need for additional calculations to correct for the erroneous first kill stamp at the start of the quest. More efficient. Please see appended sample weenies that reflect these changes.

Original functionality remains with string trigger for StampQuest_EmoteType:

Msg:

mobnamekillcounter@#kt

Using the string trigger @#kt to trigger a divert into the kill task stamping and messaging function. If @#kt is not present the emote proceeds to stamp the defined quest as normal.


Sample_KT_Mob_NPC_sample_REV2.rar

Merge request reports