TrinityCore / TrinityCore/TrinityCore

Core/Gossip: gossip_menu_option new params

Open
#30,919 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Branch-3.3.5a
Dominant language
C++
Stars
10.8k
Forks
6.4k
Avg merge
3d 16m
Merged PRs (30d)
6

Description

Description

We need the following columns in gossip_menu_option:

  1. CastSpellID (spell to cast on player when gossip option is selected) (not just SpellID because it exists in master branch, "in master that field is sent to client to display spell tooltips in gossip menu, not for casting") . There should be a check to force player to cast spell in case spell is selfcast
  2. IsTriggered (cast spell with triggered cast flag if set to 1 (needed for some spells))
  3. AutoClose (close gossip menu automatically after gossip is selected, if set to 1)

This is based on the following facts:

  1. On retail there's no AI hook OnGossipSelect
  2. On retail there's no action in AIGroup to close gossip
  3. I did some research back in the days and there are signs that gossip scripts are scripted by calling GameEvent. Thing is we have credits spawned near NPCs with gossip scripts. How GameEvent works on retail: They're never scripted. GameEvent just triggers events. When event is lauched, creature associated with this event "catches" event and executes AIGroupActionSet. Creature can be not spawned yet and spawns when catches event. So, when gossip is selected, spawned nearby quest credit awards credit to player.
    Majority of gossip scripts just forces creature or player to cast spell, there's hundreds of them. It's too complicated to script them like that.
  4. There is an enum in EnumeratedStrings that contains following flags:

ID 246

Players cast spell on themselves
Player Updates Interactions
NPC casts spell using AICast
Gossip Begins a pet battle

It looks like a mini scripting system just for gossips

Expected behaviour

above

Steps to reproduce the problem

none

Branch

3.3.5

TC rev. hash/commit

a1814cf13d24e7bb5142417a6f8f0dfd08db72e1

Operating system

Win 11

Custom changes

none

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how gossip_menu_option is handled in the 3.3.5 core, then inspect the EnumeratedStrings entry for ID 246 and the mentioned OnGossipSelect, AIGroupActionSet, and GameEvent paths. Done means the requested CastSpellID, IsTriggered, and AutoClose behavior is defined and integrated, including self-casting and automatic menu closure.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.