TrinityCore / TrinityCore/TrinityCore
Core/Gossip: gossip_menu_option new params
Nobody has claimed this yet.
- 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:
- 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
- IsTriggered (cast spell with triggered cast flag if set to 1 (needed for some spells))
- AutoClose (close gossip menu automatically after gossip is selected, if set to 1)
This is based on the following facts:
- On retail there's no AI hook OnGossipSelect
- On retail there's no action in AIGroup to close gossip
- 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. - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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